/mbedtls-development/library/ |
A D | ccm.c | 156 if( ctx->tag_len == 0 ) in ccm_calculate_first_block_if_ready() 181 ctx->y[0] |= ( ( ctx->tag_len - 2 ) / 2 ) << 3; in ccm_calculate_first_block_if_ready() 243 size_t tag_len ) in mbedtls_ccm_set_lengths() argument 252 if( tag_len == 2 || tag_len > 16 || tag_len % 2 != 0 ) in mbedtls_ccm_set_lengths() 260 ctx->tag_len = tag_len; in mbedtls_ccm_set_lengths() 449 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_finish() argument 479 memcpy( tag, ctx->y, tag_len ); in mbedtls_ccm_finish() 523 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_star_encrypt_and_tag() argument 548 for( diff = 0, i = 0; i < tag_len; i++ ) in mbedtls_ccm_compare_tags() 592 input, output, tag, tag_len ); in mbedtls_ccm_star_auth_decrypt() [all …]
|
A D | cipher.c | 1161 if ( tag_len != 16U ) in mbedtls_cipher_write_tag() 1205 if( tag_len > sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1211 check_tag, tag_len ) ) ) in mbedtls_cipher_check_tag() 1228 if ( tag_len != sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1386 *olen -= tag_len; in mbedtls_cipher_aead_encrypt() 1414 ( tag_len != 16U ) ) in mbedtls_cipher_aead_encrypt() 1511 ( tag_len != 16U ) ) in mbedtls_cipher_aead_decrypt() 1575 if( output_len < ilen + tag_len ) in mbedtls_cipher_auth_encrypt_ext() 1581 *olen += tag_len; in mbedtls_cipher_auth_encrypt_ext() 1631 if( ilen < tag_len || output_len < ilen - tag_len ) in mbedtls_cipher_auth_decrypt_ext() [all …]
|
A D | gcm.c | 513 unsigned char *tag, size_t tag_len ) in mbedtls_gcm_finish() argument 537 if( tag_len > 16 || tag_len < 4 ) in mbedtls_gcm_finish() 543 memcpy( tag, ctx->base_ectr, tag_len ); in mbedtls_gcm_finish() 559 for( i = 0; i < tag_len; i++ ) in mbedtls_gcm_finish() 575 size_t tag_len, in mbedtls_gcm_crypt_and_tag() argument 598 if( ( ret = mbedtls_gcm_finish( ctx, NULL, 0, &olen, tag, tag_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() 611 size_t tag_len, in mbedtls_gcm_auth_decrypt() argument 629 input, output, tag_len, check_tag ) ) != 0 ) in mbedtls_gcm_auth_decrypt() 635 for( diff = 0, i = 0; i < tag_len; i++ ) in mbedtls_gcm_auth_decrypt()
|
A D | x509_crt.c | 651 size_t len, tag_len; in x509_get_subject_alt_name() local 672 if( ( ret = mbedtls_asn1_get_len( p, end, &tag_len ) ) != 0 ) in x509_get_subject_alt_name() 724 buf->len = tag_len; in x509_get_subject_alt_name()
|
/mbedtls-development/include/mbedtls/ |
A D | ccm.h | 84 size_t MBEDTLS_PRIVATE(tag_len); /*!< Total tag length */ 183 unsigned char *tag, size_t tag_len ); 232 unsigned char *tag, size_t tag_len ); 269 const unsigned char *tag, size_t tag_len ); 315 const unsigned char *tag, size_t tag_len ); 380 size_t tag_len ); 516 unsigned char *tag, size_t tag_len );
|
A D | gcm.h | 174 size_t tag_len, 217 size_t tag_len, 355 unsigned char *tag, size_t tag_len );
|
A D | cipher.h | 914 unsigned char *tag, size_t tag_len ); 930 const unsigned char *tag, size_t tag_len ); 1021 size_t *olen, size_t tag_len ); 1077 size_t *olen, size_t tag_len );
|
/mbedtls-development/tests/scripts/ |
A D | gen_gcm_encrypt.pl | 67 my $tag_len = get_suite_val("Taglen"); 79 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n"); 86 print(":$tag_len");
|
A D | gen_gcm_decrypt.pl | 84 my $tag_len = get_suite_val("Taglen"); 96 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n"); 102 print(":$tag_len");
|
/mbedtls-development/tests/suites/ |
A D | test_suite_gcm.function | 174 size_t tag_len = tag_len_bits / 8; 183 … add_str->x, add_str->len, src_str->x, output, tag_len, tag_output ) == gcm_result ); 200 size_t tag_len = tag_len_bits / 8; 213 …n, iv_str->x, iv_str->len, add_str->x, add_str->len, src_str->x, output, tag_len, tag_output ) == … 216 ASSERT_COMPARE( tag_output, tag_len, tag->x, tag->len ); 247 size_t tag_len = tag_len_bits / 8; 259 …_str->len, iv_str->x, iv_str->len, add_str->x, add_str->len, tag_str->x, tag_len, src_str->x, outp…
|
A D | test_suite_ccm.function | 97 void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res ) 121 msg, out, tag, tag_len ) == res ); 124 msg, out, tag, tag_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 ); 168 if( res == 0 && tag_len != 0 )
|
A D | test_suite_cipher.function | 80 int use_psa, size_t tag_len, const data_t *key, int direction ) 87 (void) tag_len; 93 tag_len ) );
|