mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
ECIES for new routers
This commit is contained in:
parent
bf91e16b5d
commit
06a7e181cd
@ -52,7 +52,8 @@ namespace i2p
|
|||||||
|
|
||||||
void RouterContext::CreateNewRouter ()
|
void RouterContext::CreateNewRouter ()
|
||||||
{
|
{
|
||||||
m_Keys = i2p::data::PrivateKeys::CreateRandomKeys (i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519);
|
m_Keys = i2p::data::PrivateKeys::CreateRandomKeys (i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519,
|
||||||
|
i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD);
|
||||||
SaveKeys ();
|
SaveKeys ();
|
||||||
NewRouterInfo ();
|
NewRouterInfo ();
|
||||||
}
|
}
|
||||||
@ -590,7 +591,8 @@ namespace i2p
|
|||||||
// update keys
|
// update keys
|
||||||
LogPrint (eLogInfo, "Router: router keys are obsolete. Creating new");
|
LogPrint (eLogInfo, "Router: router keys are obsolete. Creating new");
|
||||||
oldIdentity = m_Keys.GetPublic ();
|
oldIdentity = m_Keys.GetPublic ();
|
||||||
m_Keys = i2p::data::PrivateKeys::CreateRandomKeys (i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519);
|
m_Keys = i2p::data::PrivateKeys::CreateRandomKeys (i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519,
|
||||||
|
i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD);
|
||||||
SaveKeys ();
|
SaveKeys ();
|
||||||
}
|
}
|
||||||
// read NTCP2 keys if available
|
// read NTCP2 keys if available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user