Lines Matching refs:AES_BLOCK_SIZE
71 u8 buf[AES_BLOCK_SIZE];
118 cpacf_km(sctx->fc, &sctx->key, out, in, AES_BLOCK_SIZE); in crypto_aes_encrypt()
130 &sctx->key, out, in, AES_BLOCK_SIZE); in crypto_aes_decrypt()
164 .cra_blocksize = AES_BLOCK_SIZE,
241 n = nbytes & ~(AES_BLOCK_SIZE - 1); in ecb_aes_crypt()
290 .base.cra_blocksize = AES_BLOCK_SIZE,
331 u8 iv[AES_BLOCK_SIZE]; in cbc_aes_crypt()
341 memcpy(param.iv, walk.iv, AES_BLOCK_SIZE); in cbc_aes_crypt()
345 n = nbytes & ~(AES_BLOCK_SIZE - 1); in cbc_aes_crypt()
348 memcpy(walk.iv, param.iv, AES_BLOCK_SIZE); in cbc_aes_crypt()
370 .base.cra_blocksize = AES_BLOCK_SIZE,
377 .ivsize = AES_BLOCK_SIZE,
442 if (req->cryptlen < AES_BLOCK_SIZE) in xts_aes_crypt()
445 if (unlikely(!xts_ctx->fc || (req->cryptlen % AES_BLOCK_SIZE) != 0)) { in xts_aes_crypt()
471 n = nbytes & ~(AES_BLOCK_SIZE - 1); in xts_aes_crypt()
521 .base.cra_blocksize = AES_BLOCK_SIZE,
528 .ivsize = AES_BLOCK_SIZE,
575 if (req->cryptlen < AES_BLOCK_SIZE) in fullxts_aes_crypt()
578 if (unlikely(!xts_ctx->fc || (req->cryptlen % AES_BLOCK_SIZE) != 0)) { in fullxts_aes_crypt()
594 memcpy(fxts_param.tweak, req->iv, AES_BLOCK_SIZE); in fullxts_aes_crypt()
599 n = nbytes & ~(AES_BLOCK_SIZE - 1); in fullxts_aes_crypt()
623 .base.cra_blocksize = AES_BLOCK_SIZE,
630 .ivsize = AES_BLOCK_SIZE,
662 memcpy(ctrptr, iv, AES_BLOCK_SIZE); in __ctrblk_init()
663 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(AES_BLOCK_SIZE - 1); in __ctrblk_init()
664 for (i = (n / AES_BLOCK_SIZE) - 1; i > 0; i--) { in __ctrblk_init()
665 memcpy(ctrptr + AES_BLOCK_SIZE, ctrptr, AES_BLOCK_SIZE); in __ctrblk_init()
666 crypto_inc(ctrptr + AES_BLOCK_SIZE, AES_BLOCK_SIZE); in __ctrblk_init()
667 ctrptr += AES_BLOCK_SIZE; in __ctrblk_init()
676 u8 buf[AES_BLOCK_SIZE], *ctrptr; in ctr_aes_crypt()
687 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { in ctr_aes_crypt()
688 n = AES_BLOCK_SIZE; in ctr_aes_crypt()
690 if (nbytes >= 2*AES_BLOCK_SIZE && locked) in ctr_aes_crypt()
692 ctrptr = (n > AES_BLOCK_SIZE) ? ctrblk : walk.iv; in ctr_aes_crypt()
696 memcpy(walk.iv, ctrptr + n - AES_BLOCK_SIZE, in ctr_aes_crypt()
697 AES_BLOCK_SIZE); in ctr_aes_crypt()
698 crypto_inc(walk.iv, AES_BLOCK_SIZE); in ctr_aes_crypt()
707 memset(buf, 0, AES_BLOCK_SIZE); in ctr_aes_crypt()
710 AES_BLOCK_SIZE, walk.iv); in ctr_aes_crypt()
712 crypto_inc(walk.iv, AES_BLOCK_SIZE); in ctr_aes_crypt()
731 .ivsize = AES_BLOCK_SIZE,
735 .chunksize = AES_BLOCK_SIZE,
844 n = min(gw->walk_bytes, AES_BLOCK_SIZE - gw->buf_bytes); in gcm_in_walk_go()
952 u8 h[AES_BLOCK_SIZE]; /* Hash-subkey */ in gcm_aes_crypt()
985 aadlen > 0 ? aadlen : pclen, AES_BLOCK_SIZE); in gcm_aes_crypt()
998 ~(AES_BLOCK_SIZE - 1); in gcm_aes_crypt()
1001 aad_bytes = bytes & ~(AES_BLOCK_SIZE - 1); in gcm_aes_crypt()
1052 .chunksize = AES_BLOCK_SIZE,