Home
last modified time | relevance | path

Searched refs:walk (Results 1 – 18 of 18) sorted by relevance

/crypto/
Dblkcipher.c35 struct blkcipher_walk *walk);
37 struct blkcipher_walk *walk);
39 static inline void blkcipher_map_src(struct blkcipher_walk *walk) in blkcipher_map_src() argument
41 walk->src.virt.addr = scatterwalk_map(&walk->in); in blkcipher_map_src()
44 static inline void blkcipher_map_dst(struct blkcipher_walk *walk) in blkcipher_map_dst() argument
46 walk->dst.virt.addr = scatterwalk_map(&walk->out); in blkcipher_map_dst()
49 static inline void blkcipher_unmap_src(struct blkcipher_walk *walk) in blkcipher_unmap_src() argument
51 scatterwalk_unmap(walk->src.virt.addr); in blkcipher_unmap_src()
54 static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk) in blkcipher_unmap_dst() argument
56 scatterwalk_unmap(walk->dst.virt.addr); in blkcipher_unmap_dst()
[all …]
Dskcipher.c42 static int skcipher_walk_next(struct skcipher_walk *walk);
44 static inline void skcipher_unmap(struct scatter_walk *walk, void *vaddr) in skcipher_unmap() argument
46 if (PageHighMem(scatterwalk_page(walk))) in skcipher_unmap()
50 static inline void *skcipher_map(struct scatter_walk *walk) in skcipher_map() argument
52 struct page *page = scatterwalk_page(walk); in skcipher_map()
55 offset_in_page(walk->offset); in skcipher_map()
58 static inline void skcipher_map_src(struct skcipher_walk *walk) in skcipher_map_src() argument
60 walk->src.virt.addr = skcipher_map(&walk->in); in skcipher_map_src()
63 static inline void skcipher_map_dst(struct skcipher_walk *walk) in skcipher_map_dst() argument
65 walk->dst.virt.addr = skcipher_map(&walk->out); in skcipher_map_dst()
[all …]
Dablkcipher.c40 void __ablkcipher_walk_complete(struct ablkcipher_walk *walk) in __ablkcipher_walk_complete() argument
44 list_for_each_entry_safe(p, tmp, &walk->buffers, entry) { in __ablkcipher_walk_complete()
52 static inline void ablkcipher_queue_write(struct ablkcipher_walk *walk, in ablkcipher_queue_write() argument
55 p->dst = walk->out; in ablkcipher_queue_write()
56 list_add_tail(&p->entry, &walk->buffers); in ablkcipher_queue_write()
69 static inline void ablkcipher_done_slow(struct ablkcipher_walk *walk, in ablkcipher_done_slow() argument
73 unsigned int len_this_page = scatterwalk_pagelen(&walk->out); in ablkcipher_done_slow()
77 scatterwalk_advance(&walk->out, n); in ablkcipher_done_slow()
81 scatterwalk_start(&walk->out, sg_next(walk->out.sg)); in ablkcipher_done_slow()
85 static inline void ablkcipher_done_fast(struct ablkcipher_walk *walk, in ablkcipher_done_fast() argument
[all …]
Dcfb.c42 static void crypto_cfb_final(struct skcipher_walk *walk, in crypto_cfb_final() argument
48 u8 *src = walk->src.virt.addr; in crypto_cfb_final()
49 u8 *dst = walk->dst.virt.addr; in crypto_cfb_final()
50 u8 *iv = walk->iv; in crypto_cfb_final()
51 unsigned int nbytes = walk->nbytes; in crypto_cfb_final()
57 static int crypto_cfb_encrypt_segment(struct skcipher_walk *walk, in crypto_cfb_encrypt_segment() argument
61 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment()
62 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_segment()
63 u8 *dst = walk->dst.virt.addr; in crypto_cfb_encrypt_segment()
64 u8 *iv = walk->iv; in crypto_cfb_encrypt_segment()
[all …]
Dpcbc.c20 struct skcipher_walk *walk, in crypto_pcbc_encrypt_segment() argument
24 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment()
25 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_segment()
26 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_encrypt_segment()
27 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_segment()
42 struct skcipher_walk *walk, in crypto_pcbc_encrypt_inplace() argument
46 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace()
47 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_inplace()
48 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_inplace()
67 struct skcipher_walk walk; in crypto_pcbc_encrypt() local
[all …]
Dahash.c40 static int hash_walk_next(struct crypto_hash_walk *walk) in hash_walk_next() argument
42 unsigned int alignmask = walk->alignmask; in hash_walk_next()
43 unsigned int offset = walk->offset; in hash_walk_next()
44 unsigned int nbytes = min(walk->entrylen, in hash_walk_next()
47 if (walk->flags & CRYPTO_ALG_ASYNC) in hash_walk_next()
48 walk->data = kmap(walk->pg); in hash_walk_next()
50 walk->data = kmap_atomic(walk->pg); in hash_walk_next()
51 walk->data += offset; in hash_walk_next()
60 walk->entrylen -= nbytes; in hash_walk_next()
64 static int hash_walk_new_entry(struct crypto_hash_walk *walk) in hash_walk_new_entry() argument
[all …]
Dofb.c22 struct skcipher_walk walk; in crypto_ofb_crypt() local
25 err = skcipher_walk_virt(&walk, req, false); in crypto_ofb_crypt()
27 while (walk.nbytes >= bsize) { in crypto_ofb_crypt()
28 const u8 *src = walk.src.virt.addr; in crypto_ofb_crypt()
29 u8 *dst = walk.dst.virt.addr; in crypto_ofb_crypt()
30 u8 * const iv = walk.iv; in crypto_ofb_crypt()
31 unsigned int nbytes = walk.nbytes; in crypto_ofb_crypt()
40 err = skcipher_walk_done(&walk, nbytes); in crypto_ofb_crypt()
43 if (walk.nbytes) { in crypto_ofb_crypt()
44 crypto_cipher_encrypt_one(cipher, walk.iv, walk.iv); in crypto_ofb_crypt()
[all …]
Dctr.c27 static void crypto_ctr_crypt_final(struct skcipher_walk *walk, in crypto_ctr_crypt_final() argument
32 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_final()
35 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_final()
36 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_final()
37 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_final()
45 static int crypto_ctr_crypt_segment(struct skcipher_walk *walk, in crypto_ctr_crypt_segment() argument
51 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_segment()
52 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_segment()
53 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_segment()
54 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_segment()
[all …]
Dscatterwalk.c26 void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, in scatterwalk_copychunks() argument
30 unsigned int len_this_page = scatterwalk_pagelen(walk); in scatterwalk_copychunks()
37 vaddr = scatterwalk_map(walk); in scatterwalk_copychunks()
42 scatterwalk_advance(walk, len_this_page); in scatterwalk_copychunks()
50 scatterwalk_pagedone(walk, out & 1, 1); in scatterwalk_copychunks()
58 struct scatter_walk walk; in scatterwalk_map_and_copy() local
66 scatterwalk_start(&walk, sg); in scatterwalk_map_and_copy()
67 scatterwalk_copychunks(buf, &walk, nbytes, out); in scatterwalk_map_and_copy()
68 scatterwalk_done(&walk, out, 0); in scatterwalk_map_and_copy()
Darc4.c28 struct skcipher_walk walk; in crypto_arc4_crypt() local
31 err = skcipher_walk_virt(&walk, req, false); in crypto_arc4_crypt()
33 while (walk.nbytes > 0) { in crypto_arc4_crypt()
34 arc4_crypt(ctx, walk.dst.virt.addr, walk.src.virt.addr, in crypto_arc4_crypt()
35 walk.nbytes); in crypto_arc4_crypt()
36 err = skcipher_walk_done(&walk, 0); in crypto_arc4_crypt()
Dcrypto_null.c78 struct skcipher_walk walk; in null_skcipher_crypt() local
81 err = skcipher_walk_virt(&walk, req, false); in null_skcipher_crypt()
83 while (walk.nbytes) { in null_skcipher_crypt()
84 if (walk.src.virt.addr != walk.dst.virt.addr) in null_skcipher_crypt()
85 memcpy(walk.dst.virt.addr, walk.src.virt.addr, in null_skcipher_crypt()
86 walk.nbytes); in null_skcipher_crypt()
87 err = skcipher_walk_done(&walk, 0); in null_skcipher_crypt()
Daegis128-core.c39 int (*skcipher_walk_init)(struct skcipher_walk *walk,
285 struct scatter_walk walk; in crypto_aegis128_process_ad() local
289 scatterwalk_start(&walk, sg_src); in crypto_aegis128_process_ad()
291 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis128_process_ad()
293 void *mapped = scatterwalk_map(&walk); in crypto_aegis128_process_ad()
316 scatterwalk_advance(&walk, size); in crypto_aegis128_process_ad()
317 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis128_process_ad()
330 struct skcipher_walk walk; in crypto_aegis128_process_crypt() local
332 ops->skcipher_walk_init(&walk, req, false); in crypto_aegis128_process_crypt()
334 while (walk.nbytes) { in crypto_aegis128_process_crypt()
[all …]
Dsalsa20_generic.c157 struct skcipher_walk walk; in salsa20_crypt() local
161 err = skcipher_walk_virt(&walk, req, false); in salsa20_crypt()
165 while (walk.nbytes > 0) { in salsa20_crypt()
166 unsigned int nbytes = walk.nbytes; in salsa20_crypt()
168 if (nbytes < walk.total) in salsa20_crypt()
169 nbytes = round_down(nbytes, walk.stride); in salsa20_crypt()
171 salsa20_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, in salsa20_crypt()
173 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in salsa20_crypt()
Decb.c20 struct skcipher_walk walk; in crypto_ecb_crypt() local
24 err = skcipher_walk_virt(&walk, req, false); in crypto_ecb_crypt()
26 while ((nbytes = walk.nbytes) != 0) { in crypto_ecb_crypt()
27 const u8 *src = walk.src.virt.addr; in crypto_ecb_crypt()
28 u8 *dst = walk.dst.virt.addr; in crypto_ecb_crypt()
37 err = skcipher_walk_done(&walk, nbytes); in crypto_ecb_crypt()
Dchacha_generic.c37 struct skcipher_walk walk; in chacha_stream_xor() local
41 err = skcipher_walk_virt(&walk, req, false); in chacha_stream_xor()
45 while (walk.nbytes > 0) { in chacha_stream_xor()
46 unsigned int nbytes = walk.nbytes; in chacha_stream_xor()
48 if (nbytes < walk.total) in chacha_stream_xor()
51 chacha_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, in chacha_stream_xor()
53 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in chacha_stream_xor()
Dcbc.c37 struct skcipher_walk walk; in crypto_cbc_decrypt() local
40 err = skcipher_walk_virt(&walk, req, false); in crypto_cbc_decrypt()
42 while (walk.nbytes) { in crypto_cbc_decrypt()
43 err = crypto_cbc_decrypt_blocks(&walk, tfm, in crypto_cbc_decrypt()
45 err = skcipher_walk_done(&walk, err); in crypto_cbc_decrypt()
Dshash.c242 struct crypto_hash_walk walk; in shash_ahash_update() local
245 for (nbytes = crypto_hash_walk_first(req, &walk); nbytes > 0; in shash_ahash_update()
246 nbytes = crypto_hash_walk_done(&walk, nbytes)) in shash_ahash_update()
247 nbytes = crypto_shash_update(desc, walk.data, nbytes); in shash_ahash_update()
265 struct crypto_hash_walk walk; in shash_ahash_finup() local
268 nbytes = crypto_hash_walk_first(req, &walk); in shash_ahash_finup()
273 nbytes = crypto_hash_walk_last(&walk) ? in shash_ahash_finup()
274 crypto_shash_finup(desc, walk.data, nbytes, in shash_ahash_finup()
276 crypto_shash_update(desc, walk.data, nbytes); in shash_ahash_finup()
277 nbytes = crypto_hash_walk_done(&walk, nbytes); in shash_ahash_finup()
Dkeywrap.c101 static void crypto_kw_scatterlist_ff(struct scatter_walk *walk, in crypto_kw_scatterlist_ff() argument
113 scatterwalk_start(walk, sg); in crypto_kw_scatterlist_ff()
114 scatterwalk_advance(walk, skip); in crypto_kw_scatterlist_ff()