From c44b82faaf309c916a1aecf4ec939510e6384ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 25 Aug 2023 21:36:59 +0200 Subject: Switch to ChaCha20-Poly1305 AEAD scheme --- src/network/channel.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/network/channel.h') diff --git a/src/network/channel.h b/src/network/channel.h index 98bfd29..bba11b3 100644 --- a/src/network/channel.h +++ b/src/network/channel.h @@ -44,8 +44,8 @@ public: vector && key, bool ourRequest): peers(peers), key(std::move(key)), - nonceFixedOur({ uint8_t(ourRequest ? 1 : 2), 0, 0, 0, 0, 0 }), - nonceFixedPeer({ uint8_t(ourRequest ? 2 : 1), 0, 0, 0, 0, 0 }) + nonceFixedOur({ uint8_t(ourRequest ? 1 : 2), 0, 0, 0 }), + nonceFixedPeer({ uint8_t(ourRequest ? 2 : 1), 0, 0, 0 }) {} Channel(const Channel &) = delete; @@ -69,9 +69,10 @@ private: const vector>> peers; const vector key; - const array nonceFixedOur; - const array nonceFixedPeer; - atomic nonceCounter = 0; + const array nonceFixedOur; + const array nonceFixedPeer; + atomic counterNextOut = 0; + atomic counterNextIn = 0; }; } -- cgit v1.2.3