Lines Matching refs:nbytes
39 unsigned int nbytes; in sm4_ecb_do_crypt() local
44 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt()
49 nblocks = nbytes / SM4_BLOCK_SIZE; in sm4_ecb_do_crypt()
58 err = skcipher_walk_done(&walk, nbytes % SM4_BLOCK_SIZE); in sm4_ecb_do_crypt()
85 unsigned int nbytes; in sm4_cbc_encrypt() local
90 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt()
95 while (nbytes >= SM4_BLOCK_SIZE) { in sm4_cbc_encrypt()
101 nbytes -= SM4_BLOCK_SIZE; in sm4_cbc_encrypt()
106 err = skcipher_walk_done(&walk, nbytes); in sm4_cbc_encrypt()
117 unsigned int nbytes; in sm4_cbc_decrypt() local
122 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_decrypt()
127 nblocks = nbytes / SM4_BLOCK_SIZE; in sm4_cbc_decrypt()
137 err = skcipher_walk_done(&walk, nbytes % SM4_BLOCK_SIZE); in sm4_cbc_decrypt()
148 unsigned int nbytes; in sm4_ctr_crypt() local
153 while ((nbytes = walk.nbytes) > 0) { in sm4_ctr_crypt()
158 nblocks = nbytes / SM4_BLOCK_SIZE; in sm4_ctr_crypt()
169 nbytes -= nblocks * SM4_BLOCK_SIZE; in sm4_ctr_crypt()
173 if (walk.nbytes == walk.total && nbytes > 0) { in sm4_ctr_crypt()
178 crypto_xor_cpy(dst, src, keystream, nbytes); in sm4_ctr_crypt()
179 nbytes = 0; in sm4_ctr_crypt()
182 err = skcipher_walk_done(&walk, nbytes); in sm4_ctr_crypt()