Lines Matching refs:walk
54 struct skcipher_walk walk; in sm4_ecb_do_crypt() local
58 err = skcipher_walk_virt(&walk, req, false); in sm4_ecb_do_crypt()
60 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt()
61 const u8 *src = walk.src.virt.addr; in sm4_ecb_do_crypt()
62 u8 *dst = walk.dst.virt.addr; in sm4_ecb_do_crypt()
75 err = skcipher_walk_done(&walk, nbytes); in sm4_ecb_do_crypt()
101 struct skcipher_walk walk; in sm4_cbc_encrypt() local
105 err = skcipher_walk_virt(&walk, req, false); in sm4_cbc_encrypt()
107 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt()
108 const u8 *src = walk.src.virt.addr; in sm4_cbc_encrypt()
109 u8 *dst = walk.dst.virt.addr; in sm4_cbc_encrypt()
116 sm4_ce_cbc_enc(ctx->rkey_enc, dst, src, walk.iv, nblks); in sm4_cbc_encrypt()
122 err = skcipher_walk_done(&walk, nbytes); in sm4_cbc_encrypt()
132 struct skcipher_walk walk; in sm4_cbc_decrypt() local
136 err = skcipher_walk_virt(&walk, req, false); in sm4_cbc_decrypt()
138 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_decrypt()
139 const u8 *src = walk.src.virt.addr; in sm4_cbc_decrypt()
140 u8 *dst = walk.dst.virt.addr; in sm4_cbc_decrypt()
147 sm4_ce_cbc_dec(ctx->rkey_dec, dst, src, walk.iv, nblks); in sm4_cbc_decrypt()
153 err = skcipher_walk_done(&walk, nbytes); in sm4_cbc_decrypt()
163 struct skcipher_walk walk; in sm4_cfb_encrypt() local
167 err = skcipher_walk_virt(&walk, req, false); in sm4_cfb_encrypt()
169 while ((nbytes = walk.nbytes) > 0) { in sm4_cfb_encrypt()
170 const u8 *src = walk.src.virt.addr; in sm4_cfb_encrypt()
171 u8 *dst = walk.dst.virt.addr; in sm4_cfb_encrypt()
178 sm4_ce_cfb_enc(ctx->rkey_enc, dst, src, walk.iv, nblks); in sm4_cfb_encrypt()
185 if (walk.nbytes == walk.total && nbytes > 0) { in sm4_cfb_encrypt()
188 sm4_ce_crypt_block(ctx->rkey_enc, keystream, walk.iv); in sm4_cfb_encrypt()
195 err = skcipher_walk_done(&walk, nbytes); in sm4_cfb_encrypt()
205 struct skcipher_walk walk; in sm4_cfb_decrypt() local
209 err = skcipher_walk_virt(&walk, req, false); in sm4_cfb_decrypt()
211 while ((nbytes = walk.nbytes) > 0) { in sm4_cfb_decrypt()
212 const u8 *src = walk.src.virt.addr; in sm4_cfb_decrypt()
213 u8 *dst = walk.dst.virt.addr; in sm4_cfb_decrypt()
220 sm4_ce_cfb_dec(ctx->rkey_enc, dst, src, walk.iv, nblks); in sm4_cfb_decrypt()
227 if (walk.nbytes == walk.total && nbytes > 0) { in sm4_cfb_decrypt()
230 sm4_ce_crypt_block(ctx->rkey_enc, keystream, walk.iv); in sm4_cfb_decrypt()
237 err = skcipher_walk_done(&walk, nbytes); in sm4_cfb_decrypt()
247 struct skcipher_walk walk; in sm4_ctr_crypt() local
251 err = skcipher_walk_virt(&walk, req, false); in sm4_ctr_crypt()
253 while ((nbytes = walk.nbytes) > 0) { in sm4_ctr_crypt()
254 const u8 *src = walk.src.virt.addr; in sm4_ctr_crypt()
255 u8 *dst = walk.dst.virt.addr; in sm4_ctr_crypt()
262 sm4_ce_ctr_enc(ctx->rkey_enc, dst, src, walk.iv, nblks); in sm4_ctr_crypt()
269 if (walk.nbytes == walk.total && nbytes > 0) { in sm4_ctr_crypt()
272 sm4_ce_crypt_block(ctx->rkey_enc, keystream, walk.iv); in sm4_ctr_crypt()
273 crypto_inc(walk.iv, SM4_BLOCK_SIZE); in sm4_ctr_crypt()
280 err = skcipher_walk_done(&walk, nbytes); in sm4_ctr_crypt()