| /linux/drivers/s390/cio/ |
| H A D | airq.c | 130 struct airq_iv *iv; in airq_iv_create() local 133 iv = kzalloc_obj(*iv); in airq_iv_create() 134 if (!iv) in airq_iv_create() 136 iv->bits = bits; in airq_iv_create() 137 iv->flags = flags; in airq_iv_create() 145 iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, in airq_iv_create() 146 &iv->vector_dma); in airq_iv_create() 147 if (!iv->vector) in airq_iv_create() 150 iv->vector = vec; in airq_iv_create() 152 iv->vector = cio_dma_zalloc(size); in airq_iv_create() [all …]
|
| /linux/arch/s390/include/asm/ |
| H A D | airq.h | 53 void airq_iv_release(struct airq_iv *iv); 54 unsigned long airq_iv_alloc(struct airq_iv *iv, unsigned long num); 55 void airq_iv_free(struct airq_iv *iv, unsigned long bit, unsigned long num); 56 unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, 59 static inline unsigned long airq_iv_alloc_bit(struct airq_iv *iv) in airq_iv_alloc_bit() argument 61 return airq_iv_alloc(iv, 1); in airq_iv_alloc_bit() 64 static inline void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit) in airq_iv_free_bit() argument 66 airq_iv_free(iv, bit, 1); in airq_iv_free_bit() 69 static inline unsigned long airq_iv_end(struct airq_iv *iv) in airq_iv_end() argument 71 return iv->end; in airq_iv_end() [all …]
|
| /linux/net/mac80211/ |
| H A D | wep.c | 28 /* start WEP IV from a random value */ in ieee80211_wep_init() 32 static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) in ieee80211_wep_weak_iv() argument 39 if ((iv & 0xff00) == 0xff00) { in ieee80211_wep_weak_iv() 40 u8 B = (iv >> 16) & 0xff; in ieee80211_wep_weak_iv() 49 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument 55 if (!iv) in ieee80211_wep_get_iv() 58 *iv++ = (local->wep_iv >> 16) & 0xff; in ieee80211_wep_get_iv() 59 *iv++ = (local->wep_iv >> 8) & 0xff; in ieee80211_wep_get_iv() 60 *iv++ = local->wep_iv & 0xff; in ieee80211_wep_get_iv() 61 *iv++ = keyidx << 6; in ieee80211_wep_get_iv() [all …]
|
| /linux/drivers/net/wireless/intel/ipw2x00/ |
| H A D | libipw_crypto_wep.c | 24 u32 iv; member 45 /* start WEP IV from a random value */ in libipw_wep_init() 46 get_random_bytes(&priv->iv, 4); in libipw_wep_init() 56 /* Add WEP IV/key info to a frame that has at least 4 bytes of headroom */ 73 wep->iv++; in libipw_wep_build_iv() 78 if ((wep->iv & 0xff00) == 0xff00) { in libipw_wep_build_iv() 79 u8 B = (wep->iv >> 16) & 0xff; in libipw_wep_build_iv() 81 wep->iv += 0x0100; in libipw_wep_build_iv() 84 /* Prepend 24-bit IV to RC4 key and TX frame */ in libipw_wep_build_iv() 85 *pos++ = (wep->iv >> 16) & 0xff; in libipw_wep_build_iv() [all …]
|
| /linux/drivers/net/wireless/ralink/rt2x00/ |
| H A D | rt2x00crypto.c | 74 * Extend frame length to include IV/EIV/ICV/MMIC, in rt2x00crypto_tx_overhead() 98 /* Copy IV/EIV data */ in rt2x00crypto_tx_copy_iv() 99 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_copy_iv() 109 /* Copy IV/EIV data */ in rt2x00crypto_tx_remove_iv() 110 memcpy(skbdesc->iv, skb->data + txdesc->iv_offset, txdesc->iv_len); in rt2x00crypto_tx_remove_iv() 119 /* IV/EIV data has officially been stripped */ in rt2x00crypto_tx_remove_iv() 127 ((!!(skbdesc->iv[0])) * 4) + ((!!(skbdesc->iv[1])) * 4); in rt2x00crypto_tx_insert_iv() 137 /* Copy IV/EIV data */ in rt2x00crypto_tx_insert_iv() 138 memcpy(skb->data + header_length, skbdesc->iv, iv_len); in rt2x00crypto_tx_insert_iv() 140 /* IV/EIV data has returned into the frame */ in rt2x00crypto_tx_insert_iv() [all …]
|
| /linux/arch/x86/crypto/ |
| H A D | sm4_aesni_avx_glue.c | 27 const u8 *src, u8 *iv); 29 const u8 *src, u8 *iv); 102 const u8 *iv = walk.iv; in sm4_cbc_encrypt() local 107 crypto_xor_cpy(dst, src, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt() 109 iv = dst; in sm4_cbc_encrypt() 114 if (iv != walk.iv) in sm4_cbc_encrypt() 115 memcpy(walk.iv, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt() 142 func(ctx->rkey_dec, dst, src, walk.iv); in sm4_avx_cbc_decrypt() 150 u8 iv[SM4_BLOCK_SIZE]; in sm4_avx_cbc_decrypt() local 159 memcpy(iv, src + SM4_BLOCK_SIZE, SM4_BLOCK_SIZE); in sm4_avx_cbc_decrypt() [all …]
|
| H A D | aria-avx.h | 22 u8 *keystream, u8 *iv); 29 u8 *keystream, u8 *iv); 37 u8 *keystream, u8 *iv); 44 u8 *keystream, u8 *iv); 50 u8 *keystream, u8 *iv); 54 u8 *keystream, u8 *iv); 58 u8 *keystream, u8 *iv);
|
| /linux/drivers/net/ovpn/ |
| H A D | crypto_aead.c | 43 * and IV. 48 * the initialization vector (IV), the AEAD request, and an array of scatterlist 49 * entries. For alignment considerations, the IV is placed first, followed by 79 * ovpn_aead_crypto_tmp_iv - retrieve the pointer to the IV within a temporary 84 * This function retrieves a pointer to the initialization vector (IV) in the 85 * temporary buffer. If the AEAD cipher specifies an IV size, the pointer is 88 * Returns: a pointer to the IV within the temporary buffer 102 * @iv: a pointer to the initialization vector in the temporary buffer 105 * immediately follows the IV in the temporary buffer and it ensures the request 111 const u8 *iv) in ovpn_aead_crypto_tmp_req() argument [all …]
|
| /linux/arch/arm64/crypto/ |
| H A D | sm4-neon-glue.c | 24 u8 *iv, unsigned int nblocks); 26 u8 *iv, unsigned int nblocks); 88 const u8 *iv = walk.iv; in sm4_cbc_encrypt() local 93 crypto_xor_cpy(dst, src, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt() 95 iv = dst; in sm4_cbc_encrypt() 100 if (iv != walk.iv) in sm4_cbc_encrypt() 101 memcpy(walk.iv, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt() 128 walk.iv, nblocks); in sm4_cbc_decrypt() 156 walk.iv, nblocks); in sm4_ctr_crypt() 167 sm4_crypt_block(ctx->rkey_enc, keystream, walk.iv); in sm4_ctr_crypt() [all …]
|
| H A D | aes-neonbs-glue.c | 36 int rounds, int blocks, u8 iv[]); 39 int rounds, int blocks, u8 iv[]); 42 int rounds, int blocks, u8 iv[]); 44 int rounds, int blocks, u8 iv[]); 167 walk.iv); in cbc_encrypt() 192 walk.iv); in cbc_decrypt() 219 walk.iv); in ctr_encrypt() 233 walk.iv); in ctr_encrypt() 273 int rounds, int blocks, u8 iv[])) in __xts_crypt() argument 301 req->iv); in __xts_crypt() [all...] |
| H A D | sm4-ce-glue.c | 32 u8 *iv, unsigned int nblocks); 34 u8 *iv, unsigned int nblocks); 36 u8 *iv, unsigned int nbytes); 38 u8 *iv, unsigned int nbytes); 40 u8 *iv, unsigned int nblks); 170 walk.iv, nblocks); in sm4_cbc_crypt() 173 walk.iv, nblocks); in sm4_cbc_crypt() 226 req->iv); in sm4_cbc_cts_crypt() 241 req->iv); in sm4_cbc_cts_crypt() 250 walk.src.virt.addr, walk.iv, walk.nbytes); in sm4_cbc_cts_crypt() [all …]
|
| /linux/include/linux/ |
| H A D | ccp.h | 159 * @iv: IV to be used for this AES operation 160 * @iv_len: length in bytes of iv 171 * - iv, iv_len for any mode other than ECB 175 * The iv variable is used as both input and output. On completion of the 176 * AES operation the new IV overwrites the old IV. 188 struct scatterlist *iv; 229 * @iv: IV t 179 struct scatterlist *iv; global() member 239 struct scatterlist *iv; global() member 350 struct scatterlist *iv; global() member [all...] |
| /linux/tools/testing/crypto/chacha20-s390/ |
| H A D | test-cipher.c | 53 u8 iv[16], key[32]; in test_lib_chacha() 57 memset(iv, 'I', sizeof(iv)); in test_lib_chacha() 63 print_hex_dump(KERN_INFO, "iv: ", DUMP_PREFIX_OFFSET, in test_lib_chacha() 64 16, 1, iv, 16, 1); in test_lib_chacha() 68 chacha_init(&chacha_state, (u32 *)key, iv); in test_lib_chacha() 83 chacha_init(&chacha_state, (u32 *)key, iv); in test_lib_chacha() 130 u8 iv[16], key[32]; in test_skcipher() 152 memset(iv, 'I', sizeof(iv)); in test_skcipher() 54 u8 iv[16], key[32]; test_lib_chacha() local 131 u8 iv[16], key[32]; test_skcipher() local [all...] |
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_req.h | 22 * Params tell the iv and enc/dec data offsets. 88 /* IV from context */ 90 /* IV from Input data */ 127 * @iv: Encryption IV or Tweak for AES-XTS 134 u8 iv[AES_BLOCK_SIZE]; member 181 * @iv_source: Encryption IV source 184 * 1 - Authentication IV and KEY, microcode calculates OPAD/IPAD 226 * @iv: IV data 227 * @ivsize: IV data length 240 u8 *iv; member [all …]
|
| H A D | nitrox_aead.c | 94 struct scatterlist *src, char *iv, int ivsize, in alloc_src_sglist() argument 103 /* IV entry */ in alloc_src_sglist() 105 /* Allocate buffer to hold IV and input scatterlist array */ in alloc_src_sglist() 110 nitrox_creq_copy_iv(nkreq->src, iv, ivsize); in alloc_src_sglist() 125 /* IV, ORH, COMPLETION entries */ in alloc_dst_sglist() 175 ret = alloc_src_sglist(&rctx->nkreq, rctx->src, rctx->iv, rctx->ivsize, in nitrox_set_creq() 225 memcpy(fctx->crypto.iv, areq->iv, GCM_AES_SALT_SIZE); in nitrox_aes_gcm_enc() 231 rctx->iv = &areq->iv[GCM_AES_SALT_SIZE]; in nitrox_aes_gcm_enc() 259 memcpy(fctx->crypto.iv, areq->iv, GCM_AES_SALT_SIZE); in nitrox_aes_gcm_dec() 265 rctx->iv = &areq->iv[GCM_AES_SALT_SIZE]; in nitrox_aes_gcm_dec() [all …]
|
| /linux/crypto/ |
| H A D | seqiv.c | 3 * seqiv: Sequence Number IV Generator 5 * This generator generates an IV based on a sequence number by xoring it 33 memcpy(req->iv, subreq->iv, crypto_aead_ivsize(geniv)); in seqiv_aead_encrypt_complete2() 36 kfree_sensitive(subreq->iv); in seqiv_aead_encrypt_complete2() 66 info = req->iv; in seqiv_aead_encrypt() 75 info = kmemdup(req->iv, ivsize, req->base.flags & in seqiv_aead_encrypt() 118 req->cryptlen - ivsize, req->iv); in seqiv_aead_decrypt() 121 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in seqiv_aead_decrypt() 177 MODULE_DESCRIPTION("Sequence Number IV Generator");
|
| H A D | aes.c | 378 AES_CRYPT_SG(aes_cbc_encrypt, req->dst, req->src, cryptlen, 0, req->iv, in crypto_aes_cbc_encrypt_sg() 386 AES_CRYPT_SG(aes_cbc_decrypt, req->dst, req->src, cryptlen, 0, req->iv, in crypto_aes_cbc_decrypt_sg() 445 aes_cbc_cts_encrypt(tmp, tmp, tail_len, req->iv, key); in crypto_aes_cbc_cts_crypt_nonlinear() 447 aes_cbc_cts_decrypt(tmp, tmp, tail_len, req->iv, key); in crypto_aes_cbc_cts_crypt_nonlinear() 464 req->cryptlen, req->iv, key); in crypto_aes_cbc_cts_encrypt() 481 req->cryptlen, req->iv, key); in crypto_aes_cbc_cts_decrypt() 494 AES_CRYPT_SG(aes_ctr, req->dst, req->src, req->cryptlen, 0, req->iv, in crypto_aes_ctr_crypt() 508 req->iv, key); in crypto_aes_xctr_crypt() 528 u8 iv[AES_BLOCK_SIZE], in aes_xts_crypt_wrapper() 533 aes_xts_encrypt(dst, src, len, iv, ke in aes_xts_crypt_wrapper() 866 u8 iv[12]; crypto_aes_rfc4106_encrypt() local 881 u8 iv[12]; crypto_aes_rfc4106_decrypt() local [all...] |
| H A D | ccm.c | 128 unsigned int lp = req->iv[0]; in format_input() 134 memcpy(info, req->iv, 16); in format_input() 238 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument 241 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv() 251 u8 *iv = req->iv; in crypto_ccm_init_crypt() local 254 err = crypto_ccm_check_iv(iv); in crypto_ccm_init_crypt() 263 memset(iv + 15 - iv[0], 0, iv[0] + 1); in crypto_ccm_init_crypt() 291 u8 *iv = req->iv; in crypto_ccm_encrypt() local 309 skcipher_request_set_crypt(skreq, pctx->src, dst, cryptlen + 16, iv); in crypto_ccm_encrypt() 352 u8 *iv = pctx->idata; in crypto_ccm_decrypt() local [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | linked_list_fail.c | 11 struct map_value *v, *v2, *iv, *iv2; \ 25 iv = bpf_map_lookup_elem(map, &(int){ 0 }); \ 26 if (!iv) \ 66 CHECK(inner_map, pop_front, &iv->head); 67 CHECK(inner_map, pop_back, &iv->head); 89 CHECK(inner_map, push_front, &iv->head, &f->node2); 90 CHECK(inner_map, push_back, &iv->head, &f->node2); 109 CHECK(kptr_inner_map, op, &f1->lock, &iv->head); \ 114 CHECK(global_inner_map, op, &glock, &iv->head); \ 119 CHECK(map_inner_map, op, &v->lock, &iv->head); \ [all …]
|
| /linux/Documentation/admin-guide/device-mapper/ |
| H A D | dm-crypt.rst | 17 Encryption cipher, encryption mode and Initial Vector (IV) generator. 30 format (selected by capi: prefix). The IV specification is the same 56 in combination with the selected iv mode. 57 Note that for some iv modes the key string can contain additional 58 keys (for example IV seed) so the key contains more parts concatenated 82 The IV offset is a sector count that is added to the sector number 83 before creating the IV. 142 The <type> can be "none" if metadata is used only for persistent IV. 147 used for storing authentication tag (and persistent IV if needed). 178 IV generator [all...] |
| /linux/net/rxrpc/ |
| H A D | rxkad.c | 200 fcrypt_pcbc_encrypt(cipher, /* iv= */ token->kad->session_key, tmpbuf, in rxkad_prime_packet_security() 366 /* Decrypt the first 8-byte block of the packet, using the zero IV. */ in rxkad_secure_packet() 779 __le64 iv, u8 *data, size_t len) in rxkad_validate_challenge() 786 ptext ^= iv; in rxkad_validate_challenge() 788 iv = ptext ^ ctext; in rxkad_validate_challenge() 794 * decrypt the kerberos IV ticket in the response in rxkad_validate_challenge() 197 struct rxrpc_crypt iv; rxkad_prime_packet_security() local 264 struct rxrpc_crypt iv; rxkad_secure_packet_auth() local 307 struct rxrpc_crypt iv; rxkad_secure_packet_encrypt() local 345 struct rxrpc_crypt iv; rxkad_secure_packet() local 435 struct rxrpc_crypt iv; rxkad_verify_packet_1() local 497 struct rxrpc_crypt iv; rxkad_verify_packet_2() local 566 struct rxrpc_crypt iv; rxkad_verify_packet() local 723 struct rxrpc_crypt iv; rxkad_encrypt_response() local 952 struct rxrpc_crypt iv, key; rxkad_decrypt_ticket() local 1081 struct rxrpc_crypt iv; rxkad_decrypt_response() local
|
| /linux/net/qrtr/ |
| H A D | ns.c | 134 struct kvec iv; in service_announce_new() local 139 iv.iov_base = &pkt; in service_announce_new() 140 iv.iov_len = sizeof(pkt); in service_announce_new() 152 return kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_new() 160 struct kvec iv; in service_announce_del() local 166 iv.iov_base = &pkt; in service_announce_del() 167 iv.iov_len = sizeof(pkt); in service_announce_del() 179 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_del() 191 struct kvec iv; in lookup_notify() local 194 iv.iov_base = &pkt; in lookup_notify() [all …]
|
| /linux/drivers/ssb/ |
| H A 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()
|
| /linux/drivers/crypto/ |
| H A D | padlock-aes.c | 201 u8 *iv, struct cword *control_word, int count) 204 : "+S" (input), "+D" (output), "+a" (iv) in rep_xcrypt_cbc() 206 return iv; in rep_xcrypt_cbc() 224 u8 *iv, struct cword *cword, int count) 234 return rep_xcrypt_cbc(tmp, out, key, iv, cword, count); in cbc_crypt_copy() 252 u8 *iv, struct cword *cword, int count) 256 return cbc_crypt_copy(in, out, key, iv, cword, count); in cbc_crypt() 258 return rep_xcrypt_cbc(in, out, key, iv, cword, count); in cbc_crypt() 284 u8 *iv, void *control_word, u32 count) 289 return cbc_crypt(input, output, key, iv, control_wor in padlock_xcrypt_cbc() 203 rep_xcrypt_cbc(const u8 * input,u8 * output,void * key,u8 * iv,struct cword * control_word,int count) rep_xcrypt_cbc() argument 226 cbc_crypt_copy(const u8 * in,u8 * out,u32 * key,u8 * iv,struct cword * cword,int count) cbc_crypt_copy() argument 254 cbc_crypt(const u8 * in,u8 * out,u32 * key,u8 * iv,struct cword * cword,int count) cbc_crypt() argument 286 padlock_xcrypt_cbc(const u8 * input,u8 * output,void * key,u8 * iv,void * control_word,u32 count) padlock_xcrypt_cbc() argument 422 u8 *iv = padlock_xcrypt_cbc(walk.src.virt.addr, cbc_aes_encrypt() local [all...] |
| /linux/drivers/md/ |
| H A D | dm-crypt.c | 114 int (*generator)(struct crypt_config *cc, u8 *iv, 116 void (*post)(struct crypt_config *cc, u8 *iv, 151 CRYPT_IV_LARGE_SECTORS, /* Calculate IV from sector_size, not 512B sectors */ 204 * IV 206 * The padding is added so that dm_crypt_request and the IV are 325 * Different IV generation algorithms: 350 * with an IV derived from the sector number, the data and 351 * optionally extra IV seed. 356 * version 2: uses 64 multikey scheme with lmk IV generator 357 * version 3: the same as version 2 with additional IV see 362 crypt_iv_plain_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_plain_gen() argument 371 crypt_iv_plain64_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_plain64_gen() argument 380 crypt_iv_plain64be_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_plain64be_gen() argument 390 crypt_iv_essiv_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_essiv_gen() argument 438 crypt_iv_benbi_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_benbi_gen() argument 451 crypt_iv_null_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_null_gen() argument 519 crypt_iv_lmk_one(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq,u8 * data) crypt_iv_lmk_one() argument 546 crypt_iv_lmk_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_lmk_gen() argument 562 crypt_iv_lmk_post(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_lmk_post() argument 661 crypt_iv_tcw_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_tcw_gen() argument 686 crypt_iv_tcw_post(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_tcw_post() argument 702 crypt_iv_random_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_random_gen() argument 726 crypt_iv_eboiv_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_eboiv_gen() argument 985 crypt_iv_elephant_gen(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_elephant_gen() argument 994 crypt_iv_elephant_post(struct crypt_config * cc,u8 * iv,struct dm_crypt_request * dmreq) crypt_iv_elephant_post() argument 1258 u8 *iv, *org_iv, *tag_iv, *tag; crypt_convert_block_aead() local 1361 u8 *iv, *org_iv, *tag_iv; crypt_convert_block_skcipher() local [all...] |