Home
last modified time | relevance | path

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

/third_party/openssl/crypto/engine/
Deng_devcrypto.c59 struct cipher_ctx { struct
152 struct cipher_ctx *cipher_ctx = in cipher_init() local
153 (struct cipher_ctx *)EVP_CIPHER_CTX_get_cipher_data(ctx); in cipher_init()
158 if (cipher_ctx->sess.ses != 0 && in cipher_init()
159 clean_devcrypto_session(&cipher_ctx->sess) == 0) in cipher_init()
162 cipher_ctx->sess.cipher = cipher_d->devcryptoid; in cipher_init()
163 cipher_ctx->sess.keylen = cipher_d->keylen; in cipher_init()
164 cipher_ctx->sess.key = (void *)key; in cipher_init()
165 cipher_ctx->op = enc ? COP_ENCRYPT : COP_DECRYPT; in cipher_init()
166 cipher_ctx->mode = cipher_d->flags & EVP_CIPH_MODE; in cipher_init()
[all …]
/third_party/mbedtls/programs/aes/
Dcrypt_and_hash.c130 mbedtls_cipher_context_t cipher_ctx; in main() local
141 mbedtls_cipher_init( &cipher_ctx ); in main()
214 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main()
343 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
349 if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) in main()
354 if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) in main()
365 for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) in main()
367 … ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? in main()
368 mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); in main()
376 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) in main()
[all …]
/third_party/boringssl/src/crypto/cmac/
Dcmac.c62 EVP_CIPHER_CTX cipher_ctx; member
74 EVP_CIPHER_CTX_init(&ctx->cipher_ctx); in CMAC_CTX_init()
78 EVP_CIPHER_CTX_cleanup(&ctx->cipher_ctx); in CMAC_CTX_cleanup()
128 if (!EVP_CIPHER_CTX_copy(&out->cipher_ctx, &in->cipher_ctx)) { in CMAC_CTX_copy()
181 !EVP_EncryptInit_ex(&ctx->cipher_ctx, cipher, NULL, key, kZeroIV) || in CMAC_Init()
182 !EVP_Cipher(&ctx->cipher_ctx, scratch, kZeroIV, block_size) || in CMAC_Init()
184 !EVP_EncryptInit_ex(&ctx->cipher_ctx, NULL, NULL, NULL, kZeroIV)) { in CMAC_Init()
202 return EVP_EncryptInit_ex(&ctx->cipher_ctx, NULL, NULL, NULL, kZeroIV); in CMAC_Reset()
206 size_t block_size = EVP_CIPHER_CTX_block_size(&ctx->cipher_ctx); in CMAC_Update()
232 if (!EVP_Cipher(&ctx->cipher_ctx, scratch, ctx->block, block_size)) { in CMAC_Update()
[all …]
/third_party/boringssl/src/crypto/cipher_extra/
De_tls.c34 EVP_CIPHER_CTX cipher_ctx; member
59 EVP_CIPHER_CTX_cleanup(&tls_ctx->cipher_ctx); in aead_tls_cleanup()
84 EVP_CIPHER_CTX_init(&tls_ctx->cipher_ctx); in aead_tls_init()
91 if (!EVP_CipherInit_ex(&tls_ctx->cipher_ctx, cipher, NULL, &key[mac_key_len], in aead_tls_init()
98 EVP_CIPHER_CTX_set_padding(&tls_ctx->cipher_ctx, 0); in aead_tls_init()
109 if (EVP_CIPHER_CTX_mode(&tls_ctx->cipher_ctx) != EVP_CIPH_CBC_MODE) { in aead_tls_tag_len()
114 const size_t block_size = EVP_CIPHER_CTX_block_size(&tls_ctx->cipher_ctx); in aead_tls_tag_len()
132 if (!tls_ctx->cipher_ctx.encrypt) { in aead_tls_seal_scatter()
178 if (EVP_CIPHER_CTX_mode(&tls_ctx->cipher_ctx) == EVP_CIPH_CBC_MODE && in aead_tls_seal_scatter()
180 !EVP_EncryptInit_ex(&tls_ctx->cipher_ctx, NULL, NULL, NULL, nonce)) { in aead_tls_seal_scatter()
[all …]
/third_party/mbedtls/library/
Dcipher.c201 if( ctx->cipher_ctx ) in mbedtls_cipher_free()
202 ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); in mbedtls_cipher_free()
215 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) in mbedtls_cipher_setup()
263 return( ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
268 return( ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
303 if ( 0 != mbedtls_chacha20_starts( (mbedtls_chacha20_context*)ctx->cipher_ctx, in mbedtls_cipher_set_iv()
344 return( mbedtls_gcm_starts( (mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation, in mbedtls_cipher_update_ad()
359 result = mbedtls_chachapoly_starts( (mbedtls_chachapoly_context*) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
365 return( mbedtls_chachapoly_update_aad( (mbedtls_chachapoly_context*) ctx->cipher_ctx, in mbedtls_cipher_update_ad()
401 if( 0 != ( ret = ctx->cipher_info->base->ecb_func( ctx->cipher_ctx, in mbedtls_cipher_update()
[all …]
Dpkcs12.c209 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs12_pbe() local
225 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs12_pbe()
227 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe()
230 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… in mbedtls_pkcs12_pbe()
233 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
236 if( ( ret = mbedtls_cipher_reset( &cipher_ctx ) ) != 0 ) in mbedtls_pkcs12_pbe()
239 if( ( ret = mbedtls_cipher_update( &cipher_ctx, data, len, in mbedtls_pkcs12_pbe()
245 if( ( ret = mbedtls_cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 ) in mbedtls_pkcs12_pbe()
251 mbedtls_cipher_free( &cipher_ctx ); in mbedtls_pkcs12_pbe()
Dpkcs5.c154 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs5_pbes2() local
214 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs5_pbes2()
227 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs5_pbes2()
230 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… in mbedtls_pkcs5_pbes2()
233 if( ( ret = mbedtls_cipher_crypt( &cipher_ctx, iv, enc_scheme_params.len, in mbedtls_pkcs5_pbes2()
239 mbedtls_cipher_free( &cipher_ctx ); in mbedtls_pkcs5_pbes2()
Dnist_kw.c168 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_nist_kw_setkey()
170 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_nist_kw_setkey()
173 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_nist_kw_setkey()
189 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_nist_kw_free()
290 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_wrap()
315 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_wrap()
383 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in unwrap()
480 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_unwrap()
Dccm.c115 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_setkey()
117 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_ccm_setkey()
120 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_ccm_setkey()
136 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_free()
153 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, y, 16, y, &olen ) ) != 0 ) \
164 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctr, \
Dgcm.c140 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) in gcm_gen_table()
210 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_setkey()
212 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_gcm_setkey()
215 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_gcm_setkey()
363 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->base_ectr, in mbedtls_gcm_starts()
425 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ectr, in mbedtls_gcm_update()
571 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_free()
/third_party/mbedtls/include/mbedtls/
Dnist_kw.h95 mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */ member
Dccm.h105 mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */ member
Dgcm.h92 mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */ member
Dcipher.h344 void *cipher_ctx; member
/third_party/boringssl/src/ssl/
Dt1_lib.cc3518 Array<uint8_t> *out, EVP_CIPHER_CTX *cipher_ctx, HMAC_CTX *hmac_ctx, in decrypt_ticket_with_cipher_ctx() argument
3520 size_t iv_len = EVP_CIPHER_CTX_iv_length(cipher_ctx); in decrypt_ticket_with_cipher_ctx()
3558 if (!EVP_DecryptUpdate(cipher_ctx, plaintext.data(), &len1, ciphertext.data(), in decrypt_ticket_with_cipher_ctx()
3560 !EVP_DecryptFinal_ex(cipher_ctx, plaintext.data() + len1, &len2)) { in decrypt_ticket_with_cipher_ctx()
3575 ScopedEVP_CIPHER_CTX cipher_ctx; in ssl_decrypt_ticket_with_cb() local
3584 const_cast<uint8_t *>(iv.data()), cipher_ctx.get(), hmac_ctx.get(), in ssl_decrypt_ticket_with_cb()
3595 return decrypt_ticket_with_cipher_ctx(out, cipher_ctx.get(), hmac_ctx.get(), in ssl_decrypt_ticket_with_cb()
3615 ScopedEVP_CIPHER_CTX cipher_ctx; in ssl_decrypt_ticket_with_ticket_keys() local
3629 !EVP_DecryptInit_ex(cipher_ctx.get(), cipher, NULL, in ssl_decrypt_ticket_with_ticket_keys()
3634 return decrypt_ticket_with_cipher_ctx(out, cipher_ctx.get(), hmac_ctx.get(), in ssl_decrypt_ticket_with_ticket_keys()
/third_party/uboot/u-boot-2020.01/tools/
Dmxsimage.c178 EVP_CIPHER_CTX *cipher_ctx; member
218 ictx->cipher_ctx = ctx; in sb_aes_init()
226 EVP_CIPHER_CTX *ctx = ictx->cipher_ctx; in sb_aes_crypt()
257 EVP_CIPHER_CTX *ctx = ictx->cipher_ctx; in sb_aes_reinit()
435 sb_aes_deinit(ictx->cipher_ctx); in sb_encrypt_image()
2123 sb_aes_deinit(ictx->cipher_ctx); in sb_build_tree_from_img()