Lines Matching refs:nbytes

167 		       struct scatterlist *src, unsigned int nbytes)  in ecb_encrypt()  argument
175 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
179 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_encrypt()
183 walk.nbytes % AES_BLOCK_SIZE); in ecb_encrypt()
190 struct scatterlist *src, unsigned int nbytes) in ecb_decrypt() argument
198 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
202 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_decrypt()
206 walk.nbytes % AES_BLOCK_SIZE); in ecb_decrypt()
213 struct scatterlist *src, unsigned int nbytes) in cbc_encrypt() argument
221 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
225 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in cbc_encrypt()
230 walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt()
237 struct scatterlist *src, unsigned int nbytes) in cbc_decrypt() argument
245 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
249 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in cbc_decrypt()
254 walk.nbytes % AES_BLOCK_SIZE); in cbc_decrypt()
261 struct scatterlist *src, unsigned int nbytes) in ctr_encrypt() argument
268 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_encrypt()
272 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ctr_encrypt()
276 nbytes -= blocks * AES_BLOCK_SIZE; in ctr_encrypt()
277 if (nbytes && nbytes == walk.nbytes % AES_BLOCK_SIZE) in ctr_encrypt()
280 walk.nbytes % AES_BLOCK_SIZE); in ctr_encrypt()
282 if (nbytes) { in ctr_encrypt()
291 blocks = (nbytes <= 8) ? -1 : 1; in ctr_encrypt()
295 memcpy(tdst, tail, nbytes); in ctr_encrypt()
304 struct scatterlist *src, unsigned int nbytes) in xts_encrypt() argument
312 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_encrypt()
316 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in xts_encrypt()
321 walk.nbytes % AES_BLOCK_SIZE); in xts_encrypt()
329 struct scatterlist *src, unsigned int nbytes) in xts_decrypt() argument
337 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_decrypt()
341 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in xts_decrypt()
346 walk.nbytes % AES_BLOCK_SIZE); in xts_decrypt()