Lines Matching refs:nbytes
189 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_encrypt()
194 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_encrypt()
209 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { in ecb_decrypt()
214 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in ecb_decrypt()
227 while ((blocks = (walk->nbytes / AES_BLOCK_SIZE))) { in cbc_encrypt_walk()
232 err = skcipher_walk_done(walk, walk->nbytes % AES_BLOCK_SIZE); in cbc_encrypt_walk()
256 while ((blocks = (walk->nbytes / AES_BLOCK_SIZE))) { in cbc_decrypt_walk()
261 err = skcipher_walk_done(walk, walk->nbytes % AES_BLOCK_SIZE); in cbc_decrypt_walk()
328 ctx->key_enc, rounds, walk.nbytes, walk.iv); in cts_cbc_encrypt()
385 ctx->key_dec, rounds, walk.nbytes, walk.iv); in cts_cbc_decrypt()
417 blocks = walk.nbytes / AES_BLOCK_SIZE; in essiv_cbc_encrypt()
424 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in essiv_cbc_encrypt()
439 blocks = walk.nbytes / AES_BLOCK_SIZE; in essiv_cbc_decrypt()
446 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in essiv_cbc_decrypt()
461 while (walk.nbytes > 0) { in xctr_encrypt()
463 unsigned int nbytes = walk.nbytes; in xctr_encrypt() local
475 if (unlikely(nbytes < AES_BLOCK_SIZE)) in xctr_encrypt()
476 src = dst = memcpy(buf + sizeof(buf) - nbytes, in xctr_encrypt()
477 src, nbytes); in xctr_encrypt()
478 else if (nbytes < walk.total) in xctr_encrypt()
479 nbytes &= ~(AES_BLOCK_SIZE - 1); in xctr_encrypt()
482 aes_xctr_encrypt(dst, src, ctx->key_enc, rounds, nbytes, in xctr_encrypt()
486 if (unlikely(nbytes < AES_BLOCK_SIZE)) in xctr_encrypt()
488 buf + sizeof(buf) - nbytes, nbytes); in xctr_encrypt()
489 byte_ctr += nbytes; in xctr_encrypt()
491 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xctr_encrypt()
506 while (walk.nbytes > 0) { in ctr_encrypt()
508 unsigned int nbytes = walk.nbytes; in ctr_encrypt() local
520 if (unlikely(nbytes < AES_BLOCK_SIZE)) in ctr_encrypt()
521 src = dst = memcpy(buf + sizeof(buf) - nbytes, in ctr_encrypt()
522 src, nbytes); in ctr_encrypt()
523 else if (nbytes < walk.total) in ctr_encrypt()
524 nbytes &= ~(AES_BLOCK_SIZE - 1); in ctr_encrypt()
527 aes_ctr_encrypt(dst, src, ctx->key_enc, rounds, nbytes, in ctr_encrypt()
531 if (unlikely(nbytes < AES_BLOCK_SIZE)) in ctr_encrypt()
533 buf + sizeof(buf) - nbytes, nbytes); in ctr_encrypt()
535 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in ctr_encrypt()
557 if (unlikely(tail > 0 && walk.nbytes < walk.total)) { in xts_encrypt()
576 for (first = 1; walk.nbytes >= AES_BLOCK_SIZE; first = 0) { in xts_encrypt()
577 int nbytes = walk.nbytes; in xts_encrypt() local
579 if (walk.nbytes < walk.total) in xts_encrypt()
580 nbytes &= ~(AES_BLOCK_SIZE - 1); in xts_encrypt()
584 ctx->key1.key_enc, rounds, nbytes, in xts_encrypt()
587 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xts_encrypt()
606 ctx->key1.key_enc, rounds, walk.nbytes, in xts_encrypt()
629 if (unlikely(tail > 0 && walk.nbytes < walk.total)) { in xts_decrypt()
648 for (first = 1; walk.nbytes >= AES_BLOCK_SIZE; first = 0) { in xts_decrypt()
649 int nbytes = walk.nbytes; in xts_decrypt() local
651 if (walk.nbytes < walk.total) in xts_decrypt()
652 nbytes &= ~(AES_BLOCK_SIZE - 1); in xts_decrypt()
656 ctx->key1.key_dec, rounds, nbytes, in xts_decrypt()
659 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xts_decrypt()
679 ctx->key1.key_dec, rounds, walk.nbytes, in xts_decrypt()