Lines Matching refs:nbytes
296 unsigned int nbytes; in ecb_encrypt() local
301 while ((nbytes = walk.nbytes)) { in ecb_encrypt()
304 nbytes & AES_BLOCK_MASK); in ecb_encrypt()
306 nbytes &= AES_BLOCK_SIZE - 1; in ecb_encrypt()
307 err = skcipher_walk_done(&walk, nbytes); in ecb_encrypt()
318 unsigned int nbytes; in ecb_decrypt() local
323 while ((nbytes = walk.nbytes)) { in ecb_decrypt()
326 nbytes & AES_BLOCK_MASK); in ecb_decrypt()
328 nbytes &= AES_BLOCK_SIZE - 1; in ecb_decrypt()
329 err = skcipher_walk_done(&walk, nbytes); in ecb_decrypt()
340 unsigned int nbytes; in cbc_encrypt() local
345 while ((nbytes = walk.nbytes)) { in cbc_encrypt()
348 nbytes & AES_BLOCK_MASK, walk.iv); in cbc_encrypt()
350 nbytes &= AES_BLOCK_SIZE - 1; in cbc_encrypt()
351 err = skcipher_walk_done(&walk, nbytes); in cbc_encrypt()
362 unsigned int nbytes; in cbc_decrypt() local
367 while ((nbytes = walk.nbytes)) { in cbc_decrypt()
370 nbytes & AES_BLOCK_MASK, walk.iv); in cbc_decrypt()
372 nbytes &= AES_BLOCK_SIZE - 1; in cbc_decrypt()
373 err = skcipher_walk_done(&walk, nbytes); in cbc_decrypt()
429 walk.nbytes, walk.iv); in cts_cbc_encrypt()
485 walk.nbytes, walk.iv); in cts_cbc_decrypt()
515 unsigned int nbytes; in ctr_crypt() local
520 while ((nbytes = walk.nbytes) > 0) { in ctr_crypt()
522 if (nbytes & AES_BLOCK_MASK) in ctr_crypt()
525 nbytes & AES_BLOCK_MASK, in ctr_crypt()
527 nbytes &= ~AES_BLOCK_MASK; in ctr_crypt()
529 if (walk.nbytes == walk.total && nbytes > 0) { in ctr_crypt()
531 crypto_xor_cpy(walk.dst.virt.addr + walk.nbytes - nbytes, in ctr_crypt()
532 walk.src.virt.addr + walk.nbytes - nbytes, in ctr_crypt()
533 keystream, nbytes); in ctr_crypt()
535 nbytes = 0; in ctr_crypt()
538 err = skcipher_walk_done(&walk, nbytes); in ctr_crypt()
564 unsigned int nbytes; in xctr_crypt() local
571 while ((nbytes = walk.nbytes) > 0) { in xctr_crypt()
573 if (nbytes & AES_BLOCK_MASK) in xctr_crypt()
575 walk.src.virt.addr, nbytes & AES_BLOCK_MASK, in xctr_crypt()
577 nbytes &= ~AES_BLOCK_MASK; in xctr_crypt()
578 byte_ctr += walk.nbytes - nbytes; in xctr_crypt()
580 if (walk.nbytes == walk.total && nbytes > 0) { in xctr_crypt()
584 crypto_xor_cpy(walk.dst.virt.addr + walk.nbytes - in xctr_crypt()
585 nbytes, walk.src.virt.addr + walk.nbytes in xctr_crypt()
586 - nbytes, keystream, nbytes); in xctr_crypt()
587 byte_ctr += nbytes; in xctr_crypt()
588 nbytes = 0; in xctr_crypt()
591 err = skcipher_walk_done(&walk, nbytes); in xctr_crypt()
726 while (walk.nbytes > 0) { in gcmaes_crypt_by_sg()
733 walk.nbytes); in gcmaes_crypt_by_sg()
738 walk.nbytes); in gcmaes_crypt_by_sg()
744 walk.nbytes); in gcmaes_crypt_by_sg()
749 walk.nbytes); in gcmaes_crypt_by_sg()
752 walk.src.virt.addr, walk.nbytes); in gcmaes_crypt_by_sg()
755 walk.src.virt.addr, walk.nbytes); in gcmaes_crypt_by_sg()
916 if (!walk.nbytes) in xts_crypt()
919 if (unlikely(tail > 0 && walk.nbytes < walk.total)) { in xts_crypt()
933 if (!walk.nbytes) in xts_crypt()
944 while (walk.nbytes > 0) { in xts_crypt()
945 int nbytes = walk.nbytes; in xts_crypt() local
947 if (nbytes < walk.total) in xts_crypt()
948 nbytes &= ~(AES_BLOCK_SIZE - 1); in xts_crypt()
953 nbytes, walk.iv); in xts_crypt()
957 nbytes, walk.iv); in xts_crypt()
960 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in xts_crypt()
962 if (walk.nbytes > 0) in xts_crypt()
985 walk.nbytes, walk.iv); in xts_crypt()
989 walk.nbytes, walk.iv); in xts_crypt()