From 0c61d4e4332efcacc6dd8a0393f00b896e95585c Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 24 Mar 2024 05:56:30 +0400 Subject: [PATCH] Changed a crypt_hello_get_nonce func because now a half of a nonce is placed after a pub key and before a signature. --- src/crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypt.c b/src/crypt.c index ac09beb..baab383 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -141,8 +141,8 @@ unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const const unsigned char *first = NULL, *second = NULL; - first = (is_client ? own_hello : remote_hello) + CRYPT_PKEY_HEXLEN+CRYPT_SIGN_LEN; - second = (is_client ? remote_hello : own_hello) + CRYPT_PKEY_HEXLEN+CRYPT_SIGN_LEN; + first = (is_client ? own_hello : remote_hello) + CRYPT_PKEY_HEXLEN; + second = (is_client ? remote_hello : own_hello) + CRYPT_PKEY_HEXLEN; memcpy(nonce, first, CRYPT_NONCEHALF_LEN); memcpy(nonce+CRYPT_NONCEHALF_LEN, second, CRYPT_NONCEHALF_LEN);