Lines Matching refs:macs
123 struct message_macs *macs = (struct message_macs *) in wg_cookie_validate_packet() local
124 (skb->data + skb->len - sizeof(*macs)); in wg_cookie_validate_packet()
132 if (crypto_memneq(computed_mac, macs->mac1, COOKIE_LEN)) in wg_cookie_validate_packet()
143 if (crypto_memneq(computed_mac, macs->mac2, COOKIE_LEN)) in wg_cookie_validate_packet()
159 struct message_macs *macs = (struct message_macs *) in wg_cookie_add_mac_to_packet() local
160 ((u8 *)message + len - sizeof(*macs)); in wg_cookie_add_mac_to_packet()
163 compute_mac1(macs->mac1, message, len, in wg_cookie_add_mac_to_packet()
165 memcpy(peer->latest_cookie.last_mac1_sent, macs->mac1, COOKIE_LEN); in wg_cookie_add_mac_to_packet()
173 compute_mac2(macs->mac2, message, len, in wg_cookie_add_mac_to_packet()
176 memset(macs->mac2, 0, COOKIE_LEN); in wg_cookie_add_mac_to_packet()
184 struct message_macs *macs = (struct message_macs *) in wg_cookie_message_create() local
185 ((u8 *)skb->data + skb->len - sizeof(*macs)); in wg_cookie_message_create()
194 macs->mac1, COOKIE_LEN, dst->nonce, in wg_cookie_message_create()