Lines Matching refs:nbytes

254 		unsigned int nbytes)  in fallback_blk_dec()  argument
263 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); in fallback_blk_dec()
271 unsigned int nbytes) in fallback_blk_enc() argument
280 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); in fallback_blk_enc()
320 unsigned int nbytes; in ecb_aes_crypt() local
322 while ((nbytes = walk->nbytes)) { in ecb_aes_crypt()
324 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); in ecb_aes_crypt()
332 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_crypt()
333 ret = blkcipher_walk_done(desc, walk, nbytes); in ecb_aes_crypt()
341 unsigned int nbytes) in ecb_aes_encrypt() argument
347 return fallback_blk_enc(desc, dst, src, nbytes); in ecb_aes_encrypt()
349 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_encrypt()
355 unsigned int nbytes) in ecb_aes_decrypt() argument
361 return fallback_blk_dec(desc, dst, src, nbytes); in ecb_aes_decrypt()
363 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_decrypt()
450 unsigned int nbytes = walk->nbytes; in cbc_aes_crypt() local
456 if (!nbytes) in cbc_aes_crypt()
463 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); in cbc_aes_crypt()
471 nbytes &= AES_BLOCK_SIZE - 1; in cbc_aes_crypt()
472 ret = blkcipher_walk_done(desc, walk, nbytes); in cbc_aes_crypt()
473 } while ((nbytes = walk->nbytes)); in cbc_aes_crypt()
482 unsigned int nbytes) in cbc_aes_encrypt() argument
488 return fallback_blk_enc(desc, dst, src, nbytes); in cbc_aes_encrypt()
490 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_aes_encrypt()
496 unsigned int nbytes) in cbc_aes_decrypt() argument
502 return fallback_blk_dec(desc, dst, src, nbytes); in cbc_aes_decrypt()
504 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_aes_decrypt()
553 unsigned int nbytes) in xts_fallback_decrypt() argument
562 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); in xts_fallback_decrypt()
570 unsigned int nbytes) in xts_fallback_encrypt() argument
579 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); in xts_fallback_encrypt()
623 unsigned int nbytes = walk->nbytes; in xts_aes_crypt() local
632 if (!nbytes) in xts_aes_crypt()
648 n = nbytes & ~(AES_BLOCK_SIZE - 1); in xts_aes_crypt()
656 nbytes &= AES_BLOCK_SIZE - 1; in xts_aes_crypt()
657 ret = blkcipher_walk_done(desc, walk, nbytes); in xts_aes_crypt()
658 } while ((nbytes = walk->nbytes)); in xts_aes_crypt()
665 unsigned int nbytes) in xts_aes_encrypt() argument
671 return xts_fallback_encrypt(desc, dst, src, nbytes); in xts_aes_encrypt()
673 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_aes_encrypt()
679 unsigned int nbytes) in xts_aes_decrypt() argument
685 return xts_fallback_decrypt(desc, dst, src, nbytes); in xts_aes_decrypt()
687 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_aes_decrypt()
764 static unsigned int __ctrblk_init(u8 *ctrptr, unsigned int nbytes) in __ctrblk_init() argument
769 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(AES_BLOCK_SIZE - 1); in __ctrblk_init()
782 unsigned int n, nbytes; in ctr_aes_crypt() local
786 if (!walk->nbytes) in ctr_aes_crypt()
793 while ((nbytes = walk->nbytes) >= AES_BLOCK_SIZE) { in ctr_aes_crypt()
796 while (nbytes >= AES_BLOCK_SIZE) { in ctr_aes_crypt()
798 n = __ctrblk_init(ctrptr, nbytes); in ctr_aes_crypt()
814 nbytes -= n; in ctr_aes_crypt()
816 ret = blkcipher_walk_done(desc, walk, nbytes); in ctr_aes_crypt()
819 if (nbytes) in ctr_aes_crypt()
825 if (!nbytes) in ctr_aes_crypt()
831 if (nbytes) { in ctr_aes_crypt()
838 memcpy(out, buf, nbytes); in ctr_aes_crypt()
849 unsigned int nbytes) in ctr_aes_encrypt() argument
854 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_aes_encrypt()
860 unsigned int nbytes) in ctr_aes_decrypt() argument
865 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_aes_decrypt()