mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-28 21:50:35 +00:00
Pass#2: Lots more savings in logs and string reduction surgery (#5251)
* Pass#2: Lots more savings in logs and string reduction surgery * Don't need Thread suffix either * Warn
This commit is contained in:
@@ -80,8 +80,8 @@ bool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtas
|
||||
initNonce(fromNode, packetNum, extraNonceTmp);
|
||||
|
||||
// Calculate the shared secret with the destination node and encrypt
|
||||
printBytes("Attempting encrypt using nonce: ", nonce, 13);
|
||||
printBytes("Attempting encrypt using shared_key starting with: ", shared_key, 8);
|
||||
printBytes("Attempt encrypt using nonce: ", nonce, 13);
|
||||
printBytes("Attempt encrypt using shared_key starting with: ", shared_key, 8);
|
||||
aes_ccm_ae(shared_key, 32, nonce, 8, bytes, numBytes, nullptr, 0, bytesOut,
|
||||
auth); // this can write up to 15 bytes longer than numbytes past bytesOut
|
||||
memcpy((uint8_t *)(auth + 8), &extraNonceTmp,
|
||||
@@ -117,8 +117,8 @@ bool CryptoEngine::decryptCurve25519(uint32_t fromNode, meshtastic_UserLite_publ
|
||||
crypto->hash(shared_key, 32);
|
||||
|
||||
initNonce(fromNode, packetNum, extraNonce);
|
||||
printBytes("Attempting decrypt using nonce: ", nonce, 13);
|
||||
printBytes("Attempting decrypt using shared_key starting with: ", shared_key, 8);
|
||||
printBytes("Attempt decrypt using nonce: ", nonce, 13);
|
||||
printBytes("Attempt decrypt using shared_key starting with: ", shared_key, 8);
|
||||
return aes_ccm_ad(shared_key, 32, nonce, 8, bytes, numBytes - 12, nullptr, 0, auth, bytesOut);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ concurrency::Lock *cryptLock;
|
||||
|
||||
void CryptoEngine::setKey(const CryptoKey &k)
|
||||
{
|
||||
LOG_DEBUG("Using AES%d key!", k.length * 8);
|
||||
LOG_DEBUG("Use AES%d key!", k.length * 8);
|
||||
key = k;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user