/drivers/staging/wlan-ng/ |
D | p80211wep.c | 152 u8 *iv, u8 *icv) in wep_decrypt() argument 163 key[0] = iv[0]; in wep_decrypt() 164 key[1] = iv[1]; in wep_decrypt() 165 key[2] = iv[2]; in wep_decrypt() 166 keyidx = WEP_KEY(iv[3]); in wep_decrypt() 229 u8 *iv, u8 *icv) in wep_encrypt() argument 246 get_random_bytes(iv, 3); in wep_encrypt() 247 while ((iv[1] == 0xff) && (iv[0] >= 3) && (iv[0] < keylen)) in wep_encrypt() 248 get_random_bytes(iv, 3); in wep_encrypt() 250 iv[3] = (keynum & 0x03) << 6; in wep_encrypt() [all …]
|
/drivers/crypto/nx/ |
D | nx-aes-ccm.c | 139 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument 142 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv() 149 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument 155 memcpy(b0, iv, 16); in generate_b0() 172 static int generate_pat(u8 *iv, in generate_pat() argument 187 memset(iv + 15 - iv[0], 0, iv[0] + 1); in generate_pat() 241 rc = generate_b0(iv, req->assoclen, authsize, nbytes, b0); in generate_pat() 360 u8 *iv = nx_ctx->priv.ccm.iv; in ccm4309_aes_nx_encrypt() local 362 iv[0] = 3; in ccm4309_aes_nx_encrypt() 363 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); in ccm4309_aes_nx_encrypt() [all …]
|
D | nx-aes-gcm.c | 174 desc.info = nx_ctx->priv.gcm.iv; in gcm_aes_nx_crypt() 264 char *iv = nx_ctx->priv.gcm.iv; in gcm_aes_nx_encrypt() local 266 memcpy(iv, req->iv, 12); in gcm_aes_nx_encrypt() 274 char *iv = nx_ctx->priv.gcm.iv; in gcm_aes_nx_decrypt() local 276 memcpy(iv, req->iv, 12); in gcm_aes_nx_decrypt() 284 char *iv = nx_ctx->priv.gcm.iv; in gcm4106_aes_nx_encrypt() local 287 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_encrypt() 288 memcpy(iv + NX_GCM4106_NONCE_LEN, req->iv, 8); in gcm4106_aes_nx_encrypt() 296 char *iv = nx_ctx->priv.gcm.iv; in gcm4106_aes_nx_decrypt() local 299 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_decrypt() [all …]
|
D | nx-aes-ctr.c | 75 memcpy(nx_ctx->priv.ctr.iv, in ctr3686_aes_nx_set_key() 97 csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt() 124 u8 *iv = nx_ctx->priv.ctr.iv; in ctr3686_aes_nx_crypt() local 126 memcpy(iv + CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_crypt() 128 iv[15] = 1; in ctr3686_aes_nx_crypt() 130 desc->info = nx_ctx->priv.ctr.iv; in ctr3686_aes_nx_crypt()
|
D | nx.h | 95 u8 iv[16]; member 104 u8 iv[16]; member 116 u8 iv[16]; member
|
/drivers/staging/rtl8192u/ieee80211/ |
D | cipher.c | 102 u8 *iv = info; in cbc_process() local 105 if (!iv) in cbc_process() 109 tfm->crt_u.cipher.cit_xor_block(iv, src); in cbc_process() 110 fn(crypto_tfm_ctx(tfm), dst, iv); in cbc_process() 111 memcpy(iv, dst, crypto_tfm_alg_blocksize(tfm)); in cbc_process() 117 tfm->crt_u.cipher.cit_xor_block(buf, iv); in cbc_process() 118 memcpy(iv, src, crypto_tfm_alg_blocksize(tfm)); in cbc_process() 174 unsigned int nbytes, u8 *iv) in cbc_encrypt_iv() argument 178 cbc_process, 1, iv); in cbc_encrypt_iv() 194 unsigned int nbytes, u8 *iv) in cbc_decrypt_iv() argument [all …]
|
D | ieee80211_crypt_wep.c | 31 u32 iv; member 66 get_random_bytes(&priv->iv, 4); in prism2_wep_init() 124 wep->iv++; in prism2_wep_encrypt() 129 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 130 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 132 wep->iv += 0x0100; in prism2_wep_encrypt() 136 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 137 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 138 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
D | rtl_crypto.h | 150 unsigned int nbytes, u8 *iv); 158 unsigned int nbytes, u8 *iv); 329 unsigned int nbytes, u8 *iv) in crypto_cipher_encrypt_iv() argument 333 return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); in crypto_cipher_encrypt_iv() 348 unsigned int nbytes, u8 *iv) in crypto_cipher_decrypt_iv() argument 352 return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); in crypto_cipher_decrypt_iv()
|
/drivers/crypto/ |
D | padlock-aes.c | 199 u8 *iv, struct cword *control_word, int count) in rep_xcrypt_cbc() argument 202 : "+S" (input), "+D" (output), "+a" (iv) in rep_xcrypt_cbc() 204 return iv; in rep_xcrypt_cbc() 222 u8 *iv, struct cword *cword, int count) in cbc_crypt_copy() argument 232 return rep_xcrypt_cbc(tmp, out, key, iv, cword, count); in cbc_crypt_copy() 250 u8 *iv, struct cword *cword, int count) in cbc_crypt() argument 254 return cbc_crypt_copy(in, out, key, iv, cword, count); in cbc_crypt() 256 return rep_xcrypt_cbc(in, out, key, iv, cword, count); in cbc_crypt() 280 u8 *iv, void *control_word, u32 count) in padlock_xcrypt_cbc() argument 285 return cbc_crypt(input, output, key, iv, control_word, count); in padlock_xcrypt_cbc() [all …]
|
D | ixp4xx_crypto.c | 124 u8 iv[MAX_IVLEN]; /* IV for CBC mode or CTR IV for CTR mode */ member 912 memcpy(crypt->iv, req->info, ivsize); in ablk_perform() 965 u8 iv[CTR_RFC3686_BLOCK_SIZE]; in ablk_rfc3686_crypt() local 970 memcpy(iv, ctx->nonce, CTR_RFC3686_NONCE_SIZE); in ablk_rfc3686_crypt() 971 memcpy(iv + CTR_RFC3686_NONCE_SIZE, info, CTR_RFC3686_IV_SIZE); in ablk_rfc3686_crypt() 974 *(__be32 *)(iv + CTR_RFC3686_NONCE_SIZE + CTR_RFC3686_IV_SIZE) = in ablk_rfc3686_crypt() 977 req->info = iv; in ablk_rfc3686_crypt() 1002 int cryptoffset, int eff_cryptlen, u8 *iv) in aead_perform() argument 1044 BUG_ON(ivsize && !req->iv); in aead_perform() 1045 memcpy(crypt->iv, req->iv, ivsize); in aead_perform() [all …]
|
D | geode-aes.c | 95 _writefield(AES_WRITEIV0_REG, op->iv); in geode_aes_crypt() 107 _readfield(AES_WRITEIV0_REG, op->iv); in geode_aes_crypt() 317 op->iv = walk.iv; in geode_cbc_decrypt() 349 op->iv = walk.iv; in geode_cbc_encrypt()
|
/drivers/staging/rtl8187se/ieee80211/ |
D | ieee80211_crypt_wep.c | 35 u32 iv; member 67 get_random_bytes(&priv->iv, 4); in prism2_wep_init() 127 wep->iv++; in prism2_wep_encrypt() 132 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 133 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 135 wep->iv += 0x0100; in prism2_wep_encrypt() 139 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 140 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 141 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
/drivers/staging/rtl8192e/ |
D | rtllib_crypt_wep.c | 26 u32 iv; member 61 get_random_bytes(&priv->iv, 4); in prism2_wep_init() 122 wep->iv++; in prism2_wep_encrypt() 127 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 128 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 130 wep->iv += 0x0100; in prism2_wep_encrypt() 134 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 135 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 136 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
/drivers/staging/rtl8712/ |
D | rtl871x_security.h | 182 #define GET_TKIP_PN(iv, txpn) \ argument 184 txpn._byte_.TSC0 = iv[2];\ 185 txpn._byte_.TSC1 = iv[0];\ 186 txpn._byte_.TSC2 = iv[4];\ 187 txpn._byte_.TSC3 = iv[5];\ 188 txpn._byte_.TSC4 = iv[6];\ 189 txpn._byte_.TSC5 = iv[7];\
|
D | rtl871x_security.c | 173 u8 *pframe, *payload, *iv; /*,*wepkey*/ in r8712_wep_encrypt() local 189 iv = pframe+pattrib->hdrlen; in r8712_wep_encrypt() 190 memcpy(&wepkey[0], iv, 3); in r8712_wep_encrypt() 229 u8 *pframe, *payload, *iv, wepkey[16]; in r8712_wep_decrypt() local 240 iv = pframe + prxattrib->hdrlen; in r8712_wep_decrypt() 241 keyindex = (iv[3] & 0x3); in r8712_wep_decrypt() 243 memcpy(&wepkey[0], iv, 3); in r8712_wep_decrypt() 584 u8 *pframe, *payload, *iv, *prwskey; in r8712_tkip_encrypt() local 607 iv = pframe + pattrib->hdrlen; in r8712_tkip_encrypt() 610 GET_TKIP_PN(iv, txpn); in r8712_tkip_encrypt() [all …]
|
/drivers/crypto/caam/ |
D | pdb.h | 57 u32 iv[4]; member 63 u32 iv[2]; member 71 u32 iv[2]; member 77 u32 iv[2]; member 267 u32 iv[4]; member 286 u32 iv[4]; member 293 u32 iv[4]; member 310 u32 iv[4]; member
|
/drivers/scsi/ |
D | sd_dif.c | 379 struct bio_vec *iv; in sd_dif_prepare() local 387 bip_for_each_vec(iv, bio->bi_integrity, i) { in sd_dif_prepare() 388 sdt = kmap_atomic(iv->bv_page) in sd_dif_prepare() 389 + iv->bv_offset; in sd_dif_prepare() 391 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) { in sd_dif_prepare() 433 struct bio_vec *iv; in sd_dif_complete() local 437 bip_for_each_vec(iv, bio->bi_integrity, i) { in sd_dif_complete() 438 sdt = kmap_atomic(iv->bv_page) in sd_dif_complete() 439 + iv->bv_offset; in sd_dif_complete() 441 for (j = 0 ; j < iv->bv_len ; j += tuple_sz, sdt++) { in sd_dif_complete()
|
/drivers/net/wireless/rt2x00/ |
D | rt2x00crypto.c | 112 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_copy_iv() 123 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_remove_iv() 140 ((!!(skbdesc->iv[0])) * 4) + ((!!(skbdesc->iv[1])) * 4); in rt2x00crypto_tx_insert_iv() 151 memcpy(skb->data + header_length, skbdesc->iv, iv_len); in rt2x00crypto_tx_insert_iv() 226 memcpy(skb->data + transfer, rxdesc->iv, iv_len); in rt2x00crypto_rx_insert_iv()
|
/drivers/md/ |
D | dm-crypt.c | 83 int (*generator)(struct crypt_config *cc, u8 *iv, 85 int (*post)(struct crypt_config *cc, u8 *iv, 224 static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain_gen() argument 227 memset(iv, 0, cc->iv_size); in crypt_iv_plain_gen() 228 *(__le32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); in crypt_iv_plain_gen() 233 static int crypt_iv_plain64_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain64_gen() argument 236 memset(iv, 0, cc->iv_size); in crypt_iv_plain64_gen() 237 *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); in crypt_iv_plain64_gen() 387 static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_essiv_gen() argument 392 memset(iv, 0, cc->iv_size); in crypt_iv_essiv_gen() [all …]
|
/drivers/net/ |
D | macvtap.c | 639 const struct iovec *iv, unsigned long total_len, in macvtap_get_user() argument 659 err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, in macvtap_get_user() 690 copylen = iov_length(iv, count - MAX_SKB_FRAGS); in macvtap_get_user() 713 err = zerocopy_sg_from_iovec(skb, iv, vnet_hdr_len, count); in macvtap_get_user() 715 err = skb_copy_datagram_from_iovec(skb, 0, iv, vnet_hdr_len, in macvtap_get_user() 761 static ssize_t macvtap_aio_write(struct kiocb *iocb, const struct iovec *iv, in macvtap_aio_write() argument 768 result = macvtap_get_user(q, NULL, iv, iov_length(iv, count), count, in macvtap_aio_write() 776 const struct iovec *iv, int len) in macvtap_put_user() argument 794 if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr))) in macvtap_put_user() 814 ret = skb_copy_datagram_const_iovec(skb, 0, iv, copied, copy); in macvtap_put_user() [all …]
|
/drivers/staging/rtl8192e/rtl8192e/ |
D | rtl_crypto.h | 150 unsigned int nbytes, u8 *iv); 158 unsigned int nbytes, u8 *iv); 326 unsigned int nbytes, u8 *iv) in crypto_cipher_encrypt_iv() argument 330 return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); in crypto_cipher_encrypt_iv() 345 unsigned int nbytes, u8 *iv) in crypto_cipher_decrypt_iv() argument 349 return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); in crypto_cipher_decrypt_iv()
|
/drivers/net/wireless/p54/ |
D | txrx.c | 463 u8 *iv = (u8 *)(entry_data->align + pad + in p54_rx_frame_sent() local 467 iv[2] = iv[0]; in p54_rx_frame_sent() 468 iv[0] = iv[1]; in p54_rx_frame_sent() 469 iv[1] = (iv[0] | 0x20) & 0x7f; /* WEPSeed - 8.3.2.2 */ in p54_rx_frame_sent() 808 u8 *iv = (u8 *)(skb->data + crypt_offset); in p54_tx_80211() local 813 iv[1] = iv[0]; in p54_tx_80211() 814 iv[0] = iv[2]; in p54_tx_80211() 815 iv[2] = 0; in p54_tx_80211()
|
/drivers/usb/wusbcore/ |
D | crypto.c | 210 void *iv, *dst_buf; in wusb_ccm_mac() local 237 iv = crypto_blkcipher_crt(tfm_cbc)->iv; in wusb_ccm_mac() 239 memset(iv, 0, ivsize); in wusb_ccm_mac() 285 bytewise_xor(mic, &ax, iv, 8); in wusb_ccm_mac()
|
/drivers/block/ |
D | cryptoloop.c | 149 u32 iv[4] = { 0, }; in cryptoloop_transfer() local 150 iv[0] = cpu_to_le32(IV & 0xffffffff); in cryptoloop_transfer() 155 desc.info = iv; in cryptoloop_transfer()
|
/drivers/crypto/amcc/ |
D | crypto4xx_sa.h | 193 u32 iv[4]; /* for CBC, OFC, and CFB mode */ member 207 u32 iv[4]; /* for CBC, OFC, and CFB mode */ member 221 u32 iv[4]; /* for CBC, OFC, and CFB mode */ member
|