Lines Matching refs:mode
1025 int mode, in mbedtls_aes_crypt_ecb() argument
1029 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_ecb()
1039 return mbedtls_aesni_crypt_ecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb()
1045 return mbedtls_aesce_crypt_ecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb()
1051 return mbedtls_padlock_xcryptecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb()
1057 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_ecb()
1073 int mode, in mbedtls_aes_crypt_cbc() argument
1082 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cbc()
1097 if (mbedtls_padlock_xcryptcbc(ctx, mode, length, iv, input, output) == 0) { in mbedtls_aes_crypt_cbc()
1109 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cbc()
1112 ret = mbedtls_aes_crypt_ecb(ctx, mode, input, output); in mbedtls_aes_crypt_cbc()
1131 ret = mbedtls_aes_crypt_ecb(ctx, mode, output, output); in mbedtls_aes_crypt_cbc()
1190 int mode, in mbedtls_aes_crypt_xts() argument
1203 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_xts()
1225 if (MBEDTLS_UNLIKELY(leftover && (mode == MBEDTLS_AES_DECRYPT) && blocks == 0)) { in mbedtls_aes_crypt_xts()
1237 ret = mbedtls_aes_crypt_ecb(&ctx->crypt, mode, tmp, tmp); in mbedtls_aes_crypt_xts()
1254 unsigned char *t = mode == MBEDTLS_AES_DECRYPT ? prev_tweak : tweak; in mbedtls_aes_crypt_xts()
1274 ret = mbedtls_aes_crypt_ecb(&ctx->crypt, mode, tmp, tmp); in mbedtls_aes_crypt_xts()
1293 int mode, in mbedtls_aes_crypt_cfb128() argument
1304 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cfb128()
1314 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cfb128()
1355 int mode, in mbedtls_aes_crypt_cfb8() argument
1365 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cfb8()
1375 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cfb8()
1381 if (mode == MBEDTLS_AES_ENCRYPT) { in mbedtls_aes_crypt_cfb8()
1819 int ret = 0, i, j, u, mode; in mbedtls_aes_self_test() local
1891 mode = i & 1; in mbedtls_aes_self_test()
1895 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
1898 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
1909 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
1932 ret = mbedtls_aes_crypt_ecb(&ctx, mode, buf, buf); in mbedtls_aes_self_test()
1964 mode = i & 1; in mbedtls_aes_self_test()
1968 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
1975 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
1996 if (mode == MBEDTLS_AES_ENCRYPT) { in mbedtls_aes_self_test()
2004 ret = mbedtls_aes_crypt_cbc(&ctx, mode, 16, iv, buf, buf); in mbedtls_aes_self_test()
2038 mode = i & 1; in mbedtls_aes_self_test()
2042 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
2062 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
2070 ret = mbedtls_aes_crypt_cfb128(&ctx, mode, 64, &offset, iv, buf, buf); in mbedtls_aes_self_test()
2102 mode = i & 1; in mbedtls_aes_self_test()
2106 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
2126 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
2165 mode = i & 1; in mbedtls_aes_self_test()
2169 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
2182 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
2226 mode = i & 1; in mbedtls_aes_self_test()
2230 (mode == MBEDTLS_AES_DECRYPT) ? "dec" : "enc"); in mbedtls_aes_self_test()
2239 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_self_test()
2256 ret = mbedtls_aes_crypt_xts(&ctx_xts, mode, len, data_unit, in mbedtls_aes_self_test()