From 4118e1c0f6f41e9fda52f9eb6a84514af8bbf2ed Mon Sep 17 00:00:00 2001 From: "Jason B. Cox" Date: Mon, 10 Nov 2025 18:19:15 -0800 Subject: [PATCH] Cleanup unnecessary global dereferencing in CryptoEngine (#8611) Co-authored-by: Ben Meadors --- src/mesh/CryptoEngine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 82d0a9f57..9ca16878d 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -92,10 +92,10 @@ bool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtas LOG_DEBUG("Node %d or their public_key not found", toNode); return false; } - if (!crypto->setDHPublicKey(remotePublic.bytes)) { + if (!setDHPublicKey(remotePublic.bytes)) { return false; } - crypto->hash(shared_key, 32); + hash(shared_key, 32); initNonce(fromNode, packetNum, extraNonceTmp); // Calculate the shared secret with the destination node and encrypt @@ -134,10 +134,10 @@ bool CryptoEngine::decryptCurve25519(uint32_t fromNode, meshtastic_UserLite_publ } // Calculate the shared secret with the sending node and decrypt - if (!crypto->setDHPublicKey(remotePublic.bytes)) { + if (!setDHPublicKey(remotePublic.bytes)) { return false; } - crypto->hash(shared_key, 32); + hash(shared_key, 32); initNonce(fromNode, packetNum, extraNonce); printBytes("Attempt decrypt with nonce: ", nonce, 13);