mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-17 21:01:48 +02:00
MLKEM512_X25519 crypto key added
This commit is contained in:
parent
46f530bfcd
commit
9ce515ff79
4 changed files with 13 additions and 16 deletions
libi2pd
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue