Lines Matching refs:nbytes

41 	unsigned int nbytes, i, func_bytes;  in __glue_ecb_crypt_128bit()  local
47 while ((nbytes = walk->nbytes)) { in __glue_ecb_crypt_128bit()
52 desc, fpu_enabled, nbytes); in __glue_ecb_crypt_128bit()
58 if (nbytes >= func_bytes) { in __glue_ecb_crypt_128bit()
65 nbytes -= func_bytes; in __glue_ecb_crypt_128bit()
66 } while (nbytes >= func_bytes); in __glue_ecb_crypt_128bit()
68 if (nbytes < bsize) in __glue_ecb_crypt_128bit()
74 err = blkcipher_walk_done(desc, walk, nbytes); in __glue_ecb_crypt_128bit()
83 struct scatterlist *src, unsigned int nbytes) in glue_ecb_crypt_128bit() argument
87 blkcipher_walk_init(&walk, dst, src, nbytes); in glue_ecb_crypt_128bit()
98 unsigned int nbytes = walk->nbytes; in __glue_cbc_encrypt_128bit() local
110 nbytes -= bsize; in __glue_cbc_encrypt_128bit()
111 } while (nbytes >= bsize); in __glue_cbc_encrypt_128bit()
114 return nbytes; in __glue_cbc_encrypt_128bit()
120 struct scatterlist *src, unsigned int nbytes) in glue_cbc_encrypt_128bit() argument
125 blkcipher_walk_init(&walk, dst, src, nbytes); in glue_cbc_encrypt_128bit()
128 while ((nbytes = walk.nbytes)) { in glue_cbc_encrypt_128bit()
129 nbytes = __glue_cbc_encrypt_128bit(fn, desc, &walk); in glue_cbc_encrypt_128bit()
130 err = blkcipher_walk_done(desc, &walk, nbytes); in glue_cbc_encrypt_128bit()
144 unsigned int nbytes = walk->nbytes; in __glue_cbc_decrypt_128bit() local
152 src += nbytes / bsize - 1; in __glue_cbc_decrypt_128bit()
153 dst += nbytes / bsize - 1; in __glue_cbc_decrypt_128bit()
162 if (nbytes >= func_bytes) { in __glue_cbc_decrypt_128bit()
164 nbytes -= func_bytes - bsize; in __glue_cbc_decrypt_128bit()
170 nbytes -= bsize; in __glue_cbc_decrypt_128bit()
171 if (nbytes < bsize) in __glue_cbc_decrypt_128bit()
177 } while (nbytes >= func_bytes); in __glue_cbc_decrypt_128bit()
179 if (nbytes < bsize) in __glue_cbc_decrypt_128bit()
188 return nbytes; in __glue_cbc_decrypt_128bit()
194 struct scatterlist *src, unsigned int nbytes) in glue_cbc_decrypt_128bit() argument
201 blkcipher_walk_init(&walk, dst, src, nbytes); in glue_cbc_decrypt_128bit()
204 while ((nbytes = walk.nbytes)) { in glue_cbc_decrypt_128bit()
206 desc, fpu_enabled, nbytes); in glue_cbc_decrypt_128bit()
207 nbytes = __glue_cbc_decrypt_128bit(gctx, desc, &walk); in glue_cbc_decrypt_128bit()
208 err = blkcipher_walk_done(desc, &walk, nbytes); in glue_cbc_decrypt_128bit()
223 unsigned int nbytes = walk->nbytes; in glue_ctr_crypt_final_128bit() local
229 memcpy(&tmp, src, nbytes); in glue_ctr_crypt_final_128bit()
231 memcpy(dst, &tmp, nbytes); in glue_ctr_crypt_final_128bit()
242 unsigned int nbytes = walk->nbytes; in __glue_ctr_crypt_128bit() local
256 if (nbytes >= func_bytes) { in __glue_ctr_crypt_128bit()
262 nbytes -= func_bytes; in __glue_ctr_crypt_128bit()
263 } while (nbytes >= func_bytes); in __glue_ctr_crypt_128bit()
265 if (nbytes < bsize) in __glue_ctr_crypt_128bit()
272 return nbytes; in __glue_ctr_crypt_128bit()
277 struct scatterlist *src, unsigned int nbytes) in glue_ctr_crypt_128bit() argument
284 blkcipher_walk_init(&walk, dst, src, nbytes); in glue_ctr_crypt_128bit()
287 while ((nbytes = walk.nbytes) >= bsize) { in glue_ctr_crypt_128bit()
289 desc, fpu_enabled, nbytes); in glue_ctr_crypt_128bit()
290 nbytes = __glue_ctr_crypt_128bit(gctx, desc, &walk); in glue_ctr_crypt_128bit()
291 err = blkcipher_walk_done(desc, &walk, nbytes); in glue_ctr_crypt_128bit()
296 if (walk.nbytes) { in glue_ctr_crypt_128bit()
312 unsigned int nbytes = walk->nbytes; in __glue_xts_crypt_128bit() local
323 if (nbytes >= func_bytes) { in __glue_xts_crypt_128bit()
330 nbytes -= func_bytes; in __glue_xts_crypt_128bit()
331 } while (nbytes >= func_bytes); in __glue_xts_crypt_128bit()
333 if (nbytes < bsize) in __glue_xts_crypt_128bit()
339 return nbytes; in __glue_xts_crypt_128bit()
345 struct scatterlist *src, unsigned int nbytes, in glue_xts_crypt_128bit() argument
354 blkcipher_walk_init(&walk, dst, src, nbytes); in glue_xts_crypt_128bit()
357 nbytes = walk.nbytes; in glue_xts_crypt_128bit()
358 if (!nbytes) in glue_xts_crypt_128bit()
364 nbytes < bsize ? bsize : nbytes); in glue_xts_crypt_128bit()
369 while (nbytes) { in glue_xts_crypt_128bit()
370 nbytes = __glue_xts_crypt_128bit(gctx, crypt_ctx, desc, &walk); in glue_xts_crypt_128bit()
372 err = blkcipher_walk_done(desc, &walk, nbytes); in glue_xts_crypt_128bit()
373 nbytes = walk.nbytes; in glue_xts_crypt_128bit()