| /netbsd/src/crypto/external/cpl/trousers/dist/src/trspi/crypto/openssl/ |
| D | symmetric.c | 261 int iv_len, outiv_len; in Trspi_SymEncrypt() local 274 iv_len = EVP_CIPHER_iv_length(cipher); in Trspi_SymEncrypt() 276 def_iv = malloc(iv_len); in Trspi_SymEncrypt() 278 LogError("malloc of %d bytes failed.", iv_len); in Trspi_SymEncrypt() 281 RAND_bytes(def_iv, iv_len); in Trspi_SymEncrypt() 283 memcpy(out, def_iv, iv_len); in Trspi_SymEncrypt() 284 outiv_ptr = &out[iv_len]; in Trspi_SymEncrypt() 285 outiv_len -= iv_len; in Trspi_SymEncrypt() 319 *out_len += iv_len; in Trspi_SymEncrypt() 335 int iv_len, iniv_len; in Trspi_SymDecrypt() local [all …]
|
| /netbsd/src/external/bsd/wpa/dist/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,
|
| /netbsd/src/crypto/external/bsd/openssl/dist/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()
|
| D | evp_lib.c | 258 asn1_params->iv_len = i; in evp_cipher_get_asn1_aead_params() 271 asn1_params->iv_len); in evp_cipher_set_asn1_aead_params() 366 cipher->iv_len = ivlen; in evp_cipher_cache_constants() 502 return cipher->iv_len; in EVP_CIPHER_get_iv_length() 507 if (ctx->iv_len < 0) { in EVP_CIPHER_CTX_get_iv_length() 536 ((EVP_CIPHER_CTX *)ctx)->iv_len = len; in EVP_CIPHER_CTX_get_iv_length() 538 return ctx->iv_len; in EVP_CIPHER_CTX_get_iv_length()
|
| D | evp_enc.c | 46 ctx->iv_len = -1; in EVP_CIPHER_CTX_reset() 65 ctx->iv_len = -1; in EVP_CIPHER_CTX_reset() 93 ctx->iv_len = -1; in evp_cipher_init_internal() 1138 ctx->iv_len = -1; in EVP_CIPHER_CTX_ctrl() 1145 ctx->iv_len = -1; in EVP_CIPHER_CTX_ctrl() 1310 ctx->iv_len = -1; in EVP_CIPHER_CTX_set_params()
|
| D | evp_local.h | 49 int iv_len; /* IV length */ member
|
| /netbsd/src/external/bsd/wpa/dist/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()
|
| D | eap_sake_common.h | 76 size_t iv_len; member
|
| D | eap_sake_common.c | 106 attr->iv_len = len; in eap_sake_parse_add_attr()
|
| /netbsd/src/crypto/external/bsd/heimdal/dist/lib/hcrypto/ |
| D | evp-wincng.c | 74 ctx->cipher->iv_len ? ctx->iv : NULL, in wincng_do_cipher() 75 ctx->cipher->iv_len, in wincng_do_cipher() 85 ctx->cipher->iv_len ? ctx->iv : NULL, in wincng_do_cipher() 86 ctx->cipher->iv_len, in wincng_do_cipher() 222 iv_len, flags) \ argument 229 iv_len, \
|
| D | evp-pkcs11.c | 316 ctx->cipher->iv_len ? ctx->iv : NULL, in p11_key_init() 317 ctx->cipher->iv_len in p11_key_init() 483 key_len, iv_len, flags) \ argument 490 iv_len, \
|
| D | evp.h | 153 int iv_len; member
|
| D | evp-openssl.c | 220 hc_evp->iv_len = EVP_CIPHER_iv_length(ossl_evp); in get_EVP_CIPHER_once_cb()
|
| /netbsd/src/crypto/external/bsd/openssl/dist/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()
|
| /netbsd/src/external/bsd/wpa/dist/src/tls/ |
| D | pkcs5.c | 34 size_t iv_len; member 254 params->iv_len = hdr.length; in pkcs5_get_params_pbes2() 255 wpa_hexdump(MSG_DEBUG, "PKCS #5: IV", params->iv, params->iv_len); in pkcs5_get_params_pbes2() 367 params->iv_len != 8) in pkcs5_crypto_init_pbes2() 380 wpa_hexdump(MSG_DEBUG, "PKCS #5: DES IV", params->iv, params->iv_len); in pkcs5_crypto_init_pbes2()
|
| /netbsd/src/crypto/external/bsd/openssl/dist/test/ |
| D | acvp_test.c | 674 const unsigned char *iv, size_t iv_len, in cipher_enc() argument 708 tst->iv, tst->iv_len, in cipher_enc_dec_test() 712 tst->iv, tst->iv_len, in cipher_enc_dec_test() 719 const unsigned char *iv, size_t iv_len, in aes_ccm_enc_dec() argument 737 || !TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, in aes_ccm_enc_dec() 789 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test() 793 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test() 798 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test() 806 const unsigned char *iv, size_t iv_len, in aes_gcm_enc_dec() argument 824 || !TEST_int_gt(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, in aes_gcm_enc_dec() [all …]
|
| D | evp_test.c | 530 size_t iv_len; member 627 return parse_bin(value, &cdat->iv, &cdat->iv_len); in cipher_test_parse() 629 return parse_bin(value, &cdat->next_iv, &cdat->iv_len); in cipher_test_parse() 762 expected->iv_len, 0) <= 0) { in cipher_test_enc() 766 } else if (expected->iv_len != (size_t)EVP_CIPHER_CTX_get_iv_length(ctx_base)) { in cipher_test_enc() 823 && !TEST_mem_eq(expected->iv, expected->iv_len, iv, in cipher_test_enc() 824 expected->iv_len))) { in cipher_test_enc() 974 tmplen -= expected->iv_len; in cipher_test_enc() 975 expected_out += expected->iv_len; in cipher_test_enc() 976 out_misalign += expected->iv_len; in cipher_test_enc() [all …]
|
| /netbsd/src/crypto/external/bsd/openssh/dist/ |
| D | cipher.c | 102 u_int iv_len; /* defaults to block_size */ member 215 return (c->iv_len != 0 || (c->flags & CFLAG_CHACHAPOLY) != 0) ? in cipher_ivlen() 216 c->iv_len : c->block_size; in cipher_ivlen()
|
| D | kex.c | 699 explicit_bzero(newkeys->enc.iv, newkeys->enc.iv_len); in kex_free_newkeys() 810 enc->iv_len = cipher_ivlen(enc->cipher); in choose_enc() 1064 need = MAXIMUM(need, newkeys->enc.iv_len); in kex_choose_conf() 1068 dh_need = MAXIMUM(dh_need, newkeys->enc.iv_len); in kex_choose_conf()
|
| D | kex.h | 117 u_int iv_len; member
|
| D | cipher-ctr-mt.c | 464 aes_ctr.iv_len = AES_BLOCK_SIZE; in evp_aes_ctr_mt()
|
| D | packet.c | 989 enc->iv, enc->iv_len, crypt_type)) != 0) in ssh_set_newkeys() 2378 if ((r = cipher_get_keyiv(cc, enc->iv, enc->iv_len)) != 0) in newkeys_to_blob() 2386 (r = sshbuf_put_string(b, enc->iv, enc->iv_len)) != 0) in newkeys_to_blob() 2487 enc->iv_len = ivlen; in newkeys_from_blob()
|
| /netbsd/src/crypto/external/bsd/openssl/dist/crypto/cms/ |
| D | cms_enc.c | 176 aparams.iv_len = ivlen; in ossl_cms_EncryptedContent_init_bio()
|