mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-12-05 02:44:36 +00:00
MLKEM512_X25519 crypto key added
This commit is contained in:
1 parent
46f530bfcd
commit
9ce515ff79
4 files changed
+13
-16
No files matched your search
+5
-10
@@ -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