• Home
  • Raw
  • Download

Lines Matching refs:walk

59 static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,  in ecb_crypt()  argument
69 err = blkcipher_walk_virt(desc, walk); in ecb_crypt()
72 while ((nbytes = walk->nbytes)) { in ecb_crypt()
73 u8 *wsrc = walk->src.virt.addr; in ecb_crypt()
74 u8 *wdst = walk->dst.virt.addr; in ecb_crypt()
105 err = blkcipher_walk_done(desc, walk, nbytes); in ecb_crypt()
115 struct blkcipher_walk walk; in ecb_encrypt() local
117 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
118 return ecb_crypt(desc, &walk, true); in ecb_encrypt()
124 struct blkcipher_walk walk; in ecb_decrypt() local
126 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
127 return ecb_crypt(desc, &walk, false); in ecb_decrypt()
131 struct blkcipher_walk *walk) in __cbc_encrypt() argument
135 unsigned int nbytes = walk->nbytes; in __cbc_encrypt()
136 u64 *src = (u64 *)walk->src.virt.addr; in __cbc_encrypt()
137 u64 *dst = (u64 *)walk->dst.virt.addr; in __cbc_encrypt()
138 u64 *iv = (u64 *)walk->iv; in __cbc_encrypt()
150 *(u64 *)walk->iv = *iv; in __cbc_encrypt()
157 struct blkcipher_walk walk; in cbc_encrypt() local
160 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
161 err = blkcipher_walk_virt(desc, &walk); in cbc_encrypt()
163 while ((nbytes = walk.nbytes)) { in cbc_encrypt()
164 nbytes = __cbc_encrypt(desc, &walk); in cbc_encrypt()
165 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_encrypt()
172 struct blkcipher_walk *walk) in __cbc_decrypt() argument
176 unsigned int nbytes = walk->nbytes; in __cbc_decrypt()
177 u64 *src = (u64 *)walk->src.virt.addr; in __cbc_decrypt()
178 u64 *dst = (u64 *)walk->dst.virt.addr; in __cbc_decrypt()
220 *dst ^= *(u64 *)walk->iv; in __cbc_decrypt()
221 *(u64 *)walk->iv = last_iv; in __cbc_decrypt()
230 struct blkcipher_walk walk; in cbc_decrypt() local
233 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
234 err = blkcipher_walk_virt(desc, &walk); in cbc_decrypt()
237 while ((nbytes = walk.nbytes)) { in cbc_decrypt()
239 nbytes = __cbc_decrypt(desc, &walk); in cbc_decrypt()
240 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_decrypt()
248 struct blkcipher_walk *walk) in ctr_crypt_final() argument
251 u8 *ctrblk = walk->iv; in ctr_crypt_final()
253 u8 *src = walk->src.virt.addr; in ctr_crypt_final()
254 u8 *dst = walk->dst.virt.addr; in ctr_crypt_final()
255 unsigned int nbytes = walk->nbytes; in ctr_crypt_final()
265 struct blkcipher_walk *walk) in __ctr_crypt() argument
269 unsigned int nbytes = walk->nbytes; in __ctr_crypt()
270 u64 *src = (u64 *)walk->src.virt.addr; in __ctr_crypt()
271 u64 *dst = (u64 *)walk->dst.virt.addr; in __ctr_crypt()
277 (__be64 *)walk->iv); in __ctr_crypt()
295 ctrblk = *(u64 *)walk->iv; in __ctr_crypt()
296 be64_add_cpu((__be64 *)walk->iv, 1); in __ctr_crypt()
314 struct blkcipher_walk walk; in ctr_crypt() local
317 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_crypt()
318 err = blkcipher_walk_virt_block(desc, &walk, CAST5_BLOCK_SIZE); in ctr_crypt()
321 while ((nbytes = walk.nbytes) >= CAST5_BLOCK_SIZE) { in ctr_crypt()
323 nbytes = __ctr_crypt(desc, &walk); in ctr_crypt()
324 err = blkcipher_walk_done(desc, &walk, nbytes); in ctr_crypt()
329 if (walk.nbytes) { in ctr_crypt()
330 ctr_crypt_final(desc, &walk); in ctr_crypt()
331 err = blkcipher_walk_done(desc, &walk, 0); in ctr_crypt()