Lines Matching refs:bsize
103 int bsize = crypto_skcipher_blocksize(tfm); in cts_cbc_encrypt() local
112 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt()
113 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt()
115 memset(d, 0, bsize); in cts_cbc_encrypt()
118 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt()
124 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt()
149 int bsize = crypto_skcipher_blocksize(tfm); in crypto_cts_encrypt() local
155 if (nbytes < bsize) in crypto_cts_encrypt()
158 if (nbytes == bsize) { in crypto_cts_encrypt()
167 offset = rounddown(nbytes - 1, bsize); in crypto_cts_encrypt()
184 int bsize = crypto_skcipher_blocksize(tfm); in cts_cbc_decrypt() local
194 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_decrypt()
197 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_decrypt()
199 crypto_xor(d + bsize, space, bsize); in cts_cbc_decrypt()
201 memset(d, 0, bsize); in cts_cbc_decrypt()
205 crypto_xor(d + bsize, d, lastn); in cts_cbc_decrypt()
208 memcpy(d + lastn, d + bsize + lastn, bsize - lastn); in cts_cbc_decrypt()
211 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_decrypt()
218 skcipher_request_set_crypt(subreq, sg, sg, bsize, space); in cts_cbc_decrypt()
243 int bsize = crypto_skcipher_blocksize(tfm); in crypto_cts_decrypt() local
250 if (nbytes < bsize) in crypto_cts_decrypt()
253 if (nbytes == bsize) { in crypto_cts_decrypt()
267 offset = rounddown(nbytes - 1, bsize); in crypto_cts_decrypt()
270 if (offset <= bsize) in crypto_cts_decrypt()
271 memcpy(space, req->iv, bsize); in crypto_cts_decrypt()
273 scatterwalk_map_and_copy(space, req->src, offset - 2 * bsize, in crypto_cts_decrypt()
274 bsize, 0); in crypto_cts_decrypt()
290 unsigned bsize; in crypto_cts_init_tfm() local
300 bsize = crypto_skcipher_blocksize(cipher); in crypto_cts_init_tfm()
304 (align & ~(crypto_tfm_ctx_alignment() - 1)) + bsize; in crypto_cts_init_tfm()