/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/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 …]
|
D | aes_wrap.h | 53 const u8 *iv, size_t iv_len, 58 const u8 *iv, size_t iv_len, 63 const u8 *iv, size_t iv_len,
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/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 …]
|
D | aes_wrap.h | 53 const u8 *iv, size_t iv_len, 58 const u8 *iv, size_t iv_len, 63 const u8 *iv, size_t iv_len,
|
/third_party/mbedtls/library/ |
D | ccm.c | 203 size_t iv_len) in mbedtls_ccm_starts() argument 206 if (iv_len < 7 || iv_len > 13) { in mbedtls_ccm_starts() 211 ctx->q = 16 - 1 - (unsigned char) iv_len; in mbedtls_ccm_starts() 225 memcpy(ctx->ctr + 1, iv, iv_len); in mbedtls_ccm_starts() 226 memset(ctx->ctr + 1 + iv_len, 0, ctx->q); in mbedtls_ccm_starts() 232 memcpy(ctx->y + 1, iv, iv_len); in mbedtls_ccm_starts() 474 const unsigned char *iv, size_t iv_len, in ccm_auth_crypt() argument 482 if ((ret = mbedtls_ccm_starts(ctx, mode, iv, iv_len)) != 0) { in ccm_auth_crypt() 510 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_star_encrypt_and_tag() argument 515 return ccm_auth_crypt(ctx, MBEDTLS_CCM_STAR_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_star_encrypt_and_tag() [all …]
|
D | cipher.c | 354 size_t iv_len) in mbedtls_cipher_set_iv() argument 371 if (iv_len > MBEDTLS_MAX_IV_LENGTH) { in mbedtls_cipher_set_iv() 376 actual_iv_size = iv_len; in mbedtls_cipher_set_iv() 381 if (actual_iv_size > iv_len) { in mbedtls_cipher_set_iv() 391 if (iv_len != 12) { in mbedtls_cipher_set_iv() 403 iv_len != 12) { in mbedtls_cipher_set_iv() 413 iv, iv_len); in mbedtls_cipher_set_iv() 439 iv, iv_len); in mbedtls_cipher_set_iv() 1212 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_crypt() argument 1254 status = psa_cipher_set_iv(&cipher_op, iv, iv_len); in mbedtls_cipher_crypt() [all …]
|
D | ssl_tls13_keys.c | 230 unsigned char *iv, size_t iv_len) in ssl_tls13_make_traffic_key() argument 249 iv, iv_len); in ssl_tls13_make_traffic_key() 273 size_t key_len, size_t iv_len, in mbedtls_ssl_tls13_make_traffic_keys() argument 281 keys->client_write_iv, iv_len); in mbedtls_ssl_tls13_make_traffic_keys() 289 keys->server_write_iv, iv_len); in mbedtls_ssl_tls13_make_traffic_keys() 295 keys->iv_len = iv_len; in mbedtls_ssl_tls13_make_traffic_keys() 997 memcpy(transform->iv_enc, iv_enc, traffic_keys->iv_len); in mbedtls_ssl_tls13_populate_transform() 998 memcpy(transform->iv_dec, iv_dec, traffic_keys->iv_len); in mbedtls_ssl_tls13_populate_transform() 1026 transform->ivlen = traffic_keys->iv_len; in mbedtls_ssl_tls13_populate_transform() 1084 size_t *key_len, size_t *iv_len) in ssl_tls13_get_cipher_key_info() argument [all …]
|
D | gcm.c | 261 const unsigned char *iv, size_t iv_len) in mbedtls_gcm_starts() argument 271 if (iv_len == 0 || (uint64_t) iv_len >> 61 != 0) { in mbedtls_gcm_starts() 282 if (iv_len == 12) { in mbedtls_gcm_starts() 283 memcpy(ctx->y, iv, iv_len); in mbedtls_gcm_starts() 287 iv_bits = (uint64_t) iv_len * 8; in mbedtls_gcm_starts() 291 while (iv_len > 0) { in mbedtls_gcm_starts() 292 use_len = (iv_len < 16) ? iv_len : 16; in mbedtls_gcm_starts() 298 iv_len -= use_len; in mbedtls_gcm_starts() 560 size_t iv_len, in mbedtls_gcm_crypt_and_tag() argument 571 if ((ret = mbedtls_gcm_starts(ctx, mode, iv, iv_len)) != 0) { in mbedtls_gcm_crypt_and_tag() [all …]
|
/third_party/openssl/ohos_lite/include/crypto/ |
D | evp.h | 136 int iv_len; member 248 key_len, iv_len, flags, init_key, cleanup, \ argument 251 nid##_##nmode, block_size, key_len, iv_len, \ 264 iv_len, flags, init_key, cleanup, set_asn1, \ argument 267 iv_len, flags, init_key, cleanup, set_asn1, get_asn1, ctrl) 270 iv_len, cbits, flags, init_key, cleanup, \ argument 273 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 277 iv_len, cbits, flags, init_key, cleanup, \ argument 280 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 290 nid, block_size, key_len, iv_len, cbits, flags, \ argument [all …]
|
/third_party/mbedtls/include/mbedtls/ |
D | ccm.h | 179 const unsigned char *iv, size_t iv_len, 228 const unsigned char *iv, size_t iv_len, 265 const unsigned char *iv, size_t iv_len, 311 const unsigned char *iv, size_t iv_len, 347 size_t iv_len);
|
D | gcm.h | 168 size_t iv_len, 212 size_t iv_len, 236 size_t iv_len);
|
/third_party/node/deps/openssl/openssl/providers/implementations/kdfs/ |
D | kbkdf.c | 70 size_t iv_len; member 144 OPENSSL_clear_free(ctx->iv, ctx->iv_len); in kbkdf_reset() 152 size_t iv_len, unsigned char *label, size_t label_len, in derive() argument 159 size_t written = 0, to_write, k_i_len = iv_len; in derive() 175 if (iv_len > 0) in derive() 176 memcpy(k_i, iv, iv_len); in derive() 246 if (ctx->iv_len != 0 && ctx->iv_len != h) { in kbkdf_derive() 258 ret = derive(ctx->ctx_init, ctx->mode, ctx->iv, ctx->iv_len, ctx->label, in kbkdf_derive() 325 if (p != NULL && !kbkdf_set_buffer(&ctx->iv, &ctx->iv_len, p)) in kbkdf_set_ctx_params()
|
/third_party/openssl/providers/implementations/kdfs/ |
D | kbkdf.c | 70 size_t iv_len; member 144 OPENSSL_clear_free(ctx->iv, ctx->iv_len); in kbkdf_reset() 152 size_t iv_len, unsigned char *label, size_t label_len, in derive() argument 159 size_t written = 0, to_write, k_i_len = iv_len; in derive() 175 if (iv_len > 0) in derive() 176 memcpy(k_i, iv, iv_len); in derive() 246 if (ctx->iv_len != 0 && ctx->iv_len != h) { in kbkdf_derive() 258 ret = derive(ctx->ctx_init, ctx->mode, ctx->iv, ctx->iv_len, ctx->label, in kbkdf_derive() 325 if (p != NULL && !kbkdf_set_buffer(&ctx->iv, &ctx->iv_len, p)) in kbkdf_set_ctx_params()
|
/third_party/node/deps/openssl/openssl/include/crypto/ |
D | evp.h | 296 int iv_len; member 435 key_len, iv_len, flags, init_key, cleanup, \ argument 438 nid##_##nmode, block_size, key_len, iv_len, \ 452 iv_len, flags, init_key, cleanup, set_asn1, \ argument 455 iv_len, flags, init_key, cleanup, set_asn1, get_asn1, ctrl) 458 iv_len, cbits, flags, init_key, cleanup, \ argument 461 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 465 iv_len, cbits, flags, init_key, cleanup, \ argument 468 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 478 nid, block_size, key_len, iv_len, cbits, flags, \ argument [all …]
|
/third_party/openssl/include/crypto/ |
D | evp.h | 296 int iv_len; member 435 key_len, iv_len, flags, init_key, cleanup, \ argument 438 nid##_##nmode, block_size, key_len, iv_len, \ 452 iv_len, flags, init_key, cleanup, set_asn1, \ argument 455 iv_len, flags, init_key, cleanup, set_asn1, get_asn1, ctrl) 458 iv_len, cbits, flags, init_key, cleanup, \ argument 461 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 465 iv_len, cbits, flags, init_key, cleanup, \ argument 468 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 478 nid, block_size, key_len, iv_len, cbits, flags, \ argument [all …]
|
/third_party/node/deps/openssl/openssl/crypto/evp/ |
D | cmeth_lib.c | 66 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) in EVP_CIPHER_meth_set_iv_length() argument 68 if (cipher->iv_len != 0) in EVP_CIPHER_meth_set_iv_length() 71 cipher->iv_len = iv_len; in EVP_CIPHER_meth_set_iv_length()
|
/third_party/openssl/crypto/evp/ |
D | cmeth_lib.c | 66 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) in EVP_CIPHER_meth_set_iv_length() argument 68 if (cipher->iv_len != 0) in EVP_CIPHER_meth_set_iv_length() 71 cipher->iv_len = iv_len; in EVP_CIPHER_meth_set_iv_length()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/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()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/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()
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_cipher.function | 361 size_t length = length_val, outlen, total_len, i, block_size, iv_len; 418 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes. 422 iv_len = 12; 424 iv_len = sizeof(iv); 427 TEST_ASSERT(0 == mbedtls_cipher_set_iv(&ctx_dec, iv, iv_len)); 428 TEST_ASSERT(0 == mbedtls_cipher_set_iv(&ctx_enc, iv, iv_len)); 560 size_t iv_len = 16; 583 iv_len = 12; 586 ASSERT_ALLOC(iv, iv_len); 587 memset(iv, 0, iv_len); [all …]
|
/third_party/openssl/ssl/ |
D | ktls.c | 70 crypto_info->iv_len = EVP_CIPHER_CTX_get_iv_length(dd); in ktls_configure_crypto() 71 if (crypto_info->iv_len < 0) in ktls_configure_crypto() 75 crypto_info->iv_len = EVP_GCM_TLS_FIXED_IV_LEN; in ktls_configure_crypto() 93 crypto_info->iv_len = EVP_CIPHER_get_iv_length(c); in ktls_configure_crypto()
|
/third_party/node/deps/openssl/openssl/ssl/ |
D | ktls.c | 70 crypto_info->iv_len = EVP_CIPHER_CTX_get_iv_length(dd); in ktls_configure_crypto() 71 if (crypto_info->iv_len < 0) in ktls_configure_crypto() 75 crypto_info->iv_len = EVP_GCM_TLS_FIXED_IV_LEN; in ktls_configure_crypto() 93 crypto_info->iv_len = EVP_CIPHER_get_iv_length(c); in ktls_configure_crypto()
|
/third_party/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");
|