/net-tools-3.7.0/mbedtls-2.4.0/library/ |
D | ccm.c | 138 const unsigned char *iv, size_t iv_len, in ccm_auth_crypt() argument 162 if( iv_len < 7 || iv_len > 13 ) in ccm_auth_crypt() 168 q = 16 - 1 - (unsigned char) iv_len; in ccm_auth_crypt() 187 memcpy( b + 1, iv, iv_len ); in ccm_auth_crypt() 245 memcpy( ctr + 1, iv, iv_len ); in ccm_auth_crypt() 246 memset( ctr + 1 + iv_len, 0, q ); in ccm_auth_crypt() 308 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_encrypt_and_tag() argument 313 return( ccm_auth_crypt( ctx, CCM_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_encrypt_and_tag() 321 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_auth_decrypt() argument 332 iv, iv_len, add, add_len, in mbedtls_ccm_auth_decrypt() [all …]
|
D | gcm.c | 269 size_t iv_len, in mbedtls_gcm_starts() argument 280 if( ( (uint64_t) iv_len ) >> 61 != 0 || in mbedtls_gcm_starts() 293 if( iv_len == 12 ) in mbedtls_gcm_starts() 295 memcpy( ctx->y, iv, iv_len ); in mbedtls_gcm_starts() 301 PUT_UINT32_BE( iv_len * 8, work_buf, 12 ); in mbedtls_gcm_starts() 304 while( iv_len > 0 ) in mbedtls_gcm_starts() 306 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts() 313 iv_len -= use_len; in mbedtls_gcm_starts() 445 size_t iv_len, in mbedtls_gcm_crypt_and_tag() argument 455 if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len, add, add_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() [all …]
|
D | cipher.c | 215 const unsigned char *iv, size_t iv_len ) in mbedtls_cipher_set_iv() argument 223 if( iv_len > MBEDTLS_MAX_IV_LENGTH ) in mbedtls_cipher_set_iv() 227 actual_iv_size = iv_len; in mbedtls_cipher_set_iv() 233 if( actual_iv_size > iv_len ) in mbedtls_cipher_set_iv() 813 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_crypt() argument 820 if( ( ret = mbedtls_cipher_set_iv( ctx, iv, iv_len ) ) != 0 ) in mbedtls_cipher_crypt() 842 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_auth_encrypt() argument 853 iv, iv_len, ad, ad_len, input, output, in mbedtls_cipher_auth_encrypt() 862 iv, iv_len, ad, ad_len, input, output, in mbedtls_cipher_auth_encrypt() 874 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_auth_decrypt() argument [all …]
|
D | pem.c | 64 size_t iv_len ) in pem_get_iv() argument 68 memset( iv, 0, iv_len ); in pem_get_iv() 70 for( i = 0; i < iv_len * 2; i++, s++ ) in pem_get_iv()
|
/net-tools-3.7.0/mbedtls-2.4.0/tests/suites/ |
D | test_suite_ccm.function | 38 void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res ) 61 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, 64 decrypt_ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len, 89 size_t key_len, msg_len, iv_len, add_len, tag_len, result_len; 101 iv_len = unhexify( iv, iv_hex ); 109 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, 135 size_t key_len, msg_len, iv_len, add_len, result_len; 149 iv_len = unhexify( iv, iv_hex ); 168 TEST_ASSERT( mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len,
|
D | test_suite_gcm.function | 27 size_t pt_len, iv_len, add_len, tag_len = tag_len_bits / 8; 42 iv_len = unhexify( iv_str, hex_iv_string ); 48 …TEST_ASSERT( mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, pt_len, iv_str, iv_len, add_str… 77 size_t pt_len, iv_len, add_len, tag_len = tag_len_bits / 8; 92 iv_len = unhexify( iv_str, hex_iv_string ); 99 …ret = mbedtls_gcm_auth_decrypt( &ctx, pt_len, iv_str, iv_len, add_str, add_len, tag_str, tag_len, …
|
D | test_suite_cipher.function | 467 size_t key_len, iv_len, cipher_len, clear_len; 486 iv_len = unhexify( iv, hex_iv ); 507 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx, iv, iv_len ) ); 549 size_t key_len, iv_len, cipher_len, clear_len, ad_len, tag_len; 566 iv_len = unhexify( iv, hex_iv ); 577 ret = mbedtls_cipher_auth_decrypt( &ctx, iv, iv_len, ad, ad_len, 603 ret = mbedtls_cipher_auth_encrypt( &ctx, iv, iv_len, ad, ad_len,
|
D | test_suite_pkcs5.data | 113 PBES2 Decrypt (bad enc_scheme_alg params: len != iv_len)
|
/net-tools-3.7.0/mbedtls-2.4.0/include/mbedtls/ |
D | gcm.h | 106 size_t iv_len, 138 size_t iv_len, 161 size_t iv_len,
|
D | ccm.h | 100 const unsigned char *iv, size_t iv_len, 123 const unsigned char *iv, size_t iv_len,
|
D | cipher.h | 498 const unsigned char *iv, size_t iv_len ); 636 const unsigned char *iv, size_t iv_len, 664 const unsigned char *iv, size_t iv_len, 698 const unsigned char *iv, size_t iv_len,
|
/net-tools-3.7.0/mbedtls-2.4.0/tests/scripts/ |
D | gen_gcm_encrypt.pl | 49 my $iv_len = get_suite_val("IVlen"); 64 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
|
D | gen_gcm_decrypt.pl | 66 my $iv_len = get_suite_val("IVlen"); 81 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
|