MLKEM512_X25519 crypto key added

This commit is contained in:
orignal
2025-03-19 08:40:10 -04:00
parent 46f530bfcd
commit 9ce515ff79
4 changed files with 13 additions and 16 deletions
+4 -4
View File
@@ -1520,14 +1520,14 @@ namespace client
bool ClientDestination::SupportsEncryptionType (i2p::data::CryptoKeyType keyType) const
{
return keyType == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD ? (bool)m_ECIESx25519EncryptionKey : (bool)m_StandardEncryptionKey;
return keyType == i2p::data::CRYPTO_KEY_TYPE_ELGAMAL ? (bool)m_StandardEncryptionKey : (bool)m_ECIESx25519EncryptionKey;
}
const uint8_t * ClientDestination::GetEncryptionPublicKey (i2p::data::CryptoKeyType keyType) const
{
if (keyType == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD)
return m_ECIESx25519EncryptionKey ? m_ECIESx25519EncryptionKey->pub.data () : nullptr;
return m_StandardEncryptionKey ? m_StandardEncryptionKey->pub.data () : nullptr;
if (keyType == i2p::data::CRYPTO_KEY_TYPE_ELGAMAL)
return m_StandardEncryptionKey ? m_StandardEncryptionKey->pub.data () : nullptr;
return m_ECIESx25519EncryptionKey ? m_ECIESx25519EncryptionKey->pub.data () : nullptr;
}
void ClientDestination::ReadAuthKey (const std::string& group, const std::map<std::string, std::string> * params)