Lines Matching defs: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[],
104 ce_aes_ccm_auth_data(mac, in, abytes, macp, key->key_enc,
111 crypto_xor(&mac[*macp], in, added);
119 aes_encrypt(key, mac, mac);
120 crypto_xor(mac, in, AES_BLOCK_SIZE);
127 aes_encrypt(key, mac, mac);
128 crypto_xor(mac, in, abytes);
134 static void ccm_calculate_auth_mac(struct aead_request *req, u8 mac[])
153 ccm_update_mac(ctx, mac, (u8 *)<ag, ltag.len, &macp);
165 ccm_update_mac(ctx, mac, p, n, &macp);
174 static int ccm_crypt_fallback(struct skcipher_walk *walk, u8 mac[], u8 iv0[],
200 aes_encrypt(ctx, mac, mac);
202 crypto_xor(mac, src, bsize);
205 crypto_xor(mac, dst, bsize);
216 aes_encrypt(ctx, mac, mac);
217 crypto_xor(mac, buf, AES_BLOCK_SIZE);
227 u8 __aligned(8) mac[AES_BLOCK_SIZE];
232 err = ccm_init_mac(req, mac, len);
237 ccm_calculate_auth_mac(req, mac);
255 num_rounds(ctx), mac, walk.iv);
262 ce_aes_ccm_final(mac, buf, ctx->key_enc,
267 err = ccm_crypt_fallback(&walk, mac, buf, ctx, true);
273 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen,
285 u8 __aligned(8) mac[AES_BLOCK_SIZE];
290 err = ccm_init_mac(req, mac, len);
295 ccm_calculate_auth_mac(req, mac);
313 num_rounds(ctx), mac, walk.iv);
320 ce_aes_ccm_final(mac, buf, ctx->key_enc,
325 err = ccm_crypt_fallback(&walk, mac, buf, ctx, false);
336 if (crypto_memneq(mac, buf, authsize))