Browse Source

more pre-calculated x25519

pull/1656/head
orignal 4 years ago
parent
commit
1285e30b3e
  1. 2
      libi2pd/ECIESX25519AEADRatchetSession.cpp
  2. 1
      libi2pd/Garlic.cpp
  3. 2
      libi2pd/Transports.cpp

2
libi2pd/ECIESX25519AEADRatchetSession.cpp

@ -196,7 +196,7 @@ namespace garlic @@ -196,7 +196,7 @@ namespace garlic
i2p::transport::transports.ReuseX25519KeysPair (m_EphemeralKeys);
}
// we still didn't find elligator eligible pair
for (int i = 0; i < 10; i++)
for (int i = 0; i < 25; i++)
{
// create new
m_EphemeralKeys = std::make_shared<i2p::crypto::X25519Keys>();

1
libi2pd/Garlic.cpp

@ -556,6 +556,7 @@ namespace garlic @@ -556,6 +556,7 @@ namespace garlic
if (m_LastTagset && m_LastTagset->GetNextIndex () < 2*ECIESX25519_TAGSET_MAX_NUM_TAGS)
{
auto maxTags = std::max (m_NumRatchetInboundTags, ECIESX25519_MAX_NUM_GENERATED_TAGS);
LogPrint (eLogWarning, "Garlic: trying to generate more ECIES-X25519-AEAD-Ratchet tags");
for (int i = 0; i < maxTags; i++)
{
auto nextTag = AddECIESx25519SessionNextTag (m_LastTagset);

2
libi2pd/Transports.cpp

@ -137,7 +137,7 @@ namespace transport @@ -137,7 +137,7 @@ namespace transport
m_IsOnline (true), m_IsRunning (false), m_IsNAT (true), m_CheckReserved(true), m_Thread (nullptr),
m_Service (nullptr), m_Work (nullptr), m_PeerCleanupTimer (nullptr), m_PeerTestTimer (nullptr),
m_SSUServer (nullptr), m_NTCP2Server (nullptr),
m_X25519KeysPairSupplier (5), // 5 pre-generated keys
m_X25519KeysPairSupplier (15), // 15 pre-generated keys
m_TotalSentBytes(0), m_TotalReceivedBytes(0), m_TotalTransitTransmittedBytes (0),
m_InBandwidth (0), m_OutBandwidth (0), m_TransitBandwidth(0),
m_LastInBandwidthUpdateBytes (0), m_LastOutBandwidthUpdateBytes (0),

Loading…
Cancel
Save