• Home
  • Raw
  • Download

Lines Matching refs:mac

32 asmlinkage void ce_aes_ccm_auth_data(u8 mac[], u8 const in[], u32 abytes,
36 u32 const rk[], u32 rounds, u8 mac[],
40 u32 const rk[], u32 rounds, u8 mac[],
43 asmlinkage void ce_aes_ccm_final(u8 mac[], u8 const ctr[], u32 const rk[],
99 static void ccm_update_mac(struct crypto_aes_ctx *key, u8 mac[], u8 const in[], in ccm_update_mac() argument
104 ce_aes_ccm_auth_data(mac, in, abytes, macp, key->key_enc, in ccm_update_mac()
111 crypto_xor(&mac[*macp], in, added); in ccm_update_mac()
119 aes_encrypt(key, mac, mac); in ccm_update_mac()
120 crypto_xor(mac, in, AES_BLOCK_SIZE); in ccm_update_mac()
127 aes_encrypt(key, mac, mac); in ccm_update_mac()
128 crypto_xor(mac, in, abytes); in ccm_update_mac()
134 static void ccm_calculate_auth_mac(struct aead_request *req, u8 mac[]) in ccm_calculate_auth_mac() argument
153 ccm_update_mac(ctx, mac, (u8 *)&ltag, ltag.len, &macp); in ccm_calculate_auth_mac()
165 ccm_update_mac(ctx, mac, p, n, &macp); in ccm_calculate_auth_mac()
174 static int ccm_crypt_fallback(struct skcipher_walk *walk, u8 mac[], u8 iv0[], in ccm_crypt_fallback() argument
200 aes_encrypt(ctx, mac, mac); in ccm_crypt_fallback()
202 crypto_xor(mac, src, bsize); in ccm_crypt_fallback()
205 crypto_xor(mac, dst, bsize); in ccm_crypt_fallback()
216 aes_encrypt(ctx, mac, mac); in ccm_crypt_fallback()
217 crypto_xor(mac, buf, AES_BLOCK_SIZE); in ccm_crypt_fallback()
227 u8 __aligned(8) mac[AES_BLOCK_SIZE]; in ccm_encrypt()
232 err = ccm_init_mac(req, mac, len); in ccm_encrypt()
237 ccm_calculate_auth_mac(req, mac); in ccm_encrypt()
255 num_rounds(ctx), mac, walk.iv); in ccm_encrypt()
262 ce_aes_ccm_final(mac, buf, ctx->key_enc, in ccm_encrypt()
267 err = ccm_crypt_fallback(&walk, mac, buf, ctx, true); in ccm_encrypt()
273 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
285 u8 __aligned(8) mac[AES_BLOCK_SIZE]; in ccm_decrypt()
290 err = ccm_init_mac(req, mac, len); in ccm_decrypt()
295 ccm_calculate_auth_mac(req, mac); in ccm_decrypt()
313 num_rounds(ctx), mac, walk.iv); in ccm_decrypt()
320 ce_aes_ccm_final(mac, buf, ctx->key_enc, in ccm_decrypt()
325 err = ccm_crypt_fallback(&walk, mac, buf, ctx, false); in ccm_decrypt()
336 if (crypto_memneq(mac, buf, authsize)) in ccm_decrypt()