diff --git a/src/Encryption.hpp b/src/Encryption.hpp index 1a91a658..a3c615c8 100644 --- a/src/Encryption.hpp +++ b/src/Encryption.hpp @@ -32,6 +32,7 @@ static constexpr auto ENCRYPTION_ADDITIONAL_VALIDATION_DATA=crypto_aead_chacha20 static std::array create_onetimeauth_subkey(const uint64_t nonce,const std::array session_key){ // sub-key for this packet std::array subkey{}; + // We only have an 8 byte nonce, this should be enough entropy std::array nonce_buf{0}; memcpy(nonce_buf.data(),(uint8_t*)&nonce,8); crypto_core_hchacha20(subkey.data(),nonce_buf.data(),session_key.data(), nullptr);