Home
last modified time | relevance | path

Searched refs:bsize (Results 1 – 10 of 10) sorted by relevance

/crypto/
Dpcbc.c23 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_segment() local
30 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_segment()
32 crypto_xor_cpy(iv, dst, src, bsize); in crypto_pcbc_encrypt_segment()
34 src += bsize; in crypto_pcbc_encrypt_segment()
35 dst += bsize; in crypto_pcbc_encrypt_segment()
36 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment()
45 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_inplace() local
52 memcpy(tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace()
53 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_inplace()
55 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace()
[all …]
Dcfb.c60 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_segment() local
68 crypto_xor(dst, src, bsize); in crypto_cfb_encrypt_segment()
71 src += bsize; in crypto_cfb_encrypt_segment()
72 dst += bsize; in crypto_cfb_encrypt_segment()
73 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment()
75 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_segment()
83 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_inplace() local
91 crypto_xor(src, tmp, bsize); in crypto_cfb_encrypt_inplace()
94 src += bsize; in crypto_cfb_encrypt_inplace()
95 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace()
[all …]
Dcts.c107 int bsize = crypto_skcipher_blocksize(tfm); in cts_cbc_encrypt() local
116 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt()
117 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt()
119 memset(d, 0, bsize); in cts_cbc_encrypt()
122 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt()
128 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt()
153 int bsize = crypto_skcipher_blocksize(tfm); in crypto_cts_encrypt() local
159 if (nbytes < bsize) in crypto_cts_encrypt()
162 if (nbytes == bsize) { in crypto_cts_encrypt()
171 offset = rounddown(nbytes - 1, bsize); in crypto_cts_encrypt()
[all …]
Dctr.c30 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() local
42 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_final()
50 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() local
59 crypto_xor(dst, src, bsize); in crypto_ctr_crypt_segment()
62 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_segment()
64 src += bsize; in crypto_ctr_crypt_segment()
65 dst += bsize; in crypto_ctr_crypt_segment()
66 } while ((nbytes -= bsize) >= bsize); in crypto_ctr_crypt_segment()
76 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_inplace() local
87 crypto_xor(src, keystream, bsize); in crypto_ctr_crypt_inplace()
[all …]
Dofb.c21 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ofb_crypt() local
27 while (walk.nbytes >= bsize) { in crypto_ofb_crypt()
35 crypto_xor_cpy(dst, src, iv, bsize); in crypto_ofb_crypt()
36 dst += bsize; in crypto_ofb_crypt()
37 src += bsize; in crypto_ofb_crypt()
38 } while ((nbytes -= bsize) >= bsize); in crypto_ofb_crypt()
Decb.c19 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt() local
33 src += bsize; in crypto_ecb_crypt()
34 dst += bsize; in crypto_ecb_crypt()
35 } while ((nbytes -= bsize) >= bsize); in crypto_ecb_crypt()
Dablkcipher.c139 unsigned int bsize, in ablkcipher_next_slow() argument
143 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in ablkcipher_next_slow()
159 src = dst = ablkcipher_get_spot(dst, bsize); in ablkcipher_next_slow()
161 p->len = bsize; in ablkcipher_next_slow()
164 scatterwalk_copychunks(src, &walk->in, bsize, 0); in ablkcipher_next_slow()
168 walk->nbytes = bsize; in ablkcipher_next_slow()
217 unsigned int alignmask, bsize, n; in ablkcipher_walk_next() local
231 bsize = min(walk->blocksize, n); in ablkcipher_walk_next()
235 if (n < bsize || in ablkcipher_walk_next()
238 err = ablkcipher_next_slow(req, walk, bsize, alignmask, in ablkcipher_walk_next()
Dblkcipher.c69 unsigned int bsize) in blkcipher_done_slow() argument
74 addr = blkcipher_get_spot(addr, bsize); in blkcipher_done_slow()
75 scatterwalk_copychunks(addr, &walk->out, bsize, 1); in blkcipher_done_slow()
141 unsigned int bsize, in blkcipher_next_slow() argument
145 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in blkcipher_next_slow()
163 walk->dst.virt.addr = blkcipher_get_spot(walk->dst.virt.addr, bsize); in blkcipher_next_slow()
165 aligned_bsize, bsize); in blkcipher_next_slow()
167 scatterwalk_copychunks(walk->src.virt.addr, &walk->in, bsize, 0); in blkcipher_next_slow()
169 walk->nbytes = bsize; in blkcipher_next_slow()
219 unsigned int bsize; in blkcipher_walk_next() local
[all …]
Dskcipher.c93 static int skcipher_done_slow(struct skcipher_walk *walk, unsigned int bsize) in skcipher_done_slow() argument
98 addr = skcipher_get_spot(addr, bsize); in skcipher_done_slow()
99 scatterwalk_copychunks(addr, &walk->out, bsize, in skcipher_done_slow()
224 static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize) in skcipher_next_slow() argument
244 n = bsize; in skcipher_next_slow()
256 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow()
264 p->len = bsize; in skcipher_next_slow()
274 walk->dst.virt.addr = skcipher_get_spot(walk->dst.virt.addr, bsize); in skcipher_next_slow()
277 scatterwalk_copychunks(walk->src.virt.addr, &walk->in, bsize, 0); in skcipher_next_slow()
279 walk->nbytes = bsize; in skcipher_next_slow()
[all …]
Dlrw.c73 int err, bsize = LRW_BLOCK_SIZE; in setkey() local
74 const u8 *tweak = key + keylen - bsize; in setkey()
81 err = crypto_skcipher_setkey(child, key, keylen - bsize); in setkey()