Lines Matching refs:walk

180 	struct skcipher_walk walk;  in ecb_encrypt()  local
183 err = skcipher_walk_virt(&walk, req, false); in ecb_encrypt()
185 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_encrypt()
187 aes_ecb_encrypt(walk.dst.virt.addr, walk.src.virt.addr, in ecb_encrypt()
190 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_encrypt()
200 struct skcipher_walk walk; in ecb_decrypt() local
203 err = skcipher_walk_virt(&walk, req, false); in ecb_decrypt()
205 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_decrypt()
207 aes_ecb_decrypt(walk.dst.virt.addr, walk.src.virt.addr, in ecb_decrypt()
210 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_decrypt()
216 struct skcipher_walk *walk) in cbc_encrypt_walk() argument
223 while ((blocks = (walk->nbytes / AES_BLOCK_SIZE))) { in cbc_encrypt_walk()
225 aes_cbc_encrypt(walk->dst.virt.addr, walk->src.virt.addr, in cbc_encrypt_walk()
226 ctx->key_enc, rounds, blocks, walk->iv); in cbc_encrypt_walk()
228 err = skcipher_walk_done(walk, walk->nbytes % AES_BLOCK_SIZE); in cbc_encrypt_walk()
235 struct skcipher_walk walk; in cbc_encrypt() local
238 err = skcipher_walk_virt(&walk, req, false); in cbc_encrypt()
241 return cbc_encrypt_walk(req, &walk); in cbc_encrypt()
245 struct skcipher_walk *walk) in cbc_decrypt_walk() argument
252 while ((blocks = (walk->nbytes / AES_BLOCK_SIZE))) { in cbc_decrypt_walk()
254 aes_cbc_decrypt(walk->dst.virt.addr, walk->src.virt.addr, in cbc_decrypt_walk()
255 ctx->key_dec, rounds, blocks, walk->iv); in cbc_decrypt_walk()
257 err = skcipher_walk_done(walk, walk->nbytes % AES_BLOCK_SIZE); in cbc_decrypt_walk()
264 struct skcipher_walk walk; in cbc_decrypt() local
267 err = skcipher_walk_virt(&walk, req, false); in cbc_decrypt()
270 return cbc_decrypt_walk(req, &walk); in cbc_decrypt()
282 struct skcipher_walk walk; in cts_cbc_encrypt() local
299 err = skcipher_walk_virt(&walk, &subreq, false) ?: in cts_cbc_encrypt()
300 cbc_encrypt_walk(&subreq, &walk); in cts_cbc_encrypt()
318 err = skcipher_walk_virt(&walk, &subreq, false); in cts_cbc_encrypt()
323 aes_cbc_cts_encrypt(walk.dst.virt.addr, walk.src.virt.addr, in cts_cbc_encrypt()
324 ctx->key_enc, rounds, walk.nbytes, walk.iv); in cts_cbc_encrypt()
327 return skcipher_walk_done(&walk, 0); in cts_cbc_encrypt()
339 struct skcipher_walk walk; in cts_cbc_decrypt() local
356 err = skcipher_walk_virt(&walk, &subreq, false) ?: in cts_cbc_decrypt()
357 cbc_decrypt_walk(&subreq, &walk); in cts_cbc_decrypt()
375 err = skcipher_walk_virt(&walk, &subreq, false); in cts_cbc_decrypt()
380 aes_cbc_cts_decrypt(walk.dst.virt.addr, walk.src.virt.addr, in cts_cbc_decrypt()
381 ctx->key_dec, rounds, walk.nbytes, walk.iv); in cts_cbc_decrypt()
384 return skcipher_walk_done(&walk, 0); in cts_cbc_decrypt()
408 struct skcipher_walk walk; in essiv_cbc_encrypt() local
411 err = skcipher_walk_virt(&walk, req, false); in essiv_cbc_encrypt()
413 blocks = walk.nbytes / AES_BLOCK_SIZE; in essiv_cbc_encrypt()
416 aes_essiv_cbc_encrypt(walk.dst.virt.addr, walk.src.virt.addr, in essiv_cbc_encrypt()
420 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in essiv_cbc_encrypt()
422 return err ?: cbc_encrypt_walk(req, &walk); in essiv_cbc_encrypt()
430 struct skcipher_walk walk; in essiv_cbc_decrypt() local
433 err = skcipher_walk_virt(&walk, req, false); in essiv_cbc_decrypt()
435 blocks = walk.nbytes / AES_BLOCK_SIZE; in essiv_cbc_decrypt()
438 aes_essiv_cbc_decrypt(walk.dst.virt.addr, walk.src.virt.addr, in essiv_cbc_decrypt()
442 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in essiv_cbc_decrypt()
444 return err ?: cbc_decrypt_walk(req, &walk); in essiv_cbc_decrypt()
452 struct skcipher_walk walk; in ctr_encrypt() local
454 err = skcipher_walk_virt(&walk, req, false); in ctr_encrypt()
456 while (walk.nbytes > 0) { in ctr_encrypt()
457 const u8 *src = walk.src.virt.addr; in ctr_encrypt()
458 unsigned int nbytes = walk.nbytes; in ctr_encrypt()
459 u8 *dst = walk.dst.virt.addr; in ctr_encrypt()
465 else if (nbytes < walk.total) in ctr_encrypt()
470 walk.iv, buf); in ctr_encrypt()
482 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in ctr_encrypt()
497 struct skcipher_walk walk; in xts_encrypt() local
502 err = skcipher_walk_virt(&walk, req, false); in xts_encrypt()
504 if (unlikely(tail > 0 && walk.nbytes < walk.total)) { in xts_encrypt()
508 skcipher_walk_abort(&walk); in xts_encrypt()
518 err = skcipher_walk_virt(&walk, req, false); in xts_encrypt()
523 for (first = 1; walk.nbytes >= AES_BLOCK_SIZE; first = 0) { in xts_encrypt()
524 int nbytes = walk.nbytes; in xts_encrypt()
526 if (walk.nbytes < walk.total) in xts_encrypt()
530 aes_xts_encrypt(walk.dst.virt.addr, walk.src.virt.addr, in xts_encrypt()
532 ctx->key2.key_enc, walk.iv, first); in xts_encrypt()
534 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xts_encrypt()
547 err = skcipher_walk_virt(&walk, &subreq, false); in xts_encrypt()
552 aes_xts_encrypt(walk.dst.virt.addr, walk.src.virt.addr, in xts_encrypt()
553 ctx->key1.key_enc, rounds, walk.nbytes, in xts_encrypt()
554 ctx->key2.key_enc, walk.iv, first); in xts_encrypt()
557 return skcipher_walk_done(&walk, 0); in xts_encrypt()
569 struct skcipher_walk walk; in xts_decrypt() local
574 err = skcipher_walk_virt(&walk, req, false); in xts_decrypt()
576 if (unlikely(tail > 0 && walk.nbytes < walk.total)) { in xts_decrypt()
580 skcipher_walk_abort(&walk); in xts_decrypt()
590 err = skcipher_walk_virt(&walk, req, false); in xts_decrypt()
595 for (first = 1; walk.nbytes >= AES_BLOCK_SIZE; first = 0) { in xts_decrypt()
596 int nbytes = walk.nbytes; in xts_decrypt()
598 if (walk.nbytes < walk.total) in xts_decrypt()
602 aes_xts_decrypt(walk.dst.virt.addr, walk.src.virt.addr, in xts_decrypt()
604 ctx->key2.key_enc, walk.iv, first); in xts_decrypt()
606 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xts_decrypt()
619 err = skcipher_walk_virt(&walk, &subreq, false); in xts_decrypt()
625 aes_xts_decrypt(walk.dst.virt.addr, walk.src.virt.addr, in xts_decrypt()
626 ctx->key1.key_dec, rounds, walk.nbytes, in xts_decrypt()
627 ctx->key2.key_enc, walk.iv, first); in xts_decrypt()
630 return skcipher_walk_done(&walk, 0); in xts_decrypt()