| /freebsd-11-stable/contrib/wpa/src/crypto/ |
| HD | 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 …]
|
| HD | 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 …]
|
| HD | 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,
|
| /freebsd-11-stable/crypto/openssl/crypto/evp/ |
| HD | evp_locl.h | 135 key_len, iv_len, flags, init_key, cleanup, \ argument 138 nid##_##nmode, block_size, key_len, iv_len, \ 151 iv_len, flags, init_key, cleanup, set_asn1, \ argument 154 iv_len, flags, init_key, cleanup, set_asn1, get_asn1, ctrl) 157 iv_len, cbits, flags, init_key, cleanup, \ argument 160 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 164 iv_len, cbits, flags, init_key, cleanup, \ argument 167 key_len, iv_len, flags, init_key, cleanup, set_asn1, \ 177 nid, block_size, key_len, iv_len, cbits, flags, \ argument 179 BLOCK_CIPHER_def_cbc(cname, kstruct, nid, block_size, key_len, iv_len, flags, \ [all …]
|
| HD | openbsd_hw.c | 141 assert(ctx->cipher->iv_len <= MAX_HW_IV); 176 if (ctx->cipher->iv_len) 180 memcpy(lb, &in[cryp.len - ctx->cipher->iv_len], ctx->cipher->iv_len); 230 memcpy(ctx->iv, &out[cryp.len - ctx->cipher->iv_len], 231 ctx->cipher->iv_len); 233 memcpy(ctx->iv, lb, ctx->cipher->iv_len);
|
| HD | evp_lib.c | 267 return cipher->iv_len; in EVP_CIPHER_iv_length() 272 return ctx->cipher->iv_len; in EVP_CIPHER_CTX_iv_length()
|
| HD | evp_key.c | 134 niv = type->iv_len; in EVP_BytesToKey()
|
| /freebsd-11-stable/contrib/subversion/subversion/libsvn_subr/ |
| HD | crypto.c | 262 apr_size_t iv_len; in svn_crypto__encrypt_password() local 281 apr_err = apr_crypto_passphrase(&key, &iv_len, in svn_crypto__encrypt_password() 295 if (iv_len == 0) in svn_crypto__encrypt_password() 300 SVN_ERR(get_random_bytes(&iv_vector, ctx, iv_len, result_pool)); in svn_crypto__encrypt_password() 377 *iv = wrap_as_string(iv_vector, iv_len, result_pool); in svn_crypto__encrypt_password() 404 apr_size_t block_size, iv_len; in svn_crypto__decrypt_password() local 410 apr_err = apr_crypto_passphrase(&key, &iv_len, in svn_crypto__decrypt_password() 423 if (iv_len == 0) in svn_crypto__decrypt_password() 426 if (iv_len != iv->len) in svn_crypto__decrypt_password() 499 apr_size_t iv_len; in svn_crypto__generate_secret_checktext() local [all …]
|
| /freebsd-11-stable/sys/dev/cxgbe/crypto/ |
| HD | t4_crypto.c | 154 unsigned int iv_len; member 604 s->blkcipher.iv_len)) { in ccr_blkcipher() 619 wr_len = roundup2(transhdr_len, 16) + s->blkcipher.iv_len + in ccr_blkcipher() 638 memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); in ccr_blkcipher() 640 arc4rand(iv, s->blkcipher.iv_len, 0); in ccr_blkcipher() 643 crd->crd_inject, s->blkcipher.iv_len, iv); in ccr_blkcipher() 646 memcpy(iv, crd->crd_iv, s->blkcipher.iv_len); in ccr_blkcipher() 649 crd->crd_inject, s->blkcipher.iv_len, iv); in ccr_blkcipher() 663 crwr->sec_cpl.pldlen = htobe32(s->blkcipher.iv_len + crd->crd_len); in ccr_blkcipher() 666 V_CPL_TX_SEC_PDU_CIPHERSTART(s->blkcipher.iv_len + 1) | in ccr_blkcipher() [all …]
|
| /freebsd-11-stable/contrib/wpa/src/eap_common/ |
| HD | 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()
|
| HD | eap_sake_common.h | 76 size_t iv_len; member
|
| /freebsd-11-stable/tools/tools/crypto/ |
| HD | cryptocheck.c | 522 u_int iv_len, key_len; in run_blkcipher_test() local 535 iv_len = EVP_CIPHER_iv_length(cipher); in run_blkcipher_test() 538 iv = generate_iv(iv_len, alg); in run_blkcipher_test() 598 const char *iv, size_t iv_len, const char *auth_key, size_t auth_key_len, in ocf_authenc() argument 630 caead.ivlen = iv_len; in ocf_authenc() 679 u_int iv_len, auth_key_len, cipher_key_len, digest_len; in run_authenc_test() local 698 iv_len = EVP_CIPHER_iv_length(cipher); in run_authenc_test() 702 iv = generate_iv(iv_len, alg); in run_authenc_test() 724 if (!ocf_authenc(alg, cipher_key, cipher_key_len, iv, iv_len, auth_key, in run_authenc_test() 752 if (!ocf_authenc(alg, cipher_key, cipher_key_len, iv, iv_len, auth_key, in run_authenc_test() [all …]
|
| /freebsd-11-stable/sys/dev/cxgbe/tom/ |
| HD | t4_tls.c | 1011 void *iv_buffer, int iv_len, int nsegs, int n) in write_tlstx_sgl() argument 1054 rc = sglist_append(&sg, iv_buffer, iv_len); in write_tlstx_sgl() 1096 u_int expn_size, iv_len, pdus, sndptroff; in t4_push_tls_records() local 1212 iv_len = pdus * CIPHER_BLOCK_SIZE; in t4_push_tls_records() 1268 if (wr_len + iv_len <= space) { in t4_push_tls_records() 1270 wr_len += iv_len; in t4_push_tls_records() 1279 iv_buffer = malloc(iv_len, M_CXGBE, M_NOWAIT); in t4_push_tls_records() 1291 __func__, toep->tid, iv_len); in t4_push_tls_records() 1304 int n = sglist_count(iv_buffer, iv_len); in t4_push_tls_records() 1341 buf = (char *)iv_dst + iv_len; in t4_push_tls_records() [all …]
|
| /freebsd-11-stable/contrib/wpa/src/tls/ |
| HD | pkcs5.c | 34 size_t iv_len; member 270 params->iv_len = hdr.length; in pkcs5_get_params_pbes2() 271 wpa_hexdump(MSG_DEBUG, "PKCS #5: IV", params->iv, params->iv_len); in pkcs5_get_params_pbes2() 389 params->iv_len != 8) in pkcs5_crypto_init_pbes2() 402 wpa_hexdump(MSG_DEBUG, "PKCS #5: DES IV", params->iv, params->iv_len); in pkcs5_crypto_init_pbes2()
|
| /freebsd-11-stable/crypto/openssl/crypto/pem/ |
| HD | pem_lib.c | 383 OPENSSL_assert(enc->iv_len <= (int)sizeof(iv)); in PEM_ASN1_write_bio() 384 if (RAND_bytes(iv, enc->iv_len) <= 0) /* Generate a salt */ in PEM_ASN1_write_bio() 396 OPENSSL_assert(strlen(objstr) + 23 + 2 * enc->iv_len + 13 <= in PEM_ASN1_write_bio() 401 PEM_dek_info(buf, objstr, enc->iv_len, (char *)iv); in PEM_ASN1_write_bio() 543 if (!load_iv(header_pp, &(cipher->iv[0]), enc->iv_len)) in PEM_get_EVP_CIPHER_INFO()
|
| HD | pem_info.c | 356 OPENSSL_assert(strlen(objstr) + 23 + 2 * enc->iv_len + 13 <= in PEM_X509_INFO_write_bio() 360 PEM_dek_info(buf, objstr, enc->iv_len, (char *)iv); in PEM_X509_INFO_write_bio()
|
| /freebsd-11-stable/crypto/openssl/crypto/engine/ |
| HD | eng_cryptodev.c | 434 if (ctx->cipher->iv_len) { in cryptodev_cipher() 437 iiv = in + inl - ctx->cipher->iv_len; in cryptodev_cipher() 438 memcpy(save_iv, iiv, ctx->cipher->iv_len); in cryptodev_cipher() 451 if (ctx->cipher->iv_len) { in cryptodev_cipher() 453 iiv = out + inl - ctx->cipher->iv_len; in cryptodev_cipher() 456 memcpy(ctx->iv, iiv, ctx->cipher->iv_len); in cryptodev_cipher() 471 ctx->cipher->iv_len <= ciphers[i].ivmax && in cryptodev_init_key()
|
| /freebsd-11-stable/sys/mips/rmi/dev/sec/ |
| HD | rmilib.c | 144 int iv_len; in xlr_sec_setup() local 184 iv_len = 0; in xlr_sec_setup() 188 iv_len = XLR_SEC_DES_IV_LENGTH; in xlr_sec_setup() 193 iv_len = XLR_SEC_AES_IV_LENGTH; in xlr_sec_setup() 196 iv_len = XLR_SEC_ARC4_IV_LENGTH; in xlr_sec_setup() 199 iv_len = XLR_SEC_KASUMI_F8_IV_LENGTH; in xlr_sec_setup() 207 size = op->source_buf_size + iv_len; in xlr_sec_setup() 226 memcpy(desc->user.aligned_src, &op->initial_vector[0], iv_len); in xlr_sec_setup() 229 memcpy((uint8_t *) (desc->user.aligned_src + iv_len), in xlr_sec_setup() 238 op->source_buf_size += iv_len; in xlr_sec_setup() [all …]
|
| /freebsd-11-stable/crypto/openssh/ |
| HD | cipher.c | 74 u_int iv_len; /* defaults to block_size */ member 201 return (c->iv_len != 0 || (c->flags & CFLAG_CHACHAPOLY) != 0) ? in cipher_ivlen() 202 c->iv_len : c->block_size; in cipher_ivlen()
|
| HD | cipher-ctr.c | 134 aes_ctr.iv_len = AES_BLOCK_SIZE; in evp_aes_128_ctr()
|
| HD | cipher-3des1.c | 150 ssh1_3des.iv_len = 0; in evp_ssh1_3des()
|
| HD | cipher-aes.c | 150 rijndal_cbc.iv_len = RIJNDAEL_BLOCKSIZE; in evp_rijndael()
|
| HD | kex.c | 568 explicit_bzero(newkeys->enc.iv, newkeys->enc.iv_len); in kex_free_newkeys() 664 enc->iv_len = cipher_ivlen(enc->cipher); in choose_enc() 861 need = MAXIMUM(need, newkeys->enc.iv_len); in kex_choose_conf() 865 dh_need = MAXIMUM(dh_need, newkeys->enc.iv_len); in kex_choose_conf()
|
| /freebsd-11-stable/crypto/openssl/ssl/ |
| HD | s2_enc.c | 107 OPENSSL_assert(c->iv_len <= (int)sizeof(s->session->key_arg)); in ssl2_enc_init()
|
| HD | t1_enc.c | 358 c->nid, c->block_size, c->key_len, c->iv_len); in tls1_change_cipher_state() 561 for (i = 0; i < c->iv_len; i++) in tls1_change_cipher_state() 872 DES_SCHEDULE_SZ, ds->cipher->iv_len); in tls1_enc() 874 for (i = 0; i < ds->cipher->iv_len; i++) in tls1_enc()
|