• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/crypto/

Lines Matching refs:bsize

80 	int bsize = crypto_blkcipher_blocksize(desc->tfm);
81 u8 tmp[bsize], tmp2[bsize];
84 int lastn = nbytes - bsize;
85 u8 iv[bsize];
86 u8 s[bsize * 2], d[bsize * 2];
98 memcpy(iv, desc->info, bsize);
104 sg_set_buf(&sgsrc[0], s, bsize);
105 sg_set_buf(&sgdst[0], tmp, bsize);
106 err = crypto_blkcipher_encrypt_iv(&lcldesc, sgdst, sgsrc, bsize);
108 memcpy(d + bsize, tmp, lastn);
112 sg_set_buf(&sgsrc[0], s + bsize, bsize);
113 sg_set_buf(&sgdst[0], tmp2, bsize);
114 err = crypto_blkcipher_encrypt_iv(&lcldesc, sgdst, sgsrc, bsize);
116 memcpy(d, tmp2, bsize);
120 memcpy(desc->info, tmp2, bsize);
130 int bsize = crypto_blkcipher_blocksize(desc->tfm);
131 int tot_blocks = (nbytes + bsize - 1) / bsize;
141 err = crypto_blkcipher_encrypt_iv(&lcldesc, dst, src, bsize);
142 } else if (nbytes <= bsize * 2) {
147 cbc_blocks * bsize);
151 cbc_blocks * bsize,
152 nbytes - (cbc_blocks * bsize));
166 int bsize = crypto_blkcipher_blocksize(desc->tfm);
167 u8 tmp[bsize];
170 int lastn = nbytes - bsize;
171 u8 iv[bsize];
172 u8 s[bsize * 2], d[bsize * 2];
189 sg_set_buf(&sgsrc[0], s, bsize);
190 sg_set_buf(&sgdst[0], tmp, bsize);
191 err = crypto_blkcipher_decrypt_iv(&lcldesc, sgdst, sgsrc, bsize);
196 memcpy(iv, s + bsize, lastn);
198 crypto_xor(tmp, iv, bsize);
200 memcpy(d + bsize, tmp, lastn);
203 memcpy(s + bsize + lastn, tmp + lastn, bsize - lastn);
206 sg_set_buf(&sgsrc[0], s + bsize, bsize);
207 sg_set_buf(&sgdst[0], d, bsize);
208 err = crypto_blkcipher_decrypt_iv(&lcldesc, sgdst, sgsrc, bsize);
211 crypto_xor(d, desc->info, bsize);
215 memcpy(desc->info, s, bsize);
224 int bsize = crypto_blkcipher_blocksize(desc->tfm);
225 int tot_blocks = (nbytes + bsize - 1) / bsize;
235 err = crypto_blkcipher_decrypt_iv(&lcldesc, dst, src, bsize);
236 } else if (nbytes <= bsize * 2) {
241 cbc_blocks * bsize);
245 cbc_blocks * bsize,
246 nbytes - (cbc_blocks * bsize));