Lines Matching refs:nbytes

253 		unsigned int nbytes)  in fallback_blk_dec()  argument
262 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); in fallback_blk_dec()
270 unsigned int nbytes) in fallback_blk_enc() argument
279 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); in fallback_blk_enc()
319 unsigned int nbytes; in ecb_aes_crypt() local
321 while ((nbytes = walk->nbytes)) { in ecb_aes_crypt()
323 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); in ecb_aes_crypt()
331 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_crypt()
332 ret = blkcipher_walk_done(desc, walk, nbytes); in ecb_aes_crypt()
340 unsigned int nbytes) in ecb_aes_encrypt() argument
346 return fallback_blk_enc(desc, dst, src, nbytes); in ecb_aes_encrypt()
348 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_encrypt()
354 unsigned int nbytes) in ecb_aes_decrypt() argument
360 return fallback_blk_dec(desc, dst, src, nbytes); in ecb_aes_decrypt()
362 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_aes_decrypt()
449 unsigned int nbytes = walk->nbytes; in cbc_aes_crypt() local
455 if (!nbytes) in cbc_aes_crypt()
462 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); in cbc_aes_crypt()
470 nbytes &= AES_BLOCK_SIZE - 1; in cbc_aes_crypt()
471 ret = blkcipher_walk_done(desc, walk, nbytes); in cbc_aes_crypt()
472 } while ((nbytes = walk->nbytes)); in cbc_aes_crypt()
481 unsigned int nbytes) in cbc_aes_encrypt() argument
487 return fallback_blk_enc(desc, dst, src, nbytes); in cbc_aes_encrypt()
489 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_aes_encrypt()
495 unsigned int nbytes) in cbc_aes_decrypt() argument
501 return fallback_blk_dec(desc, dst, src, nbytes); in cbc_aes_decrypt()
503 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_aes_decrypt()
552 unsigned int nbytes) in xts_fallback_decrypt() argument
561 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); in xts_fallback_decrypt()
569 unsigned int nbytes) in xts_fallback_encrypt() argument
578 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); in xts_fallback_encrypt()
622 unsigned int nbytes = walk->nbytes; in xts_aes_crypt() local
631 if (!nbytes) in xts_aes_crypt()
647 n = nbytes & ~(AES_BLOCK_SIZE - 1); in xts_aes_crypt()
655 nbytes &= AES_BLOCK_SIZE - 1; in xts_aes_crypt()
656 ret = blkcipher_walk_done(desc, walk, nbytes); in xts_aes_crypt()
657 } while ((nbytes = walk->nbytes)); in xts_aes_crypt()
664 unsigned int nbytes) in xts_aes_encrypt() argument
670 return xts_fallback_encrypt(desc, dst, src, nbytes); in xts_aes_encrypt()
672 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_aes_encrypt()
678 unsigned int nbytes) in xts_aes_decrypt() argument
684 return xts_fallback_decrypt(desc, dst, src, nbytes); in xts_aes_decrypt()
686 blkcipher_walk_init(&walk, dst, src, nbytes); in xts_aes_decrypt()
763 static unsigned int __ctrblk_init(u8 *ctrptr, unsigned int nbytes) in __ctrblk_init() argument
768 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(AES_BLOCK_SIZE - 1); in __ctrblk_init()
781 unsigned int n, nbytes; in ctr_aes_crypt() local
785 if (!walk->nbytes) in ctr_aes_crypt()
792 while ((nbytes = walk->nbytes) >= AES_BLOCK_SIZE) { in ctr_aes_crypt()
795 while (nbytes >= AES_BLOCK_SIZE) { in ctr_aes_crypt()
797 n = __ctrblk_init(ctrptr, nbytes); in ctr_aes_crypt()
813 nbytes -= n; in ctr_aes_crypt()
815 ret = blkcipher_walk_done(desc, walk, nbytes); in ctr_aes_crypt()
818 if (nbytes) in ctr_aes_crypt()
824 if (!nbytes) in ctr_aes_crypt()
830 if (nbytes) { in ctr_aes_crypt()
837 memcpy(out, buf, nbytes); in ctr_aes_crypt()
848 unsigned int nbytes) in ctr_aes_encrypt() argument
853 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_aes_encrypt()
859 unsigned int nbytes) in ctr_aes_decrypt() argument
864 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_aes_decrypt()