Lines Matching refs:bsize
19 unsigned int bsize = crypto_lskcipher_blocksize(tfm); in crypto_cbc_encrypt_segment() local
21 for (; nbytes >= bsize; src += bsize, dst += bsize, nbytes -= bsize) { in crypto_cbc_encrypt_segment()
22 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment()
23 crypto_lskcipher_encrypt(tfm, iv, dst, bsize, NULL); in crypto_cbc_encrypt_segment()
24 memcpy(iv, dst, bsize); in crypto_cbc_encrypt_segment()
33 unsigned int bsize = crypto_lskcipher_blocksize(tfm); in crypto_cbc_encrypt_inplace() local
36 if (nbytes < bsize) in crypto_cbc_encrypt_inplace()
40 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace()
41 crypto_lskcipher_encrypt(tfm, src, src, bsize, NULL); in crypto_cbc_encrypt_inplace()
44 src += bsize; in crypto_cbc_encrypt_inplace()
45 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace()
47 memcpy(oiv, iv, bsize); in crypto_cbc_encrypt_inplace()
73 unsigned int bsize = crypto_lskcipher_blocksize(tfm); in crypto_cbc_decrypt_segment() local
76 if (nbytes < bsize) in crypto_cbc_decrypt_segment()
80 crypto_lskcipher_decrypt(tfm, src, dst, bsize, NULL); in crypto_cbc_decrypt_segment()
81 crypto_xor(dst, iv, bsize); in crypto_cbc_decrypt_segment()
84 src += bsize; in crypto_cbc_decrypt_segment()
85 dst += bsize; in crypto_cbc_decrypt_segment()
86 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_decrypt_segment()
88 memcpy(oiv, iv, bsize); in crypto_cbc_decrypt_segment()
97 unsigned int bsize = crypto_lskcipher_blocksize(tfm); in crypto_cbc_decrypt_inplace() local
100 if (nbytes < bsize) in crypto_cbc_decrypt_inplace()
104 src += nbytes - (nbytes & (bsize - 1)) - bsize; in crypto_cbc_decrypt_inplace()
105 memcpy(last_iv, src, bsize); in crypto_cbc_decrypt_inplace()
108 crypto_lskcipher_decrypt(tfm, src, src, bsize, NULL); in crypto_cbc_decrypt_inplace()
109 if ((nbytes -= bsize) < bsize) in crypto_cbc_decrypt_inplace()
111 crypto_xor(src, src - bsize, bsize); in crypto_cbc_decrypt_inplace()
112 src -= bsize; in crypto_cbc_decrypt_inplace()
115 crypto_xor(src, iv, bsize); in crypto_cbc_decrypt_inplace()
116 memcpy(iv, last_iv, bsize); in crypto_cbc_decrypt_inplace()