Lines Matching refs:walk

43 static void crypto_cfb_final(struct skcipher_walk *walk,  in crypto_cfb_final()  argument
49 u8 *src = walk->src.virt.addr; in crypto_cfb_final()
50 u8 *dst = walk->dst.virt.addr; in crypto_cfb_final()
51 u8 *iv = walk->iv; in crypto_cfb_final()
52 unsigned int nbytes = walk->nbytes; in crypto_cfb_final()
58 static int crypto_cfb_encrypt_segment(struct skcipher_walk *walk, in crypto_cfb_encrypt_segment() argument
62 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment()
63 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_segment()
64 u8 *dst = walk->dst.virt.addr; in crypto_cfb_encrypt_segment()
65 u8 *iv = walk->iv; in crypto_cfb_encrypt_segment()
76 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_segment()
81 static int crypto_cfb_encrypt_inplace(struct skcipher_walk *walk, in crypto_cfb_encrypt_inplace() argument
85 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_inplace()
86 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_inplace()
87 u8 *iv = walk->iv; in crypto_cfb_encrypt_inplace()
98 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_inplace()
106 struct skcipher_walk walk; in crypto_cfb_encrypt() local
110 err = skcipher_walk_virt(&walk, req, false); in crypto_cfb_encrypt()
112 while (walk.nbytes >= bsize) { in crypto_cfb_encrypt()
113 if (walk.src.virt.addr == walk.dst.virt.addr) in crypto_cfb_encrypt()
114 err = crypto_cfb_encrypt_inplace(&walk, tfm); in crypto_cfb_encrypt()
116 err = crypto_cfb_encrypt_segment(&walk, tfm); in crypto_cfb_encrypt()
117 err = skcipher_walk_done(&walk, err); in crypto_cfb_encrypt()
120 if (walk.nbytes) { in crypto_cfb_encrypt()
121 crypto_cfb_final(&walk, tfm); in crypto_cfb_encrypt()
122 err = skcipher_walk_done(&walk, 0); in crypto_cfb_encrypt()
128 static int crypto_cfb_decrypt_segment(struct skcipher_walk *walk, in crypto_cfb_decrypt_segment() argument
132 unsigned int nbytes = walk->nbytes; in crypto_cfb_decrypt_segment()
133 u8 *src = walk->src.virt.addr; in crypto_cfb_decrypt_segment()
134 u8 *dst = walk->dst.virt.addr; in crypto_cfb_decrypt_segment()
135 u8 *iv = walk->iv; in crypto_cfb_decrypt_segment()
146 memcpy(walk->iv, iv, bsize); in crypto_cfb_decrypt_segment()
151 static int crypto_cfb_decrypt_inplace(struct skcipher_walk *walk, in crypto_cfb_decrypt_inplace() argument
155 unsigned int nbytes = walk->nbytes; in crypto_cfb_decrypt_inplace()
156 u8 *src = walk->src.virt.addr; in crypto_cfb_decrypt_inplace()
157 u8 * const iv = walk->iv; in crypto_cfb_decrypt_inplace()
170 static int crypto_cfb_decrypt_blocks(struct skcipher_walk *walk, in crypto_cfb_decrypt_blocks() argument
173 if (walk->src.virt.addr == walk->dst.virt.addr) in crypto_cfb_decrypt_blocks()
174 return crypto_cfb_decrypt_inplace(walk, tfm); in crypto_cfb_decrypt_blocks()
176 return crypto_cfb_decrypt_segment(walk, tfm); in crypto_cfb_decrypt_blocks()
182 struct skcipher_walk walk; in crypto_cfb_decrypt() local
186 err = skcipher_walk_virt(&walk, req, false); in crypto_cfb_decrypt()
188 while (walk.nbytes >= bsize) { in crypto_cfb_decrypt()
189 err = crypto_cfb_decrypt_blocks(&walk, tfm); in crypto_cfb_decrypt()
190 err = skcipher_walk_done(&walk, err); in crypto_cfb_decrypt()
193 if (walk.nbytes) { in crypto_cfb_decrypt()
194 crypto_cfb_final(&walk, tfm); in crypto_cfb_decrypt()
195 err = skcipher_walk_done(&walk, 0); in crypto_cfb_decrypt()