Lines Matching refs:walk
379 struct blkcipher_walk walk; in ecb_encrypt() local
382 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
383 err = blkcipher_walk_virt(desc, &walk); in ecb_encrypt()
387 while ((nbytes = walk.nbytes)) { in ecb_encrypt()
388 aesni_ecb_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr, in ecb_encrypt()
391 err = blkcipher_walk_done(desc, &walk, nbytes); in ecb_encrypt()
403 struct blkcipher_walk walk; in ecb_decrypt() local
406 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
407 err = blkcipher_walk_virt(desc, &walk); in ecb_decrypt()
411 while ((nbytes = walk.nbytes)) { in ecb_decrypt()
412 aesni_ecb_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr, in ecb_decrypt()
415 err = blkcipher_walk_done(desc, &walk, nbytes); in ecb_decrypt()
427 struct blkcipher_walk walk; in cbc_encrypt() local
430 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
431 err = blkcipher_walk_virt(desc, &walk); in cbc_encrypt()
435 while ((nbytes = walk.nbytes)) { in cbc_encrypt()
436 aesni_cbc_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr, in cbc_encrypt()
437 nbytes & AES_BLOCK_MASK, walk.iv); in cbc_encrypt()
439 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_encrypt()
451 struct blkcipher_walk walk; in cbc_decrypt() local
454 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
455 err = blkcipher_walk_virt(desc, &walk); in cbc_decrypt()
459 while ((nbytes = walk.nbytes)) { in cbc_decrypt()
460 aesni_cbc_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr, in cbc_decrypt()
461 nbytes & AES_BLOCK_MASK, walk.iv); in cbc_decrypt()
463 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_decrypt()
472 struct blkcipher_walk *walk) in ctr_crypt_final() argument
474 u8 *ctrblk = walk->iv; in ctr_crypt_final()
476 u8 *src = walk->src.virt.addr; in ctr_crypt_final()
477 u8 *dst = walk->dst.virt.addr; in ctr_crypt_final()
478 unsigned int nbytes = walk->nbytes; in ctr_crypt_final()
510 struct blkcipher_walk walk; in ctr_crypt() local
513 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_crypt()
514 err = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE); in ctr_crypt()
518 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { in ctr_crypt()
519 aesni_ctr_enc_tfm(ctx, walk.dst.virt.addr, walk.src.virt.addr, in ctr_crypt()
520 nbytes & AES_BLOCK_MASK, walk.iv); in ctr_crypt()
522 err = blkcipher_walk_done(desc, &walk, nbytes); in ctr_crypt()
524 if (walk.nbytes) { in ctr_crypt()
525 ctr_crypt_final(ctx, &walk); in ctr_crypt()
526 err = blkcipher_walk_done(desc, &walk, 0); in ctr_crypt()