Home
last modified time | relevance | path

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

/net-tools-2.7.6/mbedtls-2.4.0/programs/aes/
Dcrypt_and_hash.c91 mbedtls_cipher_context_t cipher_ctx; in main() local
102 mbedtls_cipher_init( &cipher_ctx ); in main()
175 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main()
308 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
314 if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) in main()
319 if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) in main()
330 for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) in main()
332 … ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? in main()
333 mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); in main()
341 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) in main()
[all …]
/net-tools-2.7.6/mbedtls-2.4.0/library/
Dcipher.c149 if( ctx->cipher_ctx ) in mbedtls_cipher_free()
150 ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); in mbedtls_cipher_free()
162 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) in mbedtls_cipher_setup()
203 return ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
208 return ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key, in mbedtls_cipher_setkey()
262 return mbedtls_gcm_starts( (mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation, in mbedtls_cipher_update_ad()
291 if( 0 != ( ret = ctx->cipher_info->base->ecb_func( ctx->cipher_ctx, in mbedtls_cipher_update()
304 return mbedtls_gcm_update( (mbedtls_gcm_context *) ctx->cipher_ctx, ilen, input, in mbedtls_cipher_update()
350 if( 0 != ( ret = ctx->cipher_info->base->cbc_func( ctx->cipher_ctx, in mbedtls_cipher_update()
391 if( 0 != ( ret = ctx->cipher_info->base->cbc_func( ctx->cipher_ctx, in mbedtls_cipher_update()
[all …]
Dpkcs12.c186 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs12_pbe() local
202 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs12_pbe()
204 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe()
207 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… in mbedtls_pkcs12_pbe()
210 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
213 if( ( ret = mbedtls_cipher_reset( &cipher_ctx ) ) != 0 ) in mbedtls_pkcs12_pbe()
216 if( ( ret = mbedtls_cipher_update( &cipher_ctx, data, len, in mbedtls_pkcs12_pbe()
222 if( ( ret = mbedtls_cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 ) in mbedtls_pkcs12_pbe()
228 mbedtls_cipher_free( &cipher_ctx ); in mbedtls_pkcs12_pbe()
Dpkcs5.c127 mbedtls_cipher_context_t cipher_ctx; in mbedtls_pkcs5_pbes2() local
187 mbedtls_cipher_init( &cipher_ctx ); in mbedtls_pkcs5_pbes2()
200 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs5_pbes2()
203 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… 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()
Dccm.c83 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_setkey()
85 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()
102 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_ccm_free()
119 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, y, 16, y, &olen ) ) != 0 ) \
128 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctr, 16, b, &olen ) ) != 0 ) \
Dgcm.c110 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) in gcm_gen_table()
176 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_setkey()
178 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_gcm_setkey()
181 if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, in mbedtls_gcm_setkey()
323 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->base_ectr, in mbedtls_gcm_starts()
381 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ectr, in mbedtls_gcm_update()
505 mbedtls_cipher_free( &ctx->cipher_ctx ); in mbedtls_gcm_free()
/net-tools-2.7.6/mbedtls-2.4.0/include/mbedtls/
Dccm.h39 mbedtls_cipher_context_t cipher_ctx; /*!< cipher context used */ member
Dgcm.h44 mbedtls_cipher_context_t cipher_ctx;/*!< cipher context used */ member
Dcipher.h248 void *cipher_ctx; member