mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-12 06:07:54 +00:00
more pre-calculated x25519
This commit is contained in:
parent
a8e1cd9a13
commit
1285e30b3e
@ -196,7 +196,7 @@ namespace garlic
|
|||||||
i2p::transport::transports.ReuseX25519KeysPair (m_EphemeralKeys);
|
i2p::transport::transports.ReuseX25519KeysPair (m_EphemeralKeys);
|
||||||
}
|
}
|
||||||
// we still didn't find elligator eligible pair
|
// we still didn't find elligator eligible pair
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 25; i++)
|
||||||
{
|
{
|
||||||
// create new
|
// create new
|
||||||
m_EphemeralKeys = std::make_shared<i2p::crypto::X25519Keys>();
|
m_EphemeralKeys = std::make_shared<i2p::crypto::X25519Keys>();
|
||||||
|
@ -556,6 +556,7 @@ namespace garlic
|
|||||||
if (m_LastTagset && m_LastTagset->GetNextIndex () < 2*ECIESX25519_TAGSET_MAX_NUM_TAGS)
|
if (m_LastTagset && m_LastTagset->GetNextIndex () < 2*ECIESX25519_TAGSET_MAX_NUM_TAGS)
|
||||||
{
|
{
|
||||||
auto maxTags = std::max (m_NumRatchetInboundTags, ECIESX25519_MAX_NUM_GENERATED_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++)
|
for (int i = 0; i < maxTags; i++)
|
||||||
{
|
{
|
||||||
auto nextTag = AddECIESx25519SessionNextTag (m_LastTagset);
|
auto nextTag = AddECIESx25519SessionNextTag (m_LastTagset);
|
||||||
|
@ -137,7 +137,7 @@ namespace transport
|
|||||||
m_IsOnline (true), m_IsRunning (false), m_IsNAT (true), m_CheckReserved(true), m_Thread (nullptr),
|
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_Service (nullptr), m_Work (nullptr), m_PeerCleanupTimer (nullptr), m_PeerTestTimer (nullptr),
|
||||||
m_SSUServer (nullptr), m_NTCP2Server (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_TotalSentBytes(0), m_TotalReceivedBytes(0), m_TotalTransitTransmittedBytes (0),
|
||||||
m_InBandwidth (0), m_OutBandwidth (0), m_TransitBandwidth(0),
|
m_InBandwidth (0), m_OutBandwidth (0), m_TransitBandwidth(0),
|
||||||
m_LastInBandwidthUpdateBytes (0), m_LastOutBandwidthUpdateBytes (0),
|
m_LastInBandwidthUpdateBytes (0), m_LastOutBandwidthUpdateBytes (0),
|
||||||
|
Loading…
Reference in New Issue
Block a user