Browse Source

changed to 320 tags max

pull/1610/head
orignal 4 years ago
parent
commit
d34dc397e8
  1. 2
      libi2pd/ECIESX25519AEADRatchetSession.h
  2. 2
      libi2pd/Garlic.cpp

2
libi2pd/ECIESX25519AEADRatchetSession.h

@ -33,7 +33,7 @@ namespace garlic @@ -33,7 +33,7 @@ namespace garlic
const int ECIESX25519_PREVIOUS_TAGSET_EXPIRATION_TIMEOUT = 180; // 180
const int ECIESX25519_TAGSET_MAX_NUM_TAGS = 8192; // number of tags we request new tagset after
const int ECIESX25519_MIN_NUM_GENERATED_TAGS = 24;
const int ECIESX25519_MAX_NUM_GENERATED_TAGS = 160;
const int ECIESX25519_MAX_NUM_GENERATED_TAGS = 320;
const int ECIESX25519_NSR_NUM_GENERATED_TAGS = 12;
const size_t ECIESX25519_OPTIMAL_PAYLOAD_SIZE = 1912; // 1912 = 1956 /* to fit 2 tunnel messages */

2
libi2pd/Garlic.cpp

@ -551,9 +551,9 @@ namespace garlic @@ -551,9 +551,9 @@ namespace garlic
auto maxTags = std::max (m_NumRatchetInboundTags, ECIESX25519_MAX_NUM_GENERATED_TAGS);
for (int i = 0; i < maxTags; i++)
{
LogPrint (eLogDebug, "Garlic: Missing ECIES-X25519-AEAD-Ratchet tag was generated");
if (AddECIESx25519SessionNextTag (m_LastTagset) == tag)
{
LogPrint (eLogDebug, "Garlic: Missing ECIES-X25519-AEAD-Ratchet tag was generated");
if (m_LastTagset->HandleNextMessage (buf, length, m_ECIESx25519Tags[tag].index))
found = true;
break;

Loading…
Cancel
Save