mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-04-05 05:25:53 +00:00
MLKEM512_X25519 crypto key added
This commit is contained in:
@@ -174,17 +174,12 @@ namespace crypto
|
||||
return m_StaticKeys.Agree (epub, sharedSecret);
|
||||
}
|
||||
|
||||
bool CreateECIESX25519AEADRatchetRandomKeys (uint8_t * priv, uint8_t * pub, i2p::data::CryptoKeyType type)
|
||||
void CreateECIESX25519AEADRatchetRandomKeys (uint8_t * priv, uint8_t * pub)
|
||||
{
|
||||
if (type == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD)
|
||||
{
|
||||
X25519Keys k;
|
||||
k.GenerateKeys ();
|
||||
k.GetPrivateKey (priv);
|
||||
memcpy (pub, k.GetPublicKey (), 32);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
X25519Keys k;
|
||||
k.GenerateKeys ();
|
||||
k.GetPrivateKey (priv);
|
||||
memcpy (pub, k.GetPublicKey (), 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user