Home
last modified time | relevance | path

Searched refs:cipher_ctx (Results 1 – 13 of 13) sorted by relevance

/optee_os/lib/libmbedtls/core/
H A Dcmac.c22 mbedtls_cipher_context_t cipher_ctx; member
48 if (mbedtls_cipher_setup_info(&c->cipher_ctx, cipher_info)) in mbed_cmac_init()
51 if (mbedtls_cipher_cmac_reset(&c->cipher_ctx)) in mbed_cmac_init()
54 if (mbedtls_cipher_cmac_starts(&c->cipher_ctx, key, len * 8)) in mbed_cmac_init()
65 if (mbedtls_cipher_cmac_update(&c->cipher_ctx, data, len)) in mbed_cmac_update()
92 if (mbedtls_cipher_cmac_finish(&c->cipher_ctx, tmp_digest)) in mbed_cmac_final()
105 mbedtls_cipher_free(&c->cipher_ctx); in mbed_cmac_free_ctx()
115 if (mbedtls_cipher_clone(&dst->cipher_ctx, &src->cipher_ctx)) in mbed_cmac_copy_state()
155 mbedtls_cipher_init(&c->cipher_ctx); in crypto_cmac_alloc_ctx()
156 mbed_res = mbedtls_cipher_setup(&c->cipher_ctx, cipher_info); in crypto_cmac_alloc_ctx()
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dcipher.c215 if (ctx->cipher_ctx != NULL) { in mbedtls_cipher_free()
217 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_free()
239 if (ctx->cipher_ctx) { in mbedtls_cipher_free()
240 mbedtls_cipher_get_base(ctx->cipher_info)->ctx_free_func(ctx->cipher_ctx); in mbedtls_cipher_free()
266 mbedtls_cipher_get_base(dst->cipher_info)->ctx_clone_func(dst->cipher_ctx, src->cipher_ctx); in mbedtls_cipher_clone()
285 ctx->cipher_ctx = mbedtls_cipher_get_base(cipher_info)->ctx_alloc_func(); in mbedtls_cipher_setup()
286 if (ctx->cipher_ctx == NULL) { in mbedtls_cipher_setup()
325 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa()
363 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_setkey()
434 return mbedtls_cipher_get_base(ctx->cipher_info)->setkey_enc_func(ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
[all …]
H A Dpkcs5.c143 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs5_pbes2_ext() local
215 mbedtls_cipher_init(&cipher_ctx); in mbedtls_pkcs5_pbes2_ext()
225 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs5_pbes2_ext()
229 if ((ret = mbedtls_cipher_setkey(&cipher_ctx, key, 8 * keylen, in mbedtls_pkcs5_pbes2_ext()
251 if ((ret = mbedtls_cipher_set_padding_mode(&cipher_ctx, padding)) != 0) { in mbedtls_pkcs5_pbes2_ext()
256 if ((ret = mbedtls_cipher_crypt(&cipher_ctx, iv, enc_scheme_params.len, in mbedtls_pkcs5_pbes2_ext()
262 mbedtls_cipher_free(&cipher_ctx); in mbedtls_pkcs5_pbes2_ext()
H A Dpkcs12.c161 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs12_pbe_ext() local
197 mbedtls_cipher_init(&cipher_ctx); in mbedtls_pkcs12_pbe_ext()
199 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs12_pbe_ext()
203 if ((ret = mbedtls_cipher_setkey(&cipher_ctx, key, 8 * keylen, in mbedtls_pkcs12_pbe_ext()
222 if ((ret = mbedtls_cipher_set_padding_mode(&cipher_ctx, padding)) != 0) { in mbedtls_pkcs12_pbe_ext()
228 ret = mbedtls_cipher_crypt(&cipher_ctx, iv, iv_len, data, len, output, &finish_olen); in mbedtls_pkcs12_pbe_ext()
238 mbedtls_cipher_free(&cipher_ctx); in mbedtls_pkcs12_pbe_ext()
H A Dnist_kw.c84 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_nist_kw_setkey()
86 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_nist_kw_setkey()
90 if ((ret = mbedtls_cipher_setkey(&ctx->cipher_ctx, key, keybits, in mbedtls_nist_kw_setkey()
109 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_nist_kw_free()
200 ret = mbedtls_cipher_update(&ctx->cipher_ctx, in mbedtls_nist_kw_wrap()
222 ret = mbedtls_cipher_update(&ctx->cipher_ctx, in mbedtls_nist_kw_wrap()
289 ret = mbedtls_cipher_update(&ctx->cipher_ctx, in unwrap()
382 ret = mbedtls_cipher_update(&ctx->cipher_ctx, in mbedtls_nist_kw_unwrap()
H A Dccm.c82 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_ccm_setkey()
84 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_ccm_setkey()
88 if ((ret = mbedtls_cipher_setkey(&ctx->cipher_ctx, key, keybits, in mbedtls_ccm_setkey()
108 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_ccm_free()
135 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->ctr, 16, tmp_buf, &olen); in mbedtls_ccm_crypt()
213 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen); in ccm_calculate_first_block_if_ready()
341 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen); in mbedtls_ccm_update_ad()
410 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen); in mbedtls_ccm_update()
445 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen); in mbedtls_ccm_update()
H A Dgcm.c109 ret = mbedtls_cipher_update(&ctx->cipher_ctx, h, 16, h, &olen); in gcm_gen_table()
196 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_gcm_setkey()
198 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_gcm_setkey()
202 if ((ret = mbedtls_cipher_setkey(&ctx->cipher_ctx, key, keybits, in mbedtls_gcm_setkey()
441 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ctx->base_ectr, &olen); in mbedtls_gcm_starts()
546 ret = mbedtls_cipher_update(&ctx->cipher_ctx, ctx->y, 16, ectr, &olen); in gcm_mask()
778 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_gcm_free()
/optee_os/core/drivers/crypto/crypto_api/cipher/
H A Dcipher.c26 return container_of(ctx, struct crypto_cipher, cipher_ctx); in to_cipher_ctx()
191 cipher->cipher_ctx.ops = &cipher_ops; in drvcrypt_cipher_alloc_ctx()
192 *ctx = &cipher->cipher_ctx; in drvcrypt_cipher_alloc_ctx()
/optee_os/core/drivers/crypto/crypto_api/include/
H A Ddrvcrypt_cipher.h17 struct crypto_cipher_ctx cipher_ctx; /* Crypto cipher API context */ member
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dnist_kw.h52 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
H A Dgcm.h62 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
H A Dccm.h90 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
H A Dcipher.h350 void *MBEDTLS_PRIVATE(cipher_ctx);