Home
last modified time | relevance | path

Searched full:iv (Results 1 – 25 of 563) sorted by relevance

12345678910>>...23

/linux/arch/s390/include/asm/
H A Dairq.h53 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/crypto/
H A Dcbc.c17 u8 *iv) in crypto_cbc_encrypt_segment() argument
22 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment()
23 crypto_lskcipher_encrypt(tfm, iv, dst, bsize, NULL); in crypto_cbc_encrypt_segment()
24 memcpy(iv, dst, bsize); in crypto_cbc_encrypt_segment()
34 u8 *iv = oiv; in crypto_cbc_encrypt_inplace() local
40 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace()
42 iv = src; in crypto_cbc_encrypt_inplace()
47 memcpy(oiv, iv, bsize); in crypto_cbc_encrypt_inplace()
54 u8 *dst, unsigned len, u8 *iv, u32 flags) in crypto_cbc_encrypt() argument
62 rem = crypto_cbc_encrypt_inplace(cipher, dst, len, iv); in crypto_cbc_encrypt()
[all …]
H A Dpcbc.c28 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_segment() local
31 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_segment()
32 crypto_cipher_encrypt_one(tfm, dst, iv); in crypto_pcbc_encrypt_segment()
33 crypto_xor_cpy(iv, dst, src, bsize); in crypto_pcbc_encrypt_segment()
49 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_inplace() local
54 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_inplace()
55 crypto_cipher_encrypt_one(tfm, src, iv); in crypto_pcbc_encrypt_inplace()
56 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace()
95 u8 * const iv = walk->iv; in crypto_pcbc_decrypt_segment() local
99 crypto_xor(dst, iv, bsize); in crypto_pcbc_decrypt_segment()
[all …]
H A Dkeywrap.c43 * with the 2nd semiblock. The first semiblock is provided as the IV.
44 * The IV used to start the encryption operation is the default IV.
47 * IV. The ciphertext is the data starting with the 2nd semiblock. The
56 * u8 *iv = data;
60 * skcipher_request_set_crypt(req, &sg, &sg, ptlen, iv);
70 * u8 *iv = data;
74 * skcipher_request_set_crypt(req, &sg, &sg, ctlen, iv);
136 * required by SP800-38F is the IV. in crypto_kw_decrypt()
141 /* Place the IV into block A */ in crypto_kw_decrypt()
142 memcpy(&block.A, req->iv, SEMIBSIZE); in crypto_kw_decrypt()
[all …]
H A Dseqiv.c3 * 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()
65 info = req->iv; in seqiv_aead_encrypt()
84 info = kmemdup(req->iv, ivsize, req->base.flags & in seqiv_aead_encrypt()
103 if (unlikely(info != req->iv)) in seqiv_aead_encrypt()
127 req->cryptlen - ivsize, req->iv); in seqiv_aead_decrypt()
130 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in seqiv_aead_decrypt()
186 MODULE_DESCRIPTION("Sequence Number IV Generator");
/linux/net/mac80211/
H A Dwep.c28 /* 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/arch/x86/crypto/
H A Daesni-intel_asm.S33 #define IV %xmm3 macro
751 * size_t len, u8 *iv)
764 movl (FRAME_OFFSET+36)(%esp), IVP # iv
769 movups (IVP), STATE # load iv as initial state
795 * size_t len, u8 *iv)
808 movl (FRAME_OFFSET+36)(%esp), IVP # iv
814 movups (IVP), IV
835 pxor IV, STATE1
840 movaps IN4, IV
843 movaps IN2, IV
[all …]
H A Dsm4_aesni_avx_glue.c27 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 …]
/linux/drivers/crypto/nx/
H A Dnx-aes-ccm.c123 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument
126 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv()
133 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument
138 memcpy(b0, iv, 16); in generate_b0()
153 static int generate_pat(u8 *iv, in generate_pat() argument
169 memset(iv + 15 - iv[0], 0, iv[0] + 1); in generate_pat()
208 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat()
327 u8 *iv, in ccm_nx_decrypt() argument
348 rc = generate_pat(iv, req, nx_ctx, authsize, nbytes, assoclen, in ccm_nx_decrypt()
367 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src, in ccm_nx_decrypt()
[all …]
H A Dnx-aes-gcm.c169 static int gmac(struct aead_request *req, const u8 *iv, unsigned int assoclen) in gmac() argument
191 /* Copy IV */ in gmac()
192 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, iv, AES_BLOCK_SIZE); in gmac()
242 static int gcm_empty(struct aead_request *req, const u8 *iv, int enc) in gcm_empty() argument
254 * zeros, and set the input IV value to be the same as the GMAC IV in gcm_empty()
268 /* Encrypt the counter/IV */ in gcm_empty()
269 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) iv, in gcm_empty()
322 *(u32 *)&rctx->iv[NX_GCM_CTR_OFFSET] = 1; in gcm_aes_nx_crypt()
326 rc = gcm_empty(req, rctx->iv, enc); in gcm_aes_nx_crypt()
328 rc = gmac(req, rctx->iv, assoclen); in gcm_aes_nx_crypt()
[all …]
H A Dnx-aes-ctr.c72 static int ctr_aes_nx_crypt(struct skcipher_request *req, u8 *iv) in ctr_aes_nx_crypt() argument
86 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src, in ctr_aes_nx_crypt()
88 csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt()
102 memcpy(iv, csbcpb->cpb.aes_cbc.cv, AES_BLOCK_SIZE); in ctr_aes_nx_crypt()
119 u8 iv[16]; in ctr3686_aes_nx_crypt() local
121 memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_NONCE_SIZE); in ctr3686_aes_nx_crypt()
122 memcpy(iv + CTR_RFC3686_NONCE_SIZE, req->iv, CTR_RFC3686_IV_SIZE); in ctr3686_aes_nx_crypt()
123 iv[12] = iv[13] = iv[14] = 0; in ctr3686_aes_nx_crypt()
124 iv[15] = 1; in ctr3686_aes_nx_crypt()
126 return ctr_aes_nx_crypt(req, iv); in ctr3686_aes_nx_crypt()
/linux/arch/riscv/crypto/
H A Dchacha-riscv64-glue.c17 size_t len, const u32 iv[4]);
21 u32 iv[CHACHA_IV_SIZE / sizeof(u32)]; in riscv64_chacha20_crypt() local
30 iv[0] = get_unaligned_le32(req->iv); in riscv64_chacha20_crypt()
31 iv[1] = get_unaligned_le32(req->iv + 4); in riscv64_chacha20_crypt()
32 iv[2] = get_unaligned_le32(req->iv + 8); in riscv64_chacha20_crypt()
33 iv[3] = get_unaligned_le32(req->iv + 12); in riscv64_chacha20_crypt()
42 walk.dst.virt.addr, nbytes, iv); in riscv64_chacha20_crypt()
43 iv[0] += nbytes / CHACHA_BLOCK_SIZE; in riscv64_chacha20_crypt()
49 CHACHA_BLOCK_SIZE, iv); in riscv64_chacha20_crypt()
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00crypto.c74 * 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/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c69 * 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()
144 * @iv: pointer to an IV
[all …]
/linux/lib/crypto/
H A Dchacha20poly1305.c39 u8 iv[CHACHA_IV_SIZE]; in xchacha_init() local
41 memset(iv, 0, 8); in xchacha_init()
42 memcpy(iv + 8, nonce + 16, 8); in xchacha_init()
50 chacha_init(chacha_state, k, iv); in xchacha_init()
53 memzero_explicit(iv, sizeof(iv)); in xchacha_init()
97 __le64 iv[2]; in chacha20poly1305_encrypt() local
101 iv[0] = 0; in chacha20poly1305_encrypt()
102 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_encrypt()
104 chacha_init(chacha_state, k, (u8 *)iv); in chacha20poly1305_encrypt()
107 memzero_explicit(iv, sizeof(iv)); in chacha20poly1305_encrypt()
[all …]
H A Daescfb.c21 * In AES-CFB, the AES encryption operates on known 'plaintext' (the IV in aescfb_encrypt_block()
40 * @iv: The initialization vector (IV) to use for this block of data
43 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_encrypt()
46 const u8 *v = iv; in aescfb_encrypt()
69 * @iv: The initialization vector (IV) to use for this block of data
72 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_decrypt()
76 aescfb_encrypt_block(ctx, ks[0], iv); in aescfb_decrypt()
113 u8 iv[AES_BLOCK_SIZE]; member
122 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
146 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
[all …]
/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes.c33 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_complete()
83 if (!req->iv) in ccp_aes_crypt()
86 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_crypt()
89 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_crypt()
101 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_crypt()
139 req->iv = rctx->rfc3686_info; in ccp_aes_rfc3686_complete()
163 u8 *iv; in ccp_aes_rfc3686_crypt() local
166 iv = rctx->rfc3686_iv; in ccp_aes_rfc3686_crypt()
167 memcpy(iv, ctx->u.aes.nonce, CTR_RFC3686_NONCE_SIZE); in ccp_aes_rfc3686_crypt()
169 iv += CTR_RFC3686_NONCE_SIZE; in ccp_aes_rfc3686_crypt()
[all …]
/linux/drivers/crypto/amcc/
H A Dcrypto4xx_alg.c75 __le32 iv[AES_IV_SIZE]; in crypto4xx_crypt() local
81 crypto4xx_memcpy_to_le32(iv, req->iv, ivlen); in crypto4xx_crypt()
84 req->cryptlen, iv, ivlen, decrypt ? ctx->sa_in : ctx->sa_out, in crypto4xx_crypt()
212 __le32 iv[AES_IV_SIZE / 4] = { in crypto4xx_rfc3686_encrypt() local
214 cpu_to_le32p((u32 *) req->iv), in crypto4xx_rfc3686_encrypt()
215 cpu_to_le32p((u32 *) (req->iv + 4)), in crypto4xx_rfc3686_encrypt()
219 req->cryptlen, iv, AES_IV_SIZE, in crypto4xx_rfc3686_encrypt()
227 __le32 iv[AES_IV_SIZE / 4] = { in crypto4xx_rfc3686_decrypt() local
229 cpu_to_le32p((u32 *) req->iv), in crypto4xx_rfc3686_decrypt()
230 cpu_to_le32p((u32 *) (req->iv + 4)), in crypto4xx_rfc3686_decrypt()
[all …]
/linux/block/
H A Dblk-integrity.c29 struct bio_vec iv, ivprv = { NULL }; in blk_rq_count_integrity_sg() local
35 bio_for_each_integrity_vec(iv, bio, iter) { in blk_rq_count_integrity_sg()
38 if (!biovec_phys_mergeable(q, &ivprv, &iv)) in blk_rq_count_integrity_sg()
40 if (seg_size + iv.bv_len > queue_max_segment_size(q)) in blk_rq_count_integrity_sg()
43 seg_size += iv.bv_len; in blk_rq_count_integrity_sg()
47 seg_size = iv.bv_len; in blk_rq_count_integrity_sg()
51 ivprv = iv; in blk_rq_count_integrity_sg()
69 struct bio_vec iv, ivprv = { NULL }; in blk_rq_map_integrity_sg() local
77 bio_for_each_integrity_vec(iv, bio, iter) { in blk_rq_map_integrity_sg()
79 if (!biovec_phys_mergeable(q, &ivprv, &iv)) in blk_rq_map_integrity_sg()
[all …]
/linux/arch/arm64/crypto/
H A Dsm4-neon-glue.c24 u8 *iv, unsigned int nblocks);
26 u8 *iv, unsigned int nblocks);
91 const u8 *iv = walk.iv; in sm4_cbc_encrypt() local
96 crypto_xor_cpy(dst, src, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt()
98 iv = dst; in sm4_cbc_encrypt()
103 if (iv != walk.iv) in sm4_cbc_encrypt()
104 memcpy(walk.iv, iv, SM4_BLOCK_SIZE); in sm4_cbc_encrypt()
132 walk.iv, nblocks); in sm4_cbc_decrypt()
163 walk.iv, nblocks); in sm4_ctr_crypt()
176 sm4_crypt_block(ctx->rkey_enc, keystream, walk.iv); in sm4_ctr_crypt()
[all …]
H A Daes-neonbs-glue.c35 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);
173 walk.iv); in cbc_encrypt()
199 walk.iv); in cbc_decrypt()
226 blocks, walk.iv); in ctr_encrypt()
[all …]
H A Dghash-ce-glue.c335 static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen) in gcm_encrypt() argument
353 put_unaligned_be32(2, iv + GCM_AES_IV_SIZE); in gcm_encrypt()
374 dg, iv, ctx->aes_key.key_enc, nrounds, in gcm_encrypt()
398 static int gcm_decrypt(struct aead_request *req, char *iv, int assoclen) in gcm_decrypt() argument
419 put_unaligned_be32(2, iv + GCM_AES_IV_SIZE); in gcm_decrypt()
444 dg, iv, ctx->aes_key.key_enc, in gcm_decrypt()
466 u8 iv[AES_BLOCK_SIZE]; in gcm_aes_encrypt() local
468 memcpy(iv, req->iv, GCM_AES_IV_SIZE); in gcm_aes_encrypt()
469 return gcm_encrypt(req, iv, req->assoclen); in gcm_aes_encrypt()
474 u8 iv[AES_BLOCK_SIZE]; in gcm_aes_decrypt() local
[all …]
/linux/net/qrtr/
H A Dns.c114 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/crypto/
H A Dchacha.h7 * function; only their IV size and encrypt/decrypt function differ.
65 void chacha_init_arch(u32 *state, const u32 *key, const u8 *iv);
66 static inline void chacha_init_generic(u32 *state, const u32 *key, const u8 *iv) in chacha_init_generic() argument
77 state[12] = get_unaligned_le32(iv + 0); in chacha_init_generic()
78 state[13] = get_unaligned_le32(iv + 4); in chacha_init_generic()
79 state[14] = get_unaligned_le32(iv + 8); in chacha_init_generic()
80 state[15] = get_unaligned_le32(iv + 12); in chacha_init_generic()
83 static inline void chacha_init(u32 *state, const u32 *key, const u8 *iv) in chacha_init() argument
86 chacha_init_arch(state, key, iv); in chacha_init()
88 chacha_init_generic(state, key, iv); in chacha_init()
/linux/include/linux/
H A Dccp.h151 * @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 …]

12345678910>>...23