1
0

Changed a crypt_hello_get_nonce func because now a half of a nonce is placed after a pub key and before a signature.

This commit is contained in:
Alexander Andreev 2024-03-24 05:56:30 +04:00
parent 944a81a8bf
commit 0c61d4e433
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -141,8 +141,8 @@ unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const
const unsigned char *first = NULL, *second = NULL; const unsigned char *first = NULL, *second = NULL;
first = (is_client ? own_hello : remote_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+CRYPT_SIGN_LEN; second = (is_client ? remote_hello : own_hello) + CRYPT_PKEY_HEXLEN;
memcpy(nonce, first, CRYPT_NONCEHALF_LEN); memcpy(nonce, first, CRYPT_NONCEHALF_LEN);
memcpy(nonce+CRYPT_NONCEHALF_LEN, second, CRYPT_NONCEHALF_LEN); memcpy(nonce+CRYPT_NONCEHALF_LEN, second, CRYPT_NONCEHALF_LEN);