diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-23 16:25:18 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-12-23 21:09:23 +0100 |
commit | 6e4a10e8f2c73951f8e8fc2ac2821c5582d133bc (patch) | |
tree | ca4a7d47dcc49b699c4916addfd7cc555b977fb2 /src/peer.c | |
parent | wg-config: cleanups (diff) | |
download | wireguard-monolithic-historical-6e4a10e8f2c73951f8e8fc2ac2821c5582d133bc.tar.xz wireguard-monolithic-historical-6e4a10e8f2c73951f8e8fc2ac2821c5582d133bc.zip |
cookies: use xchacha20poly1305 instead of chacha20poly1305
This allows us to precompute the blake2s calls and save cycles, since
hchacha is fast.
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -35,6 +35,7 @@ struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_ peer->device = wg; cookie_init(&peer->latest_cookie); noise_handshake_init(&peer->handshake, &wg->static_identity, public_key, peer); + cookie_checker_precompute_keys(&wg->cookie_checker, peer); mutex_init(&peer->keypairs.keypair_update_lock); INIT_WORK(&peer->transmit_handshake_work, packet_send_queued_handshakes); rwlock_init(&peer->endpoint_lock); |