Lines Matching refs:resid

106 	int blksz, resid;  in swcr_encdec()  local
161 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_encdec()
182 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
208 if (resid > 0) { in swcr_encdec()
211 __func__, resid, exf->name)); in swcr_encdec()
212 KASSERT(resid < blksz, ("%s: partial block too big", __func__)); in swcr_encdec()
216 if (inlen < resid) { in swcr_encdec()
217 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_encdec()
220 if (outlen < resid) in swcr_encdec()
224 resid); in swcr_encdec()
227 resid); in swcr_encdec()
228 if (outlen < resid) in swcr_encdec()
229 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_encdec()
335 int blksz, error, ivlen, resid; in swcr_gmac() local
357 for (resid = crp->crp_payload_length; resid >= blksz; resid -= len) { in swcr_gmac()
360 len = rounddown(MIN(len, resid), blksz); in swcr_gmac()
369 if (resid > 0) { in swcr_gmac()
371 crypto_cursor_copydata(&cc, resid, blk); in swcr_gmac()
416 int blksz, error, ivlen, r, resid; in swcr_gcm() local
452 for (resid = crp->crp_aad_length; resid >= blksz; in swcr_gcm()
453 resid -= inlen) { in swcr_gcm()
456 inlen = rounddown2(MIN(inlen, resid), blksz); in swcr_gcm()
465 if (resid > 0) { in swcr_gcm()
467 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
482 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_gcm()
500 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
515 todo = rounddown2(MIN(resid, inlen), blksz); in swcr_gcm()
527 if (resid > 0) { in swcr_gcm()
528 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
530 exf->encrypt_last(ctx, blk, blk, resid); in swcr_gcm()
531 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_gcm()
533 exf->update(ctx, blk, resid); in swcr_gcm()
563 for (resid = crp->crp_payload_length; resid > blksz; in swcr_gcm()
564 resid -= todo) { in swcr_gcm()
579 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
602 if (resid > 0) { in swcr_gcm()
603 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
604 exf->decrypt_last(ctx, blk, blk, resid); in swcr_gcm()
605 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_gcm()
750 int blksz, error, ivlen, r, resid; in swcr_ccm() local
812 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_ccm()
830 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
866 if (resid > 0) { in swcr_ccm()
867 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_ccm()
869 exf->update(ctx, blk, resid); in swcr_ccm()
870 exf->encrypt_last(ctx, blk, blk, resid); in swcr_ccm()
871 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_ccm()
873 exf->decrypt_last(ctx, blk, blk, resid); in swcr_ccm()
874 exf->update(ctx, blk, resid); in swcr_ccm()
898 for (resid = crp->crp_payload_length; resid >= blksz; in swcr_ccm()
899 resid -= todo) { in swcr_ccm()
916 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
939 if (resid > 0) { in swcr_ccm()
940 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_ccm()
941 exf->decrypt_last(ctx, blk, blk, resid); in swcr_ccm()
942 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_ccm()
975 int blksz, error, r, resid; in swcr_chacha20_poly1305() local
1020 for (resid = crp->crp_payload_length; resid >= blksz; in swcr_chacha20_poly1305()
1021 resid -= todo) { in swcr_chacha20_poly1305()
1039 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1062 if (resid > 0) { in swcr_chacha20_poly1305()
1063 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_chacha20_poly1305()
1064 exf->encrypt_last(ctx, blk, blk, resid); in swcr_chacha20_poly1305()
1065 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_chacha20_poly1305()
1066 exf->update(ctx, blk, resid); in swcr_chacha20_poly1305()
1103 for (resid = crp->crp_payload_length; resid > blksz; in swcr_chacha20_poly1305()
1104 resid -= todo) { in swcr_chacha20_poly1305()
1120 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1143 if (resid > 0) { in swcr_chacha20_poly1305()
1144 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_chacha20_poly1305()
1145 exf->decrypt_last(ctx, blk, blk, resid); in swcr_chacha20_poly1305()
1146 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_chacha20_poly1305()