Skip to content

Commit

Permalink
[crypto] Fix message counter init to be 28-bit random. (#19012)
Browse files Browse the repository at this point in the history
  • Loading branch information
turon authored and pull[bot] committed Jun 24, 2023
1 parent e2c0668 commit 1500200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transport/MessageCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class GlobalUnencryptedMessageCounter : public MessageCounter
class LocalSessionMessageCounter : public MessageCounter
{
public:
static constexpr uint32_t kInitialSyncValue = 0; ///< Used for initializing peer counter
static constexpr uint32_t kMessageCounterRandomInitMask = 0x0FFFFFF; ///< 28-bit mask
static constexpr uint32_t kInitialSyncValue = 0; ///< Used for initializing peer counter
static constexpr uint32_t kMessageCounterRandomInitMask = 0x0FFFFFFF; ///< 28-bit mask

/**
* Initialize a local message counter with random value between [1, 2^28]. This increases the difficulty of traffic analysis
Expand Down

0 comments on commit 1500200

Please sign in to comment.