From 4a6a0efcfd286bc0a2c19e91b2167c6b8dd8577f Mon Sep 17 00:00:00 2001 From: lizthedeveloper <915684+lizTheDeveloper@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:29:48 -0800 Subject: [PATCH] log the nonce value at DEBUG instead of INFO (#6001) you're leaking the nonce to stdout, if your logs are routed to a folder, this logs the nonce every time, leading to replay attack surface area being higher. Changed to debug. --- src/mesh/CryptoEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 1624ab0d5..4613a6218 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -74,7 +74,7 @@ bool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtas auth = bytesOut + numBytes; memcpy((uint8_t *)(auth + 8), &extraNonceTmp, sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp; - LOG_INFO("Random nonce value: %d", extraNonceTmp); + LOG_DEBUG("Random nonce value: %d", extraNonceTmp); if (remotePublic.size == 0) { LOG_DEBUG("Node %d or their public_key not found", toNode); return false;