MLKEM512_X25519 crypto key added

This commit is contained in:
orignal committed 2025-03-19 08:40:10 -04:00
1 parent 46f530bfcd
commit 9ce515ff79
4 files changed
+13 -16

No files matched your search

+5 -10
View File
@@ -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);
}
}
}