/drivers/s390/cio/ |
D | airq.c | 124 struct airq_iv *iv; in airq_iv_create() local 127 iv = kzalloc(sizeof(*iv), GFP_KERNEL); in airq_iv_create() 128 if (!iv) in airq_iv_create() 130 iv->bits = bits; in airq_iv_create() 132 iv->vector = kzalloc(size, GFP_KERNEL); in airq_iv_create() 133 if (!iv->vector) in airq_iv_create() 136 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create() 137 if (!iv->avail) in airq_iv_create() 139 memset(iv->avail, 0xff, size); in airq_iv_create() 140 iv->end = 0; in airq_iv_create() [all …]
|
/drivers/staging/wlan-ng/ |
D | p80211wep.c | 147 u8 *iv, u8 *icv) in wep_decrypt() argument 158 key[0] = iv[0]; in wep_decrypt() 159 key[1] = iv[1]; in wep_decrypt() 160 key[2] = iv[2]; in wep_decrypt() 161 keyidx = WEP_KEY(iv[3]); in wep_decrypt() 221 u8 *iv, u8 *icv) in wep_encrypt() argument 238 get_random_bytes(iv, 3); in wep_encrypt() 239 while ((iv[1] == 0xff) && (iv[0] >= 3) && (iv[0] < keylen)) in wep_encrypt() 240 get_random_bytes(iv, 3); in wep_encrypt() 242 iv[3] = (keynum & 0x03) << 6; in wep_encrypt() [all …]
|
/drivers/crypto/nx/ |
D | nx-aes-ccm.c | 135 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument 138 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv() 145 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument 151 memcpy(b0, iv, 16); in generate_b0() 168 static int generate_pat(u8 *iv, in generate_pat() argument 184 memset(iv + 15 - iv[0], 0, iv[0] + 1); in generate_pat() 223 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat() 497 u8 *iv = rctx->iv; in ccm4309_aes_nx_encrypt() local 499 iv[0] = 3; in ccm4309_aes_nx_encrypt() 500 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); in ccm4309_aes_nx_encrypt() [all …]
|
D | nx-aes-ctr.c | 101 processed, csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt() 134 u8 iv[16]; in ctr3686_aes_nx_crypt() local 136 memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_IV_SIZE); in ctr3686_aes_nx_crypt() 137 memcpy(iv + CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_crypt() 139 iv[12] = iv[13] = iv[14] = 0; in ctr3686_aes_nx_crypt() 140 iv[15] = 1; in ctr3686_aes_nx_crypt() 142 desc->info = iv; in ctr3686_aes_nx_crypt()
|
D | nx-aes-gcm.c | 335 desc.info = rctx->iv; in gcm_aes_nx_crypt() 434 char *iv = rctx->iv; in gcm_aes_nx_encrypt() local 436 memcpy(iv, req->iv, 12); in gcm_aes_nx_encrypt() 444 char *iv = rctx->iv; in gcm_aes_nx_decrypt() local 446 memcpy(iv, req->iv, 12); in gcm_aes_nx_decrypt() 456 char *iv = rctx->iv; in gcm4106_aes_nx_encrypt() local 459 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_encrypt() 460 memcpy(iv + NX_GCM4106_NONCE_LEN, req->iv, 8); in gcm4106_aes_nx_encrypt() 473 char *iv = rctx->iv; in gcm4106_aes_nx_decrypt() local 476 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_decrypt() [all …]
|
/drivers/scsi/ |
D | sd_dif.c | 131 struct bio_vec iv; in sd_dif_prepare() local 141 bip_for_each_vec(iv, bip, iter) { in sd_dif_prepare() 142 pi = kmap_atomic(iv.bv_page) + iv.bv_offset; in sd_dif_prepare() 144 for (j = 0; j < iv.bv_len; j += tuple_sz, pi++) { in sd_dif_prepare() 183 struct bio_vec iv; in sd_dif_complete() local 188 bip_for_each_vec(iv, bip, iter) { in sd_dif_complete() 189 pi = kmap_atomic(iv.bv_page) + iv.bv_offset; in sd_dif_complete() 191 for (j = 0; j < iv.bv_len; j += tuple_sz, pi++) { in sd_dif_complete()
|
/drivers/ssb/ |
D | host_soc.c | 177 struct ssb_init_invariants *iv) in ssb_host_soc_get_invariants() argument 183 memset(&iv->boardinfo, 0, sizeof(struct ssb_boardinfo)); in ssb_host_soc_get_invariants() 187 err = kstrtou16(strim(buf), 0, &iv->boardinfo.vendor); in ssb_host_soc_get_invariants() 192 if (!iv->boardinfo.vendor) in ssb_host_soc_get_invariants() 193 iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM; in ssb_host_soc_get_invariants() 197 err = kstrtou16(strim(buf), 0, &iv->boardinfo.type); in ssb_host_soc_get_invariants() 203 memset(&iv->sprom, 0, sizeof(struct ssb_sprom)); in ssb_host_soc_get_invariants() 204 ssb_fill_sprom_with_fallback(bus, &iv->sprom); in ssb_host_soc_get_invariants() 207 iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); in ssb_host_soc_get_invariants()
|
/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 …]
|
/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_wep.c | 30 u32 iv; member 57 get_random_bytes(&priv->iv, 4); in prism2_wep_init() 108 wep->iv++; in prism2_wep_encrypt() 113 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 114 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 117 wep->iv += 0x0100; in prism2_wep_encrypt() 121 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 122 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 123 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
/drivers/crypto/ccp/ |
D | ccp-crypto-aes.c | 35 memcpy(req->info, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_complete() 91 memcpy(rctx->iv, req->info, AES_BLOCK_SIZE); in ccp_aes_crypt() 94 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_crypt() 106 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_crypt() 173 u8 *iv; in ccp_aes_rfc3686_crypt() local 176 iv = rctx->rfc3686_iv; in ccp_aes_rfc3686_crypt() 177 memcpy(iv, ctx->u.aes.nonce, CTR_RFC3686_NONCE_SIZE); in ccp_aes_rfc3686_crypt() 179 iv += CTR_RFC3686_NONCE_SIZE; in ccp_aes_rfc3686_crypt() 180 memcpy(iv, req->info, CTR_RFC3686_IV_SIZE); in ccp_aes_rfc3686_crypt() 182 iv += CTR_RFC3686_IV_SIZE; in ccp_aes_rfc3686_crypt() [all …]
|
D | ccp-crypto-aes-cmac.c | 50 memcpy(req->result, rctx->iv, digest_size); in ccp_aes_cmac_complete() 105 sg_init_one(&rctx->iv_sg, rctx->iv, sizeof(rctx->iv)); in ccp_do_cmac_update() 167 rctx->cmd.u.aes.iv = &rctx->iv_sg; in ccp_do_cmac_update() 232 memcpy(state.iv, rctx->iv, sizeof(state.iv)); in ccp_aes_cmac_export() 252 memcpy(rctx->iv, state.iv, sizeof(rctx->iv)); in ccp_aes_cmac_import()
|
D | ccp-crypto.h | 96 u8 iv[AES_BLOCK_SIZE]; member 118 u8 iv[AES_BLOCK_SIZE]; member 134 u8 iv[AES_BLOCK_SIZE]; member
|
/drivers/staging/rtl8192e/ |
D | rtllib_crypt_wep.c | 25 u32 iv; member 58 get_random_bytes(&priv->iv, 4); in prism2_wep_init() 115 wep->iv++; in prism2_wep_encrypt() 121 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 122 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 125 wep->iv += 0x0100; in prism2_wep_encrypt() 129 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 130 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 131 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
/drivers/staging/rtl8712/ |
D | rtl871x_security.h | 190 #define GET_TKIP_PN(iv, txpn) \ argument 192 txpn._byte_.TSC0 = iv[2];\ 193 txpn._byte_.TSC1 = iv[0];\ 194 txpn._byte_.TSC2 = iv[4];\ 195 txpn._byte_.TSC3 = iv[5];\ 196 txpn._byte_.TSC4 = iv[6];\ 197 txpn._byte_.TSC5 = iv[7];\
|
D | rtl871x_security.c | 169 u8 *pframe, *payload, *iv; /*,*wepkey*/ in r8712_wep_encrypt() local 185 iv = pframe + pattrib->hdrlen; in r8712_wep_encrypt() 186 memcpy(&wepkey[0], iv, 3); in r8712_wep_encrypt() 226 u8 *pframe, *payload, *iv, wepkey[16]; in r8712_wep_decrypt() local 237 iv = pframe + prxattrib->hdrlen; in r8712_wep_decrypt() 238 keyindex = (iv[3] & 0x3); in r8712_wep_decrypt() 240 memcpy(&wepkey[0], iv, 3); in r8712_wep_decrypt() 581 u8 *pframe, *payload, *iv, *prwskey; in r8712_tkip_encrypt() local 603 iv = pframe + pattrib->hdrlen; in r8712_tkip_encrypt() 606 GET_TKIP_PN(iv, txpn); in r8712_tkip_encrypt() [all …]
|
/drivers/crypto/vmx/ |
D | aesp8-ppc.h | 18 const struct aes_key *key, u8 *iv, const int enc); 21 const u8 *iv); 23 const struct aes_key *key1, const struct aes_key *key2, u8 *iv); 25 const struct aes_key *key1, const struct aes_key *key2, u8 *iv);
|
D | aes_xts.c | 112 u8 *iv; in p8_aes_xts_crypt() local 133 iv = walk.iv; in p8_aes_xts_crypt() 135 aes_p8_encrypt(iv, tweak, &ctx->tweak_key); in p8_aes_xts_crypt()
|
/drivers/md/ |
D | dm-crypt.c | 83 int (*generator)(struct crypt_config *cc, u8 *iv, 85 int (*post)(struct crypt_config *cc, u8 *iv, 244 static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain_gen() argument 247 memset(iv, 0, cc->iv_size); in crypt_iv_plain_gen() 248 *(__le32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); in crypt_iv_plain_gen() 253 static int crypt_iv_plain64_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain64_gen() argument 256 memset(iv, 0, cc->iv_size); in crypt_iv_plain64_gen() 257 *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); in crypt_iv_plain64_gen() 409 static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_essiv_gen() argument 414 memset(iv, 0, cc->iv_size); in crypt_iv_essiv_gen() [all …]
|
/drivers/crypto/caam/ |
D | pdb.h | 75 u8 iv[16]; member 87 u64 iv; member 103 u64 iv; member 115 u64 iv; member 346 u32 iv[4]; member 365 u32 iv[4]; member 372 u32 iv[4]; member 389 u32 iv[4]; member
|
/drivers/net/wireless/ralink/rt2x00/ |
D | rt2x00crypto.c | 110 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_copy_iv() 121 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_remove_iv() 138 ((!!(skbdesc->iv[0])) * 4) + ((!!(skbdesc->iv[1])) * 4); in rt2x00crypto_tx_insert_iv() 149 memcpy(skb->data + header_length, skbdesc->iv, iv_len); in rt2x00crypto_tx_insert_iv() 224 memcpy(skb->data + transfer, rxdesc->iv, iv_len); in rt2x00crypto_rx_insert_iv()
|
/drivers/media/platform/exynos4-is/ |
D | fimc-isp-video.c | 568 struct fimc_is_video *iv; in fimc_isp_video_device_register() local 573 iv = &isp->video_capture; in fimc_isp_video_device_register() 578 INIT_LIST_HEAD(&iv->pending_buf_q); in fimc_isp_video_device_register() 579 INIT_LIST_HEAD(&iv->active_buf_q); in fimc_isp_video_device_register() 580 iv->format = fimc_isp_find_format(NULL, NULL, 0); in fimc_isp_video_device_register() 581 iv->pixfmt.width = IS_DEFAULT_WIDTH; in fimc_isp_video_device_register() 582 iv->pixfmt.height = IS_DEFAULT_HEIGHT; in fimc_isp_video_device_register() 583 iv->pixfmt.pixelformat = iv->format->fourcc; in fimc_isp_video_device_register() 584 iv->pixfmt.colorspace = V4L2_COLORSPACE_SRGB; in fimc_isp_video_device_register() 585 iv->reqbufs_count = 0; in fimc_isp_video_device_register() [all …]
|
/drivers/staging/rtl8188eu/include/ |
D | rtw_security.h | 215 #define GET_TKIP_PN(iv, dot11txpn) \ argument 217 dot11txpn._byte_.TSC0 = iv[2]; \ 218 dot11txpn._byte_.TSC1 = iv[0]; \ 219 dot11txpn._byte_.TSC2 = iv[4]; \ 220 dot11txpn._byte_.TSC3 = iv[5]; \ 221 dot11txpn._byte_.TSC4 = iv[6]; \ 222 dot11txpn._byte_.TSC5 = iv[7]; \
|
/drivers/net/wireless/intersil/p54/ |
D | txrx.c | 462 u8 *iv = (u8 *)(entry_data->align + pad + in p54_rx_frame_sent() local 466 iv[2] = iv[0]; in p54_rx_frame_sent() 467 iv[0] = iv[1]; in p54_rx_frame_sent() 468 iv[1] = (iv[0] | 0x20) & 0x7f; /* WEPSeed - 8.3.2.2 */ in p54_rx_frame_sent() 807 u8 *iv = (u8 *)(skb->data + crypt_offset); in p54_tx_80211() local 812 iv[1] = iv[0]; in p54_tx_80211() 813 iv[0] = iv[2]; in p54_tx_80211() 814 iv[2] = 0; in p54_tx_80211()
|
/drivers/usb/wusbcore/ |
D | crypto.c | 219 u8 iv[crypto_skcipher_ivsize(tfm_cbc)]; in wusb_ccm_mac() local 241 memset(iv, 0, sizeof(iv)); in wusb_ccm_mac() 268 skcipher_request_set_crypt(req, sg, &sg_dst, dst_size, iv); in wusb_ccm_mac() 290 bytewise_xor(mic, &scratch->ax, iv, 8); in wusb_ccm_mac()
|
/drivers/crypto/marvell/ |
D | hash.c | 1212 memcpy(tmpl.ctx.hash.iv, ctx->iv, sizeof(ctx->iv)); in mv_cesa_ahmac_md5_init() 1231 ctx->iv[i] = be32_to_cpu(istate.hash[i]); in mv_cesa_ahmac_md5_setkey() 1234 ctx->iv[i + 8] = be32_to_cpu(ostate.hash[i]); in mv_cesa_ahmac_md5_setkey() 1282 memcpy(tmpl.ctx.hash.iv, ctx->iv, sizeof(ctx->iv)); in mv_cesa_ahmac_sha1_init() 1301 ctx->iv[i] = be32_to_cpu(istate.state[i]); in mv_cesa_ahmac_sha1_setkey() 1304 ctx->iv[i + 8] = be32_to_cpu(ostate.state[i]); in mv_cesa_ahmac_sha1_setkey() 1358 ctx->iv[i] = be32_to_cpu(istate.state[i]); in mv_cesa_ahmac_sha256_setkey() 1361 ctx->iv[i + 8] = be32_to_cpu(ostate.state[i]); in mv_cesa_ahmac_sha256_setkey() 1372 memcpy(tmpl.ctx.hash.iv, ctx->iv, sizeof(ctx->iv)); in mv_cesa_ahmac_sha256_init()
|