Lines Matching refs:aad

318 static u8 ccmp_gcmp_aad(struct sk_buff *skb, u8 *aad)  in ccmp_gcmp_aad()  argument
352 put_unaligned_be16(len_a, &aad[0]); in ccmp_gcmp_aad()
353 put_unaligned(mask_fc, (__le16 *)&aad[2]); in ccmp_gcmp_aad()
354 memcpy(&aad[4], &hdr->addrs, 3 * ETH_ALEN); in ccmp_gcmp_aad()
357 aad[22] = *((u8 *) &hdr->seq_ctrl) & 0x0f; in ccmp_gcmp_aad()
358 aad[23] = 0; in ccmp_gcmp_aad()
361 memcpy(&aad[24], hdr->addr4, ETH_ALEN); in ccmp_gcmp_aad()
362 aad[30] = qos_tid; in ccmp_gcmp_aad()
363 aad[31] = 0; in ccmp_gcmp_aad()
365 memset(&aad[24], 0, ETH_ALEN + IEEE80211_QOS_CTL_LEN); in ccmp_gcmp_aad()
366 aad[24] = qos_tid; in ccmp_gcmp_aad()
372 static void ccmp_special_blocks(struct sk_buff *skb, u8 *pn, u8 *b_0, u8 *aad) in ccmp_special_blocks() argument
375 u8 qos_tid = ccmp_gcmp_aad(skb, aad); in ccmp_special_blocks()
428 u8 aad[CCM_AAD_LEN]; in ccmp_encrypt_skb() local
482 ccmp_special_blocks(skb, pn, b_0, aad); in ccmp_encrypt_skb()
483 return ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, in ccmp_encrypt_skb()
557 u8 aad[2 * AES_BLOCK_SIZE]; in ieee80211_crypto_ccmp_decrypt() local
560 ccmp_special_blocks(skb, pn, b_0, aad); in ieee80211_crypto_ccmp_decrypt()
563 key->u.ccmp.tfm, b_0, aad, in ieee80211_crypto_ccmp_decrypt()
584 static void gcmp_special_blocks(struct sk_buff *skb, u8 *pn, u8 *j_0, u8 *aad) in gcmp_special_blocks() argument
594 ccmp_gcmp_aad(skb, aad); in gcmp_special_blocks()
628 u8 aad[GCM_AAD_LEN]; in gcmp_encrypt_skb() local
683 gcmp_special_blocks(skb, pn, j_0, aad); in gcmp_encrypt_skb()
684 return ieee80211_aes_gcm_encrypt(key->u.gcmp.tfm, j_0, aad, pos, len, in gcmp_encrypt_skb()
753 u8 aad[2 * AES_BLOCK_SIZE]; in ieee80211_crypto_gcmp_decrypt() local
756 gcmp_special_blocks(skb, pn, j_0, aad); in ieee80211_crypto_gcmp_decrypt()
759 key->u.gcmp.tfm, j_0, aad, in ieee80211_crypto_gcmp_decrypt()
781 static void bip_aad(struct sk_buff *skb, u8 *aad) in bip_aad() argument
793 put_unaligned(mask_fc, (__le16 *) &aad[0]); in bip_aad()
795 memcpy(aad + 2, &hdr->addrs, 3 * ETH_ALEN); in bip_aad()
827 u8 aad[20]; in ieee80211_crypto_aes_cmac_encrypt() local
857 bip_aad(skb, aad); in ieee80211_crypto_aes_cmac_encrypt()
862 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_encrypt()
875 u8 aad[20]; in ieee80211_crypto_aes_cmac_256_encrypt() local
901 bip_aad(skb, aad); in ieee80211_crypto_aes_cmac_256_encrypt()
905 ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_256_encrypt()
918 u8 aad[20], mic[8], ipn[6]; in ieee80211_crypto_aes_cmac_decrypt() local
944 bip_aad(skb, aad); in ieee80211_crypto_aes_cmac_decrypt()
945 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_decrypt()
968 u8 aad[20], mic[16], ipn[6]; in ieee80211_crypto_aes_cmac_256_decrypt() local
994 bip_aad(skb, aad); in ieee80211_crypto_aes_cmac_256_decrypt()
995 ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_256_decrypt()
1019 u8 aad[GMAC_AAD_LEN]; in ieee80211_crypto_aes_gmac_encrypt() local
1046 bip_aad(skb, aad); in ieee80211_crypto_aes_gmac_encrypt()
1053 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, in ieee80211_crypto_aes_gmac_encrypt()
1067 u8 aad[GMAC_AAD_LEN], *mic, ipn[6], nonce[GMAC_NONCE_LEN]; in ieee80211_crypto_aes_gmac_decrypt() local
1093 bip_aad(skb, aad); in ieee80211_crypto_aes_gmac_decrypt()
1101 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, in ieee80211_crypto_aes_gmac_decrypt()