/third_party/openssl/crypto/engine/ |
D | eng_devcrypto.c | 59 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/ |
D | crypt_and_hash.c | 99 mbedtls_cipher_context_t cipher_ctx; in main() local 110 mbedtls_cipher_init( &cipher_ctx ); in main() 183 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main() 349 if( mbedtls_cipher_setkey( &cipher_ctx, in main() 357 if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) in main() 362 if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) in main() 377 for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) in main() 379 … ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? in main() 380 mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); in main() 388 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) in main() [all …]
|
/third_party/mbedtls/library/ |
D | cipher.c | 158 if( ctx->cipher_ctx != NULL ) in mbedtls_cipher_free() 161 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_free() 187 if( ctx->cipher_ctx ) in mbedtls_cipher_free() 188 ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); in mbedtls_cipher_free() 202 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) in mbedtls_cipher_setup() 246 ctx->cipher_ctx = cipher_psa; in mbedtls_cipher_setup_psa() 269 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_setkey() 340 return( ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey() 345 return( ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey() 389 if ( 0 != mbedtls_chacha20_starts( (mbedtls_chacha20_context*)ctx->cipher_ctx, in mbedtls_cipher_set_iv() [all …]
|
D | pkcs12.c | 134 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs12_pbe() local 153 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs12_pbe() 155 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe() 158 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… in mbedtls_pkcs12_pbe() 161 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe() 164 if( ( ret = mbedtls_cipher_reset( &cipher_ctx ) ) != 0 ) in mbedtls_pkcs12_pbe() 167 if( ( ret = mbedtls_cipher_update( &cipher_ctx, data, len, in mbedtls_pkcs12_pbe() 173 if( ( ret = mbedtls_cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 ) in mbedtls_pkcs12_pbe() 179 mbedtls_cipher_free( &cipher_ctx ); in mbedtls_pkcs12_pbe()
|
D | pkcs5.c | 125 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs5_pbes2() local 186 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs5_pbes2() 199 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs5_pbes2() 202 if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, in mbedtls_pkcs5_pbes2() 206 if( ( ret = mbedtls_cipher_crypt( &cipher_ctx, iv, enc_scheme_params.len, in mbedtls_pkcs5_pbes2() 212 mbedtls_cipher_free( &cipher_ctx ); in mbedtls_pkcs5_pbes2()
|
D | nist_kw.c | 99 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_nist_kw_setkey() 101 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_nist_kw_setkey() 104 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_nist_kw_setkey() 120 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_nist_kw_free() 221 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_wrap() 246 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_wrap() 314 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in unwrap() 411 ret = mbedtls_cipher_update( &ctx->cipher_ctx, in mbedtls_nist_kw_unwrap()
|
D | ccm.c | 75 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_setkey() 77 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_ccm_setkey() 80 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_ccm_setkey() 96 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_free() 120 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->ctr, 16, tmp_buf, in mbedtls_ccm_crypt() 194 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen ) ) != 0 ) in ccm_calculate_first_block_if_ready() 322 … if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen ) ) != 0 ) in mbedtls_ccm_update_ad() 389 … if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen ) ) != 0 ) in mbedtls_ccm_update() 422 … if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen ) ) != 0 ) in mbedtls_ccm_update()
|
D | gcm.c | 87 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) in gcm_gen_table() 158 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_setkey() 160 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_gcm_setkey() 163 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_gcm_setkey() 305 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, in mbedtls_gcm_starts() 406 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ectr, in gcm_mask() 653 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_free()
|
/third_party/mbedtls/include/mbedtls/ |
D | nist_kw.h | 65 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
|
D | gcm.h | 62 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
|
D | ccm.h | 81 mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */
|
D | cipher.h | 356 void *MBEDTLS_PRIVATE(cipher_ctx);
|