Lines Matching refs:algo
42 static void free_ctx(void **ctx, uint32_t algo) in free_ctx() argument
44 if (algo == TEE_ALG_AES_GCM) in free_ctx()
52 static TEE_Result init_ctx(void **ctx, uint32_t algo, TEE_OperationMode mode, in init_ctx() argument
69 switch (algo) { in init_ctx()
77 res = crypto_cipher_alloc_ctx(ctx, algo); in init_ctx()
80 res = crypto_authenc_alloc_ctx(ctx, algo); in init_ctx()
89 switch (algo) { in init_ctx()
110 free_ctx(ctx, algo); in init_ctx()
129 static TEE_Result do_update(void *ctx, uint32_t algo, TEE_OperationMode mode, in do_update() argument
140 if (algo == TEE_ALG_AES_GCM) in do_update()
172 uint32_t algo = 0; in core_aes_perf_tests() local
180 algo = TEE_ALG_AES_ECB_NOPAD; in core_aes_perf_tests()
183 algo = TEE_ALG_AES_CBC_NOPAD; in core_aes_perf_tests()
186 algo = TEE_ALG_AES_CTR; in core_aes_perf_tests()
189 algo = TEE_ALG_AES_XTS; in core_aes_perf_tests()
192 algo = TEE_ALG_AES_GCM; in core_aes_perf_tests()
211 res = init_ctx(&ctx, algo, mode, key_size_bits, params[2].memref.size); in core_aes_perf_tests()
215 res = do_update(ctx, algo, mode, rep_count, unit_size, in core_aes_perf_tests()
219 free_ctx(&ctx, algo); in core_aes_perf_tests()