Lines Matching refs:AES_BLOCK_SIZE
65 __be32 *n = (__be32 *)&maciv[AES_BLOCK_SIZE - 8]; in ccm_init_mac()
83 memcpy(maciv, req->iv, AES_BLOCK_SIZE - l); in ccm_init_mac()
96 memset(&req->iv[AES_BLOCK_SIZE - l], 0, l); in ccm_init_mac()
103 int enc_after = (macp + abytes) % AES_BLOCK_SIZE; in ce_aes_ccm_auth_data()
106 u32 blocks = abytes / AES_BLOCK_SIZE; in ce_aes_ccm_auth_data()
108 if (macp == AES_BLOCK_SIZE || (!macp && blocks > 0)) { in ce_aes_ccm_auth_data()
111 u32 adv = (blocks - rem) * AES_BLOCK_SIZE; in ce_aes_ccm_auth_data()
113 macp = enc_after ? 0 : AES_BLOCK_SIZE; in ce_aes_ccm_auth_data()
123 u32 l = min(AES_BLOCK_SIZE - macp, abytes); in ce_aes_ccm_auth_data()
142 u32 macp = AES_BLOCK_SIZE; in ccm_calculate_auth_mac()
184 u8 __aligned(8) mac[AES_BLOCK_SIZE]; in ccm_encrypt()
185 u8 orig_iv[AES_BLOCK_SIZE]; in ccm_encrypt()
194 memcpy(orig_iv, req->iv, AES_BLOCK_SIZE); in ccm_encrypt()
206 u32 tail = walk.nbytes % AES_BLOCK_SIZE; in ccm_encrypt()
209 u8 buf[AES_BLOCK_SIZE]; in ccm_encrypt()
217 if (unlikely(walk.nbytes < AES_BLOCK_SIZE)) in ccm_encrypt()
225 if (unlikely(walk.nbytes < AES_BLOCK_SIZE)) in ccm_encrypt()
251 u8 __aligned(8) mac[AES_BLOCK_SIZE]; in ccm_decrypt()
252 u8 orig_iv[AES_BLOCK_SIZE]; in ccm_decrypt()
261 memcpy(orig_iv, req->iv, AES_BLOCK_SIZE); in ccm_decrypt()
273 u32 tail = walk.nbytes % AES_BLOCK_SIZE; in ccm_decrypt()
276 u8 buf[AES_BLOCK_SIZE]; in ccm_decrypt()
284 if (unlikely(walk.nbytes < AES_BLOCK_SIZE)) in ccm_decrypt()
292 if (unlikely(walk.nbytes < AES_BLOCK_SIZE)) in ccm_decrypt()
324 .ivsize = AES_BLOCK_SIZE,
325 .chunksize = AES_BLOCK_SIZE,
326 .maxauthsize = AES_BLOCK_SIZE,