aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/cookie.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cookie.c')
-rw-r--r--src/cookie.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cookie.c b/src/cookie.c
index f02a7e8..0409b56 100644
--- a/src/cookie.c
+++ b/src/cookie.c
@@ -164,6 +164,7 @@ void cookie_message_create(struct message_handshake_cookie *dst, struct sk_buff
dst->header.type = MESSAGE_HANDSHAKE_COOKIE;
dst->receiver_index = index;
get_random_bytes(dst->salt, COOKIE_SALT_LEN);
+ blake2s(dst->salt, dst->salt, NULL, COOKIE_SALT_LEN, COOKIE_SALT_LEN, 0); /* Avoid directly transmitting RNG output. */
down_read(&checker->device->static_identity.lock);
if (unlikely(!checker->device->static_identity.has_identity)) {