diff options
Diffstat (limited to 'src/cookie.h')
-rw-r--r-- | src/cookie.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cookie.h b/src/cookie.h index 87a0e5a..c87d3dd 100644 --- a/src/cookie.h +++ b/src/cookie.h @@ -14,6 +14,7 @@ struct sk_buff; struct cookie_checker { u8 secret[NOISE_HASH_LEN]; u8 cookie_encryption_key[NOISE_SYMMETRIC_KEY_LEN]; + u8 message_mac1_key[NOISE_SYMMETRIC_KEY_LEN]; u64 secret_birthdate; struct rw_semaphore secret_lock; struct ratelimiter ratelimiter; @@ -27,6 +28,7 @@ struct cookie { bool have_sent_mac1; u8 last_mac1_sent[COOKIE_LEN]; u8 cookie_decryption_key[NOISE_SYMMETRIC_KEY_LEN]; + u8 message_mac1_key[NOISE_SYMMETRIC_KEY_LEN]; struct rw_semaphore lock; }; @@ -39,7 +41,8 @@ enum cookie_mac_state { int cookie_checker_init(struct cookie_checker *checker, struct wireguard_device *wg); void cookie_checker_uninit(struct cookie_checker *checker); -void cookie_checker_precompute_keys(struct cookie_checker *checker, struct wireguard_peer *peer); +void cookie_checker_precompute_device_keys(struct cookie_checker *checker); +void cookie_checker_precompute_peer_keys(struct wireguard_peer *peer); void cookie_init(struct cookie *cookie); enum cookie_mac_state cookie_validate_packet(struct cookie_checker *checker, struct sk_buff *skb, bool check_cookie); |