From 920ec606f246e9f7e06730726082c50176ab5e8a Mon Sep 17 00:00:00 2001 From: Tobias Buchberger Date: Tue, 11 Jun 2024 16:40:17 +0200 Subject: [PATCH] fix: fixed terminating null character, noiseIK test vectors still verify correctly. --- toxcore/crypto_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toxcore/crypto_core.c b/toxcore/crypto_core.c index 5d0822adfe..b2bf29eb83 100644 --- a/toxcore/crypto_core.c +++ b/toxcore/crypto_core.c @@ -632,7 +632,8 @@ int32_t decrypt_data_symmetric_xaead(const uint8_t shared_key[CRYPTO_SHARED_KEY_ // } // #define NOISE_PROTOCOL_NAME "Noise_IK_25519_ChaChaPoly_SHA512" -static const uint8_t noise_protocol[32] = "Noise_IK_25519_ChaChaPoly_SHA512"; +/* Actually only 32 bytes necessary, but test vectors still verify with 33 bytes */ +static const uint8_t noise_protocol[33] = "Noise_IK_25519_ChaChaPoly_SHA512"; /** * cf. Noise sections 4.3 and 5.1