Home
last modified time | relevance | path

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

/mbedtls-development/library/
A Dccm.c180 ctx->y[0] |= ( ctx->add_len > 0 ) << 6; in ccm_calculate_first_block_if_ready()
259 ctx->add_len = total_ad_len; in mbedtls_ccm_set_lengths()
269 size_t add_len ) in mbedtls_ccm_update_ad() argument
280 if( add_len > 0 ) in mbedtls_ccm_update_ad()
289 if ( add_len > ctx->add_len ) in mbedtls_ccm_update_ad()
299 else if ( ctx->processed + add_len > ctx->add_len ) in mbedtls_ccm_update_ad()
304 while( add_len > 0 ) in mbedtls_ccm_update_ad()
310 if( use_len > add_len ) in mbedtls_ccm_update_ad()
311 use_len = add_len; in mbedtls_ccm_update_ad()
317 add_len -= use_len; in mbedtls_ccm_update_ad()
[all …]
A Dgcm.c271 ctx->add_len = 0; in mbedtls_gcm_starts()
341 offset = ctx->add_len % 16; in mbedtls_gcm_update_ad()
347 if( use_len > add_len ) in mbedtls_gcm_update_ad()
348 use_len = add_len; in mbedtls_gcm_update_ad()
356 ctx->add_len += use_len; in mbedtls_gcm_update_ad()
357 add_len -= use_len; in mbedtls_gcm_update_ad()
361 ctx->add_len += add_len; in mbedtls_gcm_update_ad()
363 while( add_len >= 16 ) in mbedtls_gcm_update_ad()
370 add_len -= 16; in mbedtls_gcm_update_ad()
374 if( add_len > 0 ) in mbedtls_gcm_update_ad()
[all …]
A Dhmac_drbg.c64 size_t add_len ) in mbedtls_hmac_drbg_update() argument
67 unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1; in mbedtls_hmac_drbg_update()
86 additional, add_len ) ) != 0 ) in mbedtls_hmac_drbg_update()
321 const unsigned char *additional, size_t add_len ) in mbedtls_hmac_drbg_random_with_add() argument
334 if( add_len > MBEDTLS_HMAC_DRBG_MAX_INPUT ) in mbedtls_hmac_drbg_random_with_add()
342 if( ( ret = mbedtls_hmac_drbg_reseed( ctx, additional, add_len ) ) != 0 ) in mbedtls_hmac_drbg_random_with_add()
345 add_len = 0; /* VII.4 */ in mbedtls_hmac_drbg_random_with_add()
349 if( additional != NULL && add_len != 0 ) in mbedtls_hmac_drbg_random_with_add()
352 additional, add_len ) ) != 0 ) in mbedtls_hmac_drbg_random_with_add()
376 additional, add_len ) ) != 0 ) in mbedtls_hmac_drbg_random_with_add()
A Dctr_drbg.c317 size_t add_len ) in mbedtls_ctr_drbg_update() argument
322 if( add_len == 0 ) in mbedtls_ctr_drbg_update()
325 if( ( ret = block_cipher_df( add_input, additional, add_len ) ) != 0 ) in mbedtls_ctr_drbg_update()
503 const unsigned char *additional, size_t add_len ) in mbedtls_ctr_drbg_random_with_add() argument
516 if( add_len > MBEDTLS_CTR_DRBG_MAX_INPUT ) in mbedtls_ctr_drbg_random_with_add()
524 if( ( ret = mbedtls_ctr_drbg_reseed( ctx, additional, add_len ) ) != 0 ) in mbedtls_ctr_drbg_random_with_add()
528 add_len = 0; in mbedtls_ctr_drbg_random_with_add()
531 if( add_len > 0 ) in mbedtls_ctr_drbg_random_with_add()
533 if( ( ret = block_cipher_df( add_input, additional, add_len ) ) != 0 ) in mbedtls_ctr_drbg_random_with_add()
A Dpem.c439 size_t len = 0, use_len, add_len = 0; in mbedtls_pem_write_buffer() local
442 add_len = strlen( header ) + strlen( footer ) + ( use_len / 64 ) + 1; in mbedtls_pem_write_buffer()
444 if( use_len + add_len > buf_len ) in mbedtls_pem_write_buffer()
446 *olen = use_len + add_len; in mbedtls_pem_write_buffer()
/mbedtls-development/include/mbedtls/
A Dgcm.h66 …uint64_t MBEDTLS_PRIVATE(add_len); /*!< The total length of the additional dat…
171 size_t add_len,
215 size_t add_len,
261 size_t add_len );
A Dhmac_drbg.h299 const unsigned char *additional, size_t add_len );
362 size_t add_len );
A Dctr_drbg.h468 size_t add_len );
503 const unsigned char *additional, size_t add_len );
A Dccm.h83 size_t MBEDTLS_PRIVATE(add_len); /*!< Total authentication data length */
/mbedtls-development/tests/scripts/
A Dgen_gcm_encrypt.pl66 my $add_len = get_suite_val("AADlen");
79 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
A Dgen_gcm_decrypt.pl83 my $add_len = get_suite_val("AADlen");
96 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
/mbedtls-development/tests/suites/
A Dtest_suite_ccm.function97 void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res )
110 ASSERT_ALLOC_WEAK( add, add_len );
120 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len,
123 decrypt_ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len,
138 void ccm_star_lengths( int msg_len, int iv_len, int add_len, int tag_len,
163 add, add_len, msg, out, tag, tag_len ) == res );
166 add_len, msg, out, tag, tag_len );
/mbedtls-development/
A DChangeLog3224 add_len (found by Jean-Philippe Aumasson) (not triggerable remotely).
3729 add_len (found by Jean-Philippe Aumasson) (not triggerable remotely).

Completed in 21 milliseconds