Lines Matching refs:nbytes

100 		       struct scatterlist *src, unsigned int nbytes)  in ecb_encrypt()  argument
108 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
112 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in ecb_encrypt()
115 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_encrypt()
122 struct scatterlist *src, unsigned int nbytes) in ecb_decrypt() argument
130 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
134 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in ecb_decrypt()
137 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_decrypt()
144 struct scatterlist *src, unsigned int nbytes) in cbc_encrypt() argument
152 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
156 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in cbc_encrypt()
160 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt()
167 struct scatterlist *src, unsigned int nbytes) in cbc_decrypt() argument
175 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
179 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in cbc_decrypt()
183 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_decrypt()
190 struct scatterlist *src, unsigned int nbytes) in ctr_encrypt() argument
198 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_encrypt()
203 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ctr_encrypt()
208 nbytes -= blocks * AES_BLOCK_SIZE; in ctr_encrypt()
209 if (nbytes && nbytes == walk.nbytes % AES_BLOCK_SIZE) in ctr_encrypt()
212 walk.nbytes % AES_BLOCK_SIZE); in ctr_encrypt()
214 if (nbytes) { in ctr_encrypt()
223 blocks = (nbytes <= 8) ? -1 : 1; in ctr_encrypt()
227 memcpy(tdst, tail, nbytes); in ctr_encrypt()
236 struct scatterlist *src, unsigned int nbytes) in xts_encrypt() argument
244 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_encrypt()
248 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in xts_encrypt()
252 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in xts_encrypt()
260 struct scatterlist *src, unsigned int nbytes) in xts_decrypt() argument
268 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_decrypt()
272 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { in xts_decrypt()
276 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); in xts_decrypt()