Lines Matching refs:blk
103 unsigned char iv[EALG_MAX_BLOCK_LEN], blk[EALG_MAX_BLOCK_LEN]; in swcr_encdec() local
182 crypto_cursor_copydata(&cc_in, blks, blk); in swcr_encdec()
183 inblk = blk; in swcr_encdec()
186 outblk = blk; in swcr_encdec()
237 crypto_cursor_copyback(&cc_out, blks, blk); in swcr_encdec()
262 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_encdec()
263 inblk = blk; in swcr_encdec()
267 outblk = blk; in swcr_encdec()
277 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_encdec()
280 explicit_bzero(blk, sizeof(blk)); in swcr_encdec()
391 u_char *blk = (u_char *)blkbuf; in swcr_gmac() local
425 crypto_cursor_copydata(&cc, len, blk); in swcr_gmac()
426 inblk = blk; in swcr_gmac()
431 memset(blk, 0, blksz); in swcr_gmac()
432 crypto_cursor_copydata(&cc, resid, blk); in swcr_gmac()
433 axf->Update(&ctx, blk, blksz); in swcr_gmac()
437 memset(blk, 0, blksz); in swcr_gmac()
438 blkp = (uint32_t *)blk + 1; in swcr_gmac()
440 axf->Update(&ctx, blk, blksz); in swcr_gmac()
468 u_char *blk = (u_char *)blkbuf; in swcr_gcm() local
511 memset(blk, 0, blksz); in swcr_gcm()
512 memcpy(blk, (char *)crp->crp_aad + len, in swcr_gcm()
514 axf->Update(&ctx, blk, blksz); in swcr_gcm()
528 crypto_cursor_copydata(&cc_in, len, blk); in swcr_gcm()
529 inblk = blk; in swcr_gcm()
534 memset(blk, 0, blksz); in swcr_gcm()
535 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
536 axf->Update(&ctx, blk, blksz); in swcr_gcm()
552 crypto_cursor_copydata(&cc_in, blksz, blk); in swcr_gcm()
553 inblk = blk; in swcr_gcm()
560 outblk = blk; in swcr_gcm()
565 if (outblk == blk) in swcr_gcm()
566 crypto_cursor_copyback(&cc_out, blksz, blk); in swcr_gcm()
574 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
576 exf->encrypt_last(swe->sw_kschedule, blk, blk, resid); in swcr_gcm()
577 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_gcm()
579 axf->Update(&ctx, blk, resid); in swcr_gcm()
583 memset(blk, 0, blksz); in swcr_gcm()
584 blkp = (uint32_t *)blk + 1; in swcr_gcm()
586 blkp = (uint32_t *)blk + 3; in swcr_gcm()
588 axf->Update(&ctx, blk, blksz); in swcr_gcm()
613 crypto_cursor_copydata(&cc_in, blksz, blk); in swcr_gcm()
614 inblk = blk; in swcr_gcm()
620 outblk = blk; in swcr_gcm()
624 if (outblk == blk) in swcr_gcm()
625 crypto_cursor_copyback(&cc_out, blksz, blk); in swcr_gcm()
630 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_gcm()
631 exf->decrypt_last(swe->sw_kschedule, blk, blk, resid); in swcr_gcm()
632 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_gcm()
706 u_char *blk = (u_char *)blkbuf; in swcr_ccm() local
770 crypto_cursor_copydata(&cc_in, blksz, blk); in swcr_ccm()
771 inblk = blk; in swcr_ccm()
778 outblk = blk; in swcr_ccm()
783 if (outblk == blk) in swcr_ccm()
784 crypto_cursor_copyback(&cc_out, blksz, blk); in swcr_ccm()
796 exf->decrypt(swe->sw_kschedule, inblk, blk); in swcr_ccm()
797 axf->Update(&ctx, blk, blksz); in swcr_ccm()
801 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_ccm()
803 axf->Update(&ctx, blk, resid); in swcr_ccm()
804 exf->encrypt_last(swe->sw_kschedule, blk, blk, resid); in swcr_ccm()
805 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_ccm()
807 exf->decrypt_last(swe->sw_kschedule, blk, blk, resid); in swcr_ccm()
808 axf->Update(&ctx, blk, resid); in swcr_ccm()
837 crypto_cursor_copydata(&cc_in, blksz, blk); in swcr_ccm()
838 inblk = blk; in swcr_ccm()
844 outblk = blk; in swcr_ccm()
848 if (outblk == blk) in swcr_ccm()
849 crypto_cursor_copyback(&cc_out, blksz, blk); in swcr_ccm()
854 crypto_cursor_copydata(&cc_in, resid, blk); in swcr_ccm()
855 exf->decrypt_last(swe->sw_kschedule, blk, blk, resid); in swcr_ccm()
856 crypto_cursor_copyback(&cc_out, resid, blk); in swcr_ccm()