Lines Matching refs:nbytes
157 uint8_t out[static 16], size_t nbytes, uint8_t iv[static 16],
164 KASSERT(nbytes % 16 == 0);
167 if (nbytes == 0)
182 for (; nbytes; nbytes -= 16, in += 16, out += 16) {
218 uint8_t out[static 16], size_t nbytes, uint8_t iv[static 16],
225 KASSERT(nbytes % 16 == 0);
228 if (nbytes == 0)
241 cv0 = le32dec(in + nbytes - 16 + 4*0);
242 cv1 = le32dec(in + nbytes - 16 + 4*1);
243 cv2 = le32dec(in + nbytes - 16 + 4*2);
244 cv3 = le32dec(in + nbytes - 16 + 4*3);
253 if (nbytes % 32) {
254 KASSERT(nbytes % 32 == 16);
269 nbytes -= 16;
270 if (nbytes == 0)
277 cv0 = le32dec(in + nbytes - 16 + 4*0);
278 cv1 = le32dec(in + nbytes - 16 + 4*1);
279 cv2 = le32dec(in + nbytes - 16 + 4*2);
280 cv3 = le32dec(in + nbytes - 16 + 4*3);
281 le32enc(out + nbytes + 4*0, cv0 ^ q[2*0]);
282 le32enc(out + nbytes + 4*1, cv1 ^ q[2*1]);
283 le32enc(out + nbytes + 4*2, cv2 ^ q[2*2]);
284 le32enc(out + nbytes + 4*3, cv3 ^ q[2*3]);
288 KASSERT(nbytes >= 32);
299 cv0 = q[2*0] = le32dec(in + nbytes - 32 + 4*0);
300 cv1 = q[2*1] = le32dec(in + nbytes - 32 + 4*1);
301 cv2 = q[2*2] = le32dec(in + nbytes - 32 + 4*2);
302 cv3 = q[2*3] = le32dec(in + nbytes - 32 + 4*3);
309 le32enc(out + nbytes - 16 + 4*0, q[2*0 + 1] ^ cv0);
310 le32enc(out + nbytes - 16 + 4*1, q[2*1 + 1] ^ cv1);
311 le32enc(out + nbytes - 16 + 4*2, q[2*2 + 1] ^ cv2);
312 le32enc(out + nbytes - 16 + 4*3, q[2*3 + 1] ^ cv3);
315 nbytes -= 32;
316 if (nbytes == 0)
323 cv0 = le32dec(in + nbytes - 16 + 4*0);
324 cv1 = le32dec(in + nbytes - 16 + 4*1);
325 cv2 = le32dec(in + nbytes - 16 + 4*2);
326 cv3 = le32dec(in + nbytes - 16 + 4*3);
327 le32enc(out + nbytes + 4*0, q[2*0] ^ cv0);
328 le32enc(out + nbytes + 4*1, q[2*1] ^ cv1);
329 le32enc(out + nbytes + 4*2, q[2*2] ^ cv2);
330 le32enc(out + nbytes + 4*3, q[2*3] ^ cv3);
394 uint8_t out[static 16], size_t nbytes, uint8_t tweak[static 16],
401 KASSERT(nbytes % 16 == 0);
404 if (nbytes == 0)
417 if (nbytes % 32) {
418 KASSERT(nbytes % 32 == 16);
440 if ((nbytes -= 16) == 0)
447 KASSERT(nbytes >= 32);
483 } while (nbytes -= 32, nbytes);
498 uint8_t out[static 16], size_t nbytes, uint8_t tweak[static 16],
505 KASSERT(nbytes % 16 == 0);
508 if (nbytes == 0)
521 if (nbytes % 32) {
522 KASSERT(nbytes % 32 == 16);
544 if ((nbytes -= 16) == 0)
551 KASSERT(nbytes >= 32);
587 } while (nbytes -= 32, nbytes);
602 size_t nbytes, uint8_t auth[static 16], uint32_t nrounds)
607 KASSERT(nbytes);
608 KASSERT(nbytes % 16 == 0);
622 for (; nbytes; nbytes -= 16, in += 16) {
648 size_t nbytes, uint8_t authctr[32], uint32_t nrounds)
654 KASSERT(nbytes);
655 KASSERT(nbytes % 16 == 0);
672 for (; nbytes; nbytes -= 16, in += 16, out += 16) {
713 size_t nbytes, uint8_t authctr[32], uint32_t nrounds)
720 KASSERT(nbytes);
721 KASSERT(nbytes % 16 == 0);
775 if ((nbytes -= 16) == 0)