/drivers/s390/cio/ |
D | airq.c | 125 struct airq_iv *iv; in airq_iv_create() local 128 iv = kzalloc(sizeof(*iv), GFP_KERNEL); in airq_iv_create() 129 if (!iv) in airq_iv_create() 131 iv->bits = bits; in airq_iv_create() 133 iv->vector = kzalloc(size, GFP_KERNEL); in airq_iv_create() 134 if (!iv->vector) in airq_iv_create() 137 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create() 138 if (!iv->avail) in airq_iv_create() 140 memset(iv->avail, 0xff, size); in airq_iv_create() 141 iv->end = 0; in airq_iv_create() [all …]
|
/drivers/staging/wlan-ng/ |
D | p80211wep.c | 144 u8 *iv, u8 *icv) in wep_decrypt() argument 155 key[0] = iv[0]; in wep_decrypt() 156 key[1] = iv[1]; in wep_decrypt() 157 key[2] = iv[2]; in wep_decrypt() 158 keyidx = WEP_KEY(iv[3]); in wep_decrypt() 217 u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv) in wep_encrypt() argument 234 get_random_bytes(iv, 3); in wep_encrypt() 235 while ((iv[1] == 0xff) && (iv[0] >= 3) && (iv[0] < keylen)) in wep_encrypt() 236 get_random_bytes(iv, 3); in wep_encrypt() 238 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() 282 u8 *iv, void *control_word, u32 count) in padlock_xcrypt_cbc() argument 287 return cbc_crypt(input, output, key, iv, control_word, count); in padlock_xcrypt_cbc() [all …]
|
D | omap-aes-gcm.c | 178 static int do_encrypt_iv(struct aead_request *req, u32 *tag, u32 *iv) in do_encrypt_iv() argument 194 sg_init_one(&iv_sg, iv, AES_BLOCK_SIZE); in do_encrypt_iv() 314 memcpy(rctx->iv + 12, &counter, 4); in omap_aes_gcm_crypt() 316 err = do_encrypt_iv(req, (u32 *)rctx->auth_tag, (u32 *)rctx->iv); in omap_aes_gcm_crypt() 342 memcpy(rctx->iv, req->iv, 12); in omap_aes_gcm_encrypt() 350 memcpy(rctx->iv, req->iv, 12); in omap_aes_gcm_decrypt() 359 memcpy(rctx->iv, ctx->nonce, 4); in omap_aes_4106gcm_encrypt() 360 memcpy(rctx->iv + 4, req->iv, 8); in omap_aes_4106gcm_encrypt() 370 memcpy(rctx->iv, ctx->nonce, 4); in omap_aes_4106gcm_decrypt() 371 memcpy(rctx->iv + 4, req->iv, 8); in omap_aes_4106gcm_decrypt()
|
/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() 114 if ((wep->iv & 0xff00) == 0xff00) { in prism2_wep_encrypt() 115 u8 B = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 118 wep->iv += 0x0100; in prism2_wep_encrypt() 122 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 123 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 124 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt()
|
/drivers/crypto/ccp/ |
D | ccp-crypto-aes.c | 36 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-galois.c | 98 if (!req->iv) in ccp_aes_gcm_crypt() 111 memcpy(rctx->iv, req->iv, AES_GCM_IVSIZE); in ccp_aes_gcm_crypt() 113 rctx->iv[i + AES_GCM_IVSIZE] = 0; in ccp_aes_gcm_crypt() 114 rctx->iv[AES_BLOCK_SIZE - 1] = 1; in ccp_aes_gcm_crypt() 119 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_gcm_crypt() 131 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_gcm_crypt()
|
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()
|
/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];\
|
/drivers/crypto/vmx/ |
D | aesp8-ppc.h | 19 const struct aes_key *key, u8 *iv, const int enc); 22 const u8 *iv); 24 const struct aes_key *key1, const struct aes_key *key2, u8 *iv); 26 const struct aes_key *key1, const struct aes_key *key2, u8 *iv);
|
/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_trace.h | 113 TP_PROTO(struct amdgpu_iv_entry *iv), 114 TP_ARGS(iv), 127 __entry->client_id = iv->client_id; 128 __entry->src_id = iv->src_id; 129 __entry->ring_id = iv->ring_id; 130 __entry->vm_id = iv->vm_id; 131 __entry->vm_id_src = iv->vm_id_src; 132 __entry->timestamp = iv->timestamp; 133 __entry->timestamp_src = iv->timestamp_src; 134 __entry->pas_id = iv->pas_id; [all …]
|
/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/crypto/caam/ |
D | pdb.h | 76 u8 iv[16]; member 88 u64 iv; member 104 u64 iv; member 116 u64 iv; member 347 u32 iv[4]; member 366 u32 iv[4]; member 373 u32 iv[4]; member 390 u32 iv[4]; member
|
/drivers/staging/rtl8188eu/include/ |
D | rtw_security.h | 213 #define GET_TKIP_PN(iv, dot11txpn) \ argument 215 dot11txpn._byte_.TSC0 = iv[2]; \ 216 dot11txpn._byte_.TSC1 = iv[0]; \ 217 dot11txpn._byte_.TSC2 = iv[4]; \ 218 dot11txpn._byte_.TSC3 = iv[5]; \ 219 dot11txpn._byte_.TSC4 = iv[6]; \ 220 dot11txpn._byte_.TSC5 = iv[7]; \
|
/drivers/media/platform/exynos4-is/ |
D | fimc-isp-video.c | 573 struct fimc_is_video *iv; in fimc_isp_video_device_register() local 578 iv = &isp->video_capture; in fimc_isp_video_device_register() 583 INIT_LIST_HEAD(&iv->pending_buf_q); in fimc_isp_video_device_register() 584 INIT_LIST_HEAD(&iv->active_buf_q); in fimc_isp_video_device_register() 585 iv->format = fimc_isp_find_format(NULL, NULL, 0); in fimc_isp_video_device_register() 586 iv->pixfmt.width = IS_DEFAULT_WIDTH; in fimc_isp_video_device_register() 587 iv->pixfmt.height = IS_DEFAULT_HEIGHT; in fimc_isp_video_device_register() 588 iv->pixfmt.pixelformat = iv->format->fourcc; in fimc_isp_video_device_register() 589 iv->pixfmt.colorspace = V4L2_COLORSPACE_SRGB; in fimc_isp_video_device_register() 590 iv->reqbufs_count = 0; in fimc_isp_video_device_register() [all …]
|
/drivers/staging/ccree/ |
D | ssi_aead.c | 238 areq->iv = areq_ctx->backup_iv; in ssi_aead_complete() 1559 unsigned int lp = req->iv[0]; in config_ccm_adata() 1578 SSI_LOG_ERR("illegal iv value %X\n", req->iv[0]); in config_ccm_adata() 1581 memcpy(b0, req->iv, AES_BLOCK_SIZE); in config_ccm_adata() 1598 memset(req->iv + 15 - req->iv[0], 0, req->iv[0] + 1); in config_ccm_adata() 1599 req->iv[15] = 1; in config_ccm_adata() 1601 memcpy(ctr_count_0, req->iv, AES_BLOCK_SIZE); in config_ccm_adata() 1619 memcpy(areq_ctx->ctr_iv + CCM_BLOCK_IV_OFFSET, req->iv, CCM_BLOCK_IV_SIZE); in ssi_rfc4309_ccm_process() 1620 req->iv = areq_ctx->ctr_iv; in ssi_rfc4309_ccm_process() 1875 dump_byte_array("req->iv", req->iv, AES_BLOCK_SIZE); in ssi_aead_dump_gcm() [all …]
|
/drivers/md/ |
D | dm-crypt.c | 95 int (*generator)(struct crypt_config *cc, u8 *iv, 97 int (*post)(struct crypt_config *cc, u8 *iv, 298 static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain_gen() argument 301 memset(iv, 0, cc->iv_size); in crypt_iv_plain_gen() 302 *(__le32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); in crypt_iv_plain_gen() 307 static int crypt_iv_plain64_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain64_gen() argument 310 memset(iv, 0, cc->iv_size); in crypt_iv_plain64_gen() 311 *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); in crypt_iv_plain64_gen() 316 static int crypt_iv_plain64be_gen(struct crypt_config *cc, u8 *iv, in crypt_iv_plain64be_gen() argument 319 memset(iv, 0, cc->iv_size); in crypt_iv_plain64be_gen() [all …]
|
/drivers/crypto/virtio/ |
D | virtio_crypto_algs.c | 46 uint8_t *iv; member 361 uint8_t *iv; in __virtio_crypto_ablkcipher_do_req() local 432 iv = kzalloc_node(ivsize, GFP_ATOMIC, in __virtio_crypto_ablkcipher_do_req() 434 if (!iv) { in __virtio_crypto_ablkcipher_do_req() 438 memcpy(iv, req->info, ivsize); in __virtio_crypto_ablkcipher_do_req() 439 sg_init_one(&iv_sg, iv, ivsize); in __virtio_crypto_ablkcipher_do_req() 441 vc_sym_req->iv = iv; in __virtio_crypto_ablkcipher_do_req() 468 kzfree(iv); in __virtio_crypto_ablkcipher_do_req() 574 kzfree(vc_sym_req->iv); in virtio_crypto_ablkcipher_finalize_req()
|
/drivers/crypto/sunxi-ss/ |
D | sun4i-ss-cipher.c | 44 if (!areq->iv) { in sun4i_ss_opti_poll() 59 if (areq->iv) { in sun4i_ss_opti_poll() 61 v = *(u32 *)(areq->iv + i * 4); in sun4i_ss_opti_poll() 113 if (areq->iv) { in sun4i_ss_opti_poll() 116 *(u32 *)(areq->iv + i * 4) = v; in sun4i_ss_opti_poll() 162 if (!areq->iv) { in sun4i_ss_cipher_poll() 195 if (areq->iv) { in sun4i_ss_cipher_poll() 197 v = *(u32 *)(areq->iv + i * 4); in sun4i_ss_cipher_poll() 309 if (areq->iv) { in sun4i_ss_cipher_poll() 312 *(u32 *)(areq->iv + i * 4) = v; in sun4i_ss_cipher_poll()
|