/external/openthread/third_party/mbedtls/repo/library/ |
D | ccm.c | 149 const unsigned char *iv, size_t iv_len, in ccm_auth_crypt() argument 175 if( iv_len < 7 || iv_len > 13 ) in ccm_auth_crypt() 181 q = 16 - 1 - (unsigned char) iv_len; in ccm_auth_crypt() 200 memcpy( b + 1, iv, iv_len ); in ccm_auth_crypt() 257 memcpy( ctr + 1, iv, iv_len ); in ccm_auth_crypt() 258 memset( ctr + 1 + iv_len, 0, q ); in ccm_auth_crypt() 320 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_star_encrypt_and_tag() argument 331 return( ccm_auth_crypt( ctx, CCM_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_star_encrypt_and_tag() 336 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_encrypt_and_tag() argument 350 return( mbedtls_ccm_star_encrypt_and_tag( ctx, length, iv, iv_len, add, in mbedtls_ccm_encrypt_and_tag() [all …]
|
D | cipher.c | 353 size_t iv_len ) in mbedtls_cipher_set_iv() argument 358 CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL ); in mbedtls_cipher_set_iv() 372 if( iv_len > MBEDTLS_MAX_IV_LENGTH ) in mbedtls_cipher_set_iv() 376 actual_iv_size = iv_len; in mbedtls_cipher_set_iv() 382 if( actual_iv_size > iv_len ) in mbedtls_cipher_set_iv() 1189 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_crypt() argument 1197 CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL ); in mbedtls_cipher_crypt() 1241 status = psa_cipher_set_iv( &cipher_op, iv, iv_len ); in mbedtls_cipher_crypt() 1263 if( ( ret = mbedtls_cipher_set_iv( ctx, iv, iv_len ) ) != 0 ) in mbedtls_cipher_crypt() 1288 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_aead_encrypt() argument [all …]
|
D | gcm.c | 251 size_t iv_len, in mbedtls_gcm_starts() argument 268 if( iv_len == 0 || in mbedtls_gcm_starts() 269 ( (uint64_t) iv_len ) >> 61 != 0 || in mbedtls_gcm_starts() 282 if( iv_len == 12 ) in mbedtls_gcm_starts() 284 memcpy( ctx->y, iv, iv_len ); in mbedtls_gcm_starts() 290 iv_bits = (uint64_t)iv_len * 8; in mbedtls_gcm_starts() 294 while( iv_len > 0 ) in mbedtls_gcm_starts() 296 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts() 303 iv_len -= use_len; in mbedtls_gcm_starts() 445 size_t iv_len, in mbedtls_gcm_crypt_and_tag() argument [all …]
|
D | ssl_tls13_keys.c | 200 size_t slen, size_t key_len, size_t iv_len, in mbedtls_ssl_tls1_3_make_traffic_keys() argument 225 keys->client_write_iv, iv_len ); in mbedtls_ssl_tls1_3_make_traffic_keys() 233 keys->server_write_iv, iv_len ); in mbedtls_ssl_tls1_3_make_traffic_keys() 238 keys->iv_len = iv_len; in mbedtls_ssl_tls1_3_make_traffic_keys()
|
/external/wpa_supplicant_8/src/crypto/ |
D | aes-gcm.c | 192 static void aes_gcm_prepare_j0(const u8 *iv, size_t iv_len, const u8 *H, u8 *J0) in aes_gcm_prepare_j0() argument 196 if (iv_len == 12) { in aes_gcm_prepare_j0() 198 os_memcpy(J0, iv, iv_len); in aes_gcm_prepare_j0() 199 os_memset(J0 + iv_len, 0, AES_BLOCK_SIZE - iv_len); in aes_gcm_prepare_j0() 207 ghash(H, iv, iv_len, J0); in aes_gcm_prepare_j0() 209 WPA_PUT_BE64(len_buf + 8, iv_len * 8); in aes_gcm_prepare_j0() 254 int aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ae() argument 267 aes_gcm_prepare_j0(iv, iv_len, H, J0); in aes_gcm_ae() 288 int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ad() argument 301 aes_gcm_prepare_j0(iv, iv_len, H, J0); in aes_gcm_ad() [all …]
|
D | crypto_linux.c | 686 size_t iv_len = AES_BLOCK_SIZE; in aes_128_cbc_oper() local 698 CMSG_SPACE(sizeof(*alg_iv) + iv_len); in aes_128_cbc_oper() 712 hdr->cmsg_len = CMSG_SPACE(sizeof(*alg_iv) + iv_len); in aes_128_cbc_oper() 714 alg_iv->ivlen = iv_len; in aes_128_cbc_oper() 715 os_memcpy(alg_iv->iv, iv, iv_len); in aes_128_cbc_oper() 795 size_t iv_len = 8; in aes_unwrap() local 801 io[0].iov_base = (void *) (cipher + iv_len); in aes_unwrap() 807 CMSG_SPACE(sizeof(*alg_iv) + iv_len); in aes_unwrap() 821 hdr->cmsg_len = CMSG_SPACE(sizeof(*alg_iv) + iv_len); in aes_unwrap() 823 alg_iv->ivlen = iv_len; in aes_unwrap() [all …]
|
/external/mbedtls/library/ |
D | ccm.c | 206 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() 489 const unsigned char *iv, size_t iv_len, in ccm_auth_crypt() argument 497 if( ( ret = mbedtls_ccm_starts( ctx, mode, iv, iv_len ) ) != 0 ) in ccm_auth_crypt() 520 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_star_encrypt_and_tag() argument 525 return( ccm_auth_crypt( ctx, MBEDTLS_CCM_STAR_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_star_encrypt_and_tag() [all …]
|
D | cipher.c | 341 size_t iv_len ) in mbedtls_cipher_set_iv() argument 358 if( iv_len > MBEDTLS_MAX_IV_LENGTH ) in mbedtls_cipher_set_iv() 362 actual_iv_size = iv_len; in mbedtls_cipher_set_iv() 368 if( actual_iv_size > iv_len ) in mbedtls_cipher_set_iv() 378 if( iv_len != 12 ) in mbedtls_cipher_set_iv() 390 iv_len != 12 ) in mbedtls_cipher_set_iv() 400 iv, iv_len ) ); in mbedtls_cipher_set_iv() 425 iv, iv_len ) ); in mbedtls_cipher_set_iv() 1222 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_crypt() argument 1268 status = psa_cipher_set_iv( &cipher_op, iv, iv_len ); in mbedtls_cipher_crypt() [all …]
|
D | ssl_tls13_keys.c | 223 unsigned char *iv, size_t iv_len ) in ssl_tls13_make_traffic_key() argument 241 iv, iv_len ); in ssl_tls13_make_traffic_key() 265 size_t key_len, size_t iv_len, in mbedtls_ssl_tls13_make_traffic_keys() argument 273 keys->client_write_iv, iv_len ); in mbedtls_ssl_tls13_make_traffic_keys() 280 keys->server_write_iv, iv_len ); in mbedtls_ssl_tls13_make_traffic_keys() 285 keys->iv_len = iv_len; in mbedtls_ssl_tls13_make_traffic_keys() 975 memcpy( transform->iv_enc, iv_enc, traffic_keys->iv_len ); in mbedtls_ssl_tls13_populate_transform() 976 memcpy( transform->iv_dec, iv_dec, traffic_keys->iv_len ); in mbedtls_ssl_tls13_populate_transform() 1005 transform->ivlen = traffic_keys->iv_len; in mbedtls_ssl_tls13_populate_transform() 1067 size_t *key_len, size_t *iv_len ) in ssl_tls13_get_cipher_key_info() argument [all …]
|
D | gcm.c | 234 const unsigned char *iv, size_t iv_len ) in mbedtls_gcm_starts() argument 245 if( iv_len == 0 || (uint64_t) iv_len >> 61 != 0 ) in mbedtls_gcm_starts() 255 if( iv_len == 12 ) in mbedtls_gcm_starts() 257 memcpy( ctx->y, iv, iv_len ); in mbedtls_gcm_starts() 263 iv_bits = (uint64_t)iv_len * 8; in mbedtls_gcm_starts() 267 while( iv_len > 0 ) in mbedtls_gcm_starts() 269 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts() 276 iv_len -= use_len; in mbedtls_gcm_starts() 543 size_t iv_len, in mbedtls_gcm_crypt_and_tag() argument 554 if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() [all …]
|
/external/mbedtls/include/mbedtls/ |
D | ccm.h | 180 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 );
|
D | gcm.h | 169 size_t iv_len, 213 size_t iv_len, 237 size_t iv_len );
|
/external/openthread/third_party/mbedtls/repo/include/mbedtls/ |
D | ccm.h | 162 const unsigned char *iv, size_t iv_len, 210 const unsigned char *iv, size_t iv_len, 247 const unsigned char *iv, size_t iv_len, 292 const unsigned char *iv, size_t iv_len,
|
D | gcm.h | 175 size_t iv_len, 219 size_t iv_len, 247 size_t iv_len,
|
D | cipher.h | 696 size_t iv_len ); 863 const unsigned char *iv, size_t iv_len, 921 const unsigned char *iv, size_t iv_len, 980 const unsigned char *iv, size_t iv_len, 1036 const unsigned char *iv, size_t iv_len, 1092 const unsigned char *iv, size_t iv_len,
|
/external/arm-trusted-firmware/drivers/auth/ |
D | crypto_mod.c | 142 unsigned int iv_len, const void *tag, in crypto_mod_auth_decrypt() argument 151 assert((iv_len != 0U) && (iv_len <= CRYPTO_MAX_IV_SIZE)); in crypto_mod_auth_decrypt() 156 key_len, key_flags, iv, iv_len, tag, in crypto_mod_auth_decrypt()
|
/external/boringssl/src/ssl/ |
D | t1_enc.cc | 209 size_t mac_secret_len, key_len, iv_len; in tls1_configure_aead() local 210 if (!get_key_block_lengths(ssl, &mac_secret_len, &key_len, &iv_len, in tls1_configure_aead() 216 const size_t key_block_size = 2 * (mac_secret_len + key_len + iv_len); in tls1_configure_aead() 231 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len, iv_len); in tls1_configure_aead() 236 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len + iv_len, iv_len); in tls1_configure_aead() 240 if (iv_override.size() != iv_len) { in tls1_configure_aead()
|
/external/rust/crates/quiche/deps/boringssl/src/ssl/ |
D | t1_enc.cc | 209 size_t mac_secret_len, key_len, iv_len; in tls1_configure_aead() local 210 if (!get_key_block_lengths(ssl, &mac_secret_len, &key_len, &iv_len, in tls1_configure_aead() 216 const size_t key_block_size = 2 * (mac_secret_len + key_len + iv_len); in tls1_configure_aead() 231 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len, iv_len); in tls1_configure_aead() 236 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len + iv_len, iv_len); in tls1_configure_aead() 240 if (iv_override.size() != iv_len) { in tls1_configure_aead()
|
/external/cronet/third_party/boringssl/src/ssl/ |
D | t1_enc.cc | 209 size_t mac_secret_len, key_len, iv_len; in tls1_configure_aead() local 210 if (!get_key_block_lengths(ssl, &mac_secret_len, &key_len, &iv_len, in tls1_configure_aead() 216 const size_t key_block_size = 2 * (mac_secret_len + key_len + iv_len); in tls1_configure_aead() 231 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len, iv_len); in tls1_configure_aead() 236 iv = key_block.subspan(2 * mac_secret_len + 2 * key_len + iv_len, iv_len); in tls1_configure_aead() 240 if (iv_override.size() != iv_len) { in tls1_configure_aead()
|
/external/openthread/third_party/mbedtls/repo/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, 79 void ccm_star_lengths( int msg_len, int iv_len, int add_len, int tag_len, 103 TEST_ASSERT( mbedtls_ccm_star_encrypt_and_tag( &ctx, msg_len, iv, iv_len, 106 decrypt_ret = mbedtls_ccm_star_auth_decrypt( &ctx, msg_len, iv, iv_len, add, 204 size_t iv_len, tag_len; 221 iv_len = sizeof( iv ); 226 ret = mbedtls_ccm_star_encrypt_and_tag( &ctx, msg->len, iv, iv_len, 254 size_t iv_len, tag_len; [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/cipher/ |
D | e_des.c | 96 out->iv_len = 8; in DEFINE_METHOD_FUNCTION() 123 out->iv_len = 0; in DEFINE_METHOD_FUNCTION() 164 out->iv_len = 8; in DEFINE_METHOD_FUNCTION() 188 out->iv_len = 8; in DEFINE_METHOD_FUNCTION() 216 out->iv_len = 0; in DEFINE_METHOD_FUNCTION() 228 out->iv_len = 0; in DEFINE_METHOD_FUNCTION()
|
/external/wpa_supplicant_8/src/eap_common/ |
D | ikev2_common.c | 434 size_t iv_len; in ikev2_decrypt_payload() local 453 iv_len = encr_alg->block_size; in ikev2_decrypt_payload() 461 if (encrypted_len < iv_len + 1 + integ_alg->hash_len) { in ikev2_decrypt_payload() 468 pos = iv + iv_len; in ikev2_decrypt_payload() 536 size_t iv_len, pad_len; in ikev2_build_encrypted() local 552 iv_len = encr_alg->block_size; in ikev2_build_encrypted() 574 iv = wpabuf_put(msg, iv_len); in ikev2_build_encrypted() 575 if (random_get_bytes(iv, iv_len)) { in ikev2_build_encrypted() 580 pad_len = iv_len - (wpabuf_len(plain) + 1) % iv_len; in ikev2_build_encrypted() 581 if (pad_len == iv_len) in ikev2_build_encrypted()
|
/external/mbedtls/tests/suites/ |
D | test_suite_cipher.function | 379 size_t length = length_val, outlen, total_len, i, block_size, iv_len; 438 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes. 442 iv_len = 12; 444 iv_len = sizeof(iv); 446 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, iv_len ) ); 447 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, iv_len ) ); 579 size_t iv_len = 16; 602 iv_len = 12; 604 ASSERT_ALLOC( iv, iv_len ); 605 memset( iv , 0, iv_len ); [all …]
|
/external/openthread/third_party/mbedtls/repo/tests/scripts/ |
D | gen_gcm_encrypt.pl | 64 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");
|
/external/mbedtls/tests/scripts/ |
D | gen_gcm_encrypt.pl | 64 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");
|