| /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/lib/crypto/ |
| H A D | chacha20poly1305.c | 37 u8 iv[CHACHA_IV_SIZE]; in xchacha_init() local 39 memset(iv, 0, 8); in xchacha_init() 40 memcpy(iv + 8, nonce + 16, 8); in xchacha_init() 48 chacha_init(chacha_state, k, iv); in xchacha_init() 51 memzero_explicit(iv, sizeof(iv)); in xchacha_init() 96 __le64 iv[2]; in chacha20poly1305_encrypt() local 100 iv[0] = 0; in chacha20poly1305_encrypt() 101 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_encrypt() 103 chacha_init(&chacha_state, k, (u8 *)iv); in chacha20poly1305_encrypt() 107 memzero_explicit(iv, sizeof(iv)); in chacha20poly1305_encrypt() [all …]
|
| H A D | aescfb.c | 20 * In AES-CFB, the AES encryption operates on known 'plaintext' (the IV in aescfb_encrypt_block() 39 * @iv: The initialization vector (IV) to use for this block of data 42 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_encrypt() 45 const u8 *v = iv; in aescfb_encrypt() 68 * @iv: The initialization vector (IV) to use for this block of data 71 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_decrypt() 75 aescfb_encrypt_block(key, ks[0], iv); in aescfb_decrypt() 112 u8 iv[AES_BLOCK_SIZ member [all...] |
| /linux/drivers/net/ovpn/ |
| H A D | crypto_aead.c | 48 u8 *iv; in ovpn_aead_encrypt() local 57 * IV head] in ovpn_aead_encrypt() 108 /* iv may be required by async crypto */ in ovpn_aead_encrypt() 109 ovpn_skb_cb(skb)->iv = kmalloc(OVPN_NONCE_SIZE, GFP_ATOMIC); in ovpn_aead_encrypt() 110 if (unlikely(!ovpn_skb_cb(skb)->iv)) in ovpn_aead_encrypt() 113 iv = ovpn_skb_cb(skb)->iv; in ovpn_aead_encrypt() 118 ovpn_pktid_aead_write(pktid, ks->nonce_tail_xmit, iv); in ovpn_aead_encrypt() 122 memcpy(skb->data, iv, OVPN_NONCE_WIRE_SIZE); in ovpn_aead_encrypt() 143 skb->len - ovpn_aead_encap_overhead(ks), iv); in ovpn_aead_encrypt() 159 u8 *iv; in ovpn_aead_decrypt() local [all …]
|
| /linux/drivers/crypto/ccp/ |
| H A D | ccp-crypto-aes.c | 34 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_complete() 84 if (!req->iv) in ccp_aes_crypt() 87 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_crypt() 90 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_crypt() 102 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_crypt() 140 req->iv = rctx->rfc3686_info; in ccp_aes_rfc3686_complete() 164 u8 *iv; in ccp_aes_rfc3686_crypt() local 167 iv = rctx->rfc3686_iv; in ccp_aes_rfc3686_crypt() 168 memcpy(iv, ctx->u.aes.nonce, CTR_RFC3686_NONCE_SIZE); in ccp_aes_rfc3686_crypt() 170 iv += CTR_RFC3686_NONCE_SIZE; in ccp_aes_rfc3686_crypt() [all …]
|
| /linux/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_crypto.c | 69 * encryption IV is always all zeroes, the confounder also effectively 70 * functions like an IV. Thus, not only must it be unique from message 89 * @iv: pointer to an IV 94 * @iv may be NULL to force the use of an all-zero IV. 95 * The buffer containing the IV must be as large as the 105 void * iv, in krb5_encrypt() argument 119 dprintk("RPC: gss_k5encrypt: tfm iv size too large %d\n", in krb5_encrypt() 124 if (iv) in krb5_encrypt() 125 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt() 225 u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; member [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 | 35 int rounds, int blocks, u8 iv[]); 38 int rounds, int blocks, u8 iv[]); 41 int rounds, int blocks, u8 iv[]); 43 int rounds, int blocks, u8 iv[]); 49 int rounds, int blocks, u8 iv[]); 54 u32 const rk2[], u8 iv[], int first); 57 u32 const rk2[], u8 iv[], int first); 171 walk.iv); in cbc_encrypt() 196 walk.iv); in cbc_decrypt() 223 walk.iv); in ctr_encrypt() [all …]
|
| /linux/net/qrtr/ |
| H A D | ns.c | 114 struct kvec iv; in service_announce_new() local 119 iv.iov_base = &pkt; in service_announce_new() 120 iv.iov_len = sizeof(pkt); in service_announce_new() 132 return kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_new() 140 struct kvec iv; in service_announce_del() local 146 iv.iov_base = &pkt; in service_announce_del() 147 iv.iov_len = sizeof(pkt); in service_announce_del() 159 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_del() 171 struct kvec iv; in lookup_notify() local 174 iv.iov_base = &pkt; in lookup_notify() [all …]
|
| /linux/include/linux/ |
| H A D | ccp.h | 151 * @iv: IV to be used for this AES operation 152 * @iv_len: length in bytes of iv 162 * - iv, iv_len for any mode other than ECB 166 * The iv variable is used as both input and output. On completion of the 167 * AES operation the new IV overwrites the old IV. 179 struct scatterlist *iv; member 218 * @iv: IV to be used for this XTS AES operation 219 * @iv_len: length in bytes of iv 226 * - action, unit_size, key, key_len, iv, iv_len, src, dst, src_len, final 228 * The iv variable is used as both input and output. On completion of the [all …]
|
| /linux/tools/testing/crypto/chacha20-s390/ |
| H A D | test-cipher.c | 54 u8 iv[16], key[32]; in test_lib_chacha() local 58 memset(iv, 'I', sizeof(iv)); in test_lib_chacha() 64 print_hex_dump(KERN_INFO, "iv: ", DUMP_PREFIX_OFFSET, in test_lib_chacha() 65 16, 1, iv, 16, 1); in test_lib_chacha() 69 chacha_init(&chacha_state, (u32 *)key, iv); in test_lib_chacha() 84 chacha_init(&chacha_state, (u32 *)key, iv); in test_lib_chacha() 131 u8 iv[16], key[32]; in test_skcipher() local 153 memset(iv, 'I', sizeof(iv)); in test_skcipher() [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");
|
| /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/io_uring/ |
| H A D | rsrc.h | 74 int io_prep_reg_iovec(struct io_kiocb *req, struct iou_vec *iv, 138 void io_vec_free(struct iou_vec *iv); in io_vec_reset_iovec() 139 int io_vec_realloc(struct iou_vec *iv, unsigned nr_entries); in io_vec_reset_iovec() 141 static inline void io_vec_reset_iovec(struct iou_vec *iv, in io_vec_reset_iovec() 144 io_vec_free(iv); in io_alloc_cache_vec_kasan() 145 iv->iovec = iovec; in io_alloc_cache_vec_kasan() 146 iv->nr = nr; in io_alloc_cache_vec_kasan() 149 static inline void io_alloc_cache_vec_kasan(struct iou_vec *iv) 152 io_vec_free(iv); 135 io_vec_reset_iovec(struct iou_vec * iv,struct iovec * iovec,unsigned nr) io_vec_reset_iovec() argument 143 io_alloc_cache_vec_kasan(struct iou_vec * iv) io_alloc_cache_vec_kasan() argument
|
| /linux/net/rxrpc/ |
| H A D | rxkad.c | 197 struct rxrpc_crypt iv; in rxkad_prime_packet_security() local 217 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_prime_packet_security() 227 skcipher_request_set_crypt(req, &sg, &sg, tmpsize, iv.x); in rxkad_prime_packet_security() 263 struct rxrpc_crypt iv; in rxkad_secure_packet_auth() local 283 memset(&iv, 0, sizeof(iv)); in rxkad_secure_packet_auth() 288 skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); in rxkad_secure_packet_auth() 305 struct rxrpc_crypt iv; in rxkad_secure_packet_encrypt() local 326 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_secure_packet_encrypt() 331 skcipher_request_set_crypt(req, &sg, &sg, txb->pkt_len, iv.x); in rxkad_secure_packet_encrypt() 343 struct rxrpc_crypt iv; in rxkad_secure_packet() local [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). 160 IV generators will use sector number counted in <sector_size> units [all …]
|
| /linux/arch/x86/crypto/ |
| 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/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/block/ |
| H A D | t10-pi.c | 136 struct bio_vec iv; in t10_pi_type1_prepare() local 143 bip_for_each_vec(iv, bip, iter) { in t10_pi_type1_prepare() 147 p = bvec_kmap_local(&iv); in t10_pi_type1_prepare() 148 for (j = 0; j < iv.bv_len; j += tuple_sz) { in t10_pi_type1_prepare() 188 struct bio_vec iv; in t10_pi_type1_complete() local 191 bip_for_each_vec(iv, bip, iter) { in t10_pi_type1_complete() 195 p = bvec_kmap_local(&iv); in t10_pi_type1_complete() 196 for (j = 0; j < iv.bv_len && intervals; j += tuple_sz) { in t10_pi_type1_complete() 310 struct bio_vec iv; in ext_pi_type1_prepare() local 317 bip_for_each_vec(iv, bip, iter) { in ext_pi_type1_prepare() [all …]
|