Home
last modified time | relevance | path

Searched refs:iv_len (Results 1 – 19 of 19) sorted by relevance

/mbedtls-development/library/
A Dccm.c206 size_t iv_len ) in mbedtls_ccm_starts() argument
209 if( iv_len < 7 || iv_len > 13 ) in mbedtls_ccm_starts()
213 ctx->q = 16 - 1 - (unsigned char) iv_len; in mbedtls_ccm_starts()
227 memcpy( ctx->ctr + 1, iv, iv_len ); in mbedtls_ccm_starts()
228 memset( ctx->ctr + 1 + iv_len, 0, ctx->q ); in mbedtls_ccm_starts()
234 memcpy( ctx->y + 1, iv, iv_len ); in mbedtls_ccm_starts()
569 iv, iv_len, add, add_len, in ccm_auth_decrypt()
585 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_star_auth_decrypt() argument
591 iv, iv_len, add, add_len, in mbedtls_ccm_star_auth_decrypt()
596 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_auth_decrypt() argument
[all …]
A Dcipher.c373 size_t iv_len ) in mbedtls_cipher_set_iv() argument
378 CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL ); in mbedtls_cipher_set_iv()
392 if( iv_len > MBEDTLS_MAX_IV_LENGTH ) in mbedtls_cipher_set_iv()
396 actual_iv_size = iv_len; in mbedtls_cipher_set_iv()
402 if( actual_iv_size > iv_len ) in mbedtls_cipher_set_iv()
423 iv, iv_len ) ); in mbedtls_cipher_set_iv()
448 iv, iv_len ) ); in mbedtls_cipher_set_iv()
1262 CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL ); in mbedtls_cipher_crypt()
1379 iv, iv_len, in mbedtls_cipher_aead_encrypt()
1459 iv, iv_len, in mbedtls_cipher_aead_decrypt()
[all …]
A Dgcm.c250 const unsigned char *iv, size_t iv_len ) in mbedtls_gcm_starts() argument
263 if( iv_len == 0 || (uint64_t) iv_len >> 61 != 0 ) in mbedtls_gcm_starts()
273 if( iv_len == 12 ) in mbedtls_gcm_starts()
275 memcpy( ctx->y, iv, iv_len ); in mbedtls_gcm_starts()
281 MBEDTLS_PUT_UINT32_BE( iv_len * 8, work_buf, 12 ); in mbedtls_gcm_starts()
284 while( iv_len > 0 ) in mbedtls_gcm_starts()
286 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts()
293 iv_len -= use_len; in mbedtls_gcm_starts()
570 size_t iv_len, in mbedtls_gcm_crypt_and_tag() argument
607 size_t iv_len, in mbedtls_gcm_auth_decrypt() argument
[all …]
A Dssl_tls13_keys.c203 size_t slen, size_t key_len, size_t iv_len, in mbedtls_ssl_tls1_3_make_traffic_keys() argument
228 keys->client_write_iv, iv_len ); in mbedtls_ssl_tls1_3_make_traffic_keys()
236 keys->server_write_iv, iv_len ); in mbedtls_ssl_tls1_3_make_traffic_keys()
241 keys->iv_len = iv_len; in mbedtls_ssl_tls1_3_make_traffic_keys()
862 memcpy( transform->iv_enc, iv_enc, traffic_keys->iv_len ); in mbedtls_ssl_tls13_populate_transform()
863 memcpy( transform->iv_dec, iv_dec, traffic_keys->iv_len ); in mbedtls_ssl_tls13_populate_transform()
890 transform->ivlen = traffic_keys->iv_len; in mbedtls_ssl_tls13_populate_transform()
1032 traffic_keys->iv_len); in mbedtls_ssl_tls13_generate_handshake_keys()
1036 traffic_keys->iv_len); in mbedtls_ssl_tls13_generate_handshake_keys()
A Dpem.c55 size_t iv_len ) in pem_get_iv() argument
59 memset( iv, 0, iv_len ); in pem_get_iv()
61 for( i = 0; i < iv_len * 2; i++, s++ ) in pem_get_iv()
A Dssl_tls13_keys.h154 size_t slen, size_t key_len, size_t iv_len,
A Dssl_misc.h505 size_t iv_len; /*!< The length of client_write_iv and member
/mbedtls-development/include/mbedtls/
A Dccm.h180 const unsigned char *iv, size_t iv_len,
229 const unsigned char *iv, size_t iv_len,
266 const unsigned char *iv, size_t iv_len,
312 const unsigned char *iv, size_t iv_len,
348 size_t iv_len );
A Dgcm.h169 size_t iv_len,
213 size_t iv_len,
237 size_t iv_len );
A Dcipher.h784 size_t iv_len );
967 const unsigned char *iv, size_t iv_len,
1017 const unsigned char *iv, size_t iv_len,
1073 const unsigned char *iv, size_t iv_len,
/mbedtls-development/tests/scripts/
A Dgen_gcm_encrypt.pl64 my $iv_len = get_suite_val("IVlen");
79 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
A Dgen_gcm_decrypt.pl81 my $iv_len = get_suite_val("IVlen");
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 )
138 void ccm_star_lengths( int msg_len, int iv_len, int add_len, int tag_len,
162 TEST_ASSERT( mbedtls_ccm_star_encrypt_and_tag( &ctx, msg_len, iv, iv_len,
165 decrypt_ret = mbedtls_ccm_star_auth_decrypt( &ctx, msg_len, iv, iv_len, add,
331 size_t iv_len, expected_tag_len;
361 iv_len = sizeof( iv );
367 TEST_EQUAL( mbedtls_ccm_star_encrypt_and_tag( &ctx, msg->len, iv, iv_len,
377 .len = iv_len };
415 size_t iv_len, expected_tag_len;
440 iv_len = sizeof( iv );
[all …]
A Dtest_suite_cipher.function346 size_t length = length_val, outlen, total_len, i, block_size, iv_len;
405 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes.
408 iv_len = sizeof(iv);
410 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, iv_len ) );
411 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, iv_len ) );
606 size_t iv_len;
652 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes.
655 iv_len = sizeof(iv);
657 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, iv_len ) );
658 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, iv_len ) );
A Dtest_suite_pkcs5.data201 PBES2 Decrypt (bad enc_scheme_alg params: len != iv_len)
A Dtest_suite_ssl.function3747 keys.iv_len,
3751 keys.iv_len,
3988 keys.iv_len = server_write_iv->len;
/mbedtls-development/programs/psa/
A Dcrypto_examples.c110 size_t iv_len = 0; in cipher_encrypt() local
116 status = psa_cipher_generate_iv( &operation, iv, iv_size, &iv_len ); in cipher_encrypt()
/mbedtls-development/docs/
A Dgetting_started.md213 size_t iv_len;
248 status = psa_cipher_generate_iv(&operation, iv, sizeof(iv), &iv_len);
/mbedtls-development/
A DChangeLog2381 * Add a check if iv_len is zero in GCM, and return an error if it is zero.

Completed in 42 milliseconds