mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-04-25 19:42:30 +00:00
removed MLDSA44 support for now
This commit is contained in:
@@ -139,17 +139,6 @@ namespace data
|
||||
memcpy (m_StandardIdentity.signingKey, signingKey, i2p::crypto::GOSTR3410_512_PUBLIC_KEY_LENGTH);
|
||||
break;
|
||||
}
|
||||
#if OPENSSL_PQ
|
||||
case SIGNING_KEY_TYPE_MLDSA44:
|
||||
{
|
||||
memcpy (m_StandardIdentity, signingKey, 384);
|
||||
excessLen = i2p::crypto::MLDSA44_PUBLIC_KEY_LENGTH - 384;
|
||||
excessBuf = new uint8_t[excessLen];
|
||||
memcpy (excessBuf, signingKey + 384, excessLen);
|
||||
cryptoType = 0xFF; // crypto key is not used
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
LogPrint (eLogError, "Identity: Signing key type ", (int)type, " is not supported");
|
||||
}
|
||||
@@ -422,10 +411,6 @@ namespace data
|
||||
return new i2p::crypto::GOSTR3410_512_Verifier (i2p::crypto::eGOSTR3410TC26A512);
|
||||
case SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519:
|
||||
return new i2p::crypto::RedDSA25519Verifier ();
|
||||
#if OPENSSL_PQ
|
||||
case SIGNING_KEY_TYPE_MLDSA44:
|
||||
return new i2p::crypto::MLDSA44Verifier ();
|
||||
#endif
|
||||
case SIGNING_KEY_TYPE_RSA_SHA256_2048:
|
||||
case SIGNING_KEY_TYPE_RSA_SHA384_3072:
|
||||
case SIGNING_KEY_TYPE_RSA_SHA512_4096:
|
||||
@@ -711,11 +696,6 @@ namespace data
|
||||
case SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519:
|
||||
return new i2p::crypto::RedDSA25519Signer (priv);
|
||||
break;
|
||||
#if OPENSSL_PQ
|
||||
case SIGNING_KEY_TYPE_MLDSA44:
|
||||
return new i2p::crypto::MLDSA44Signer (priv);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
LogPrint (eLogError, "Identity: Signing key type ", (int)keyType, " is not supported");
|
||||
}
|
||||
@@ -825,11 +805,6 @@ namespace data
|
||||
case SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519:
|
||||
i2p::crypto::CreateRedDSA25519RandomKeys (priv, pub);
|
||||
break;
|
||||
#if OPENSSL_PQ
|
||||
case SIGNING_KEY_TYPE_MLDSA44:
|
||||
i2p::crypto::CreateMLDSA44RandomKeys (priv, pub);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
LogPrint (eLogWarning, "Identity: Signing key type ", (int)type, " is not supported. Create DSA-SHA1");
|
||||
i2p::crypto::CreateDSARandomKeys (priv, pub); // DSA-SHA1
|
||||
|
||||
@@ -88,7 +88,6 @@ namespace data
|
||||
const uint16_t SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256 = 9;
|
||||
const uint16_t SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512 = 10; // approved by FSB
|
||||
const uint16_t SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519 = 11; // for LeaseSet2 only
|
||||
const uint16_t SIGNING_KEY_TYPE_MLDSA44 = 12;
|
||||
|
||||
typedef uint16_t SigningKeyType;
|
||||
typedef uint16_t CryptoKeyType;
|
||||
|
||||
@@ -60,11 +60,8 @@ namespace data
|
||||
};
|
||||
|
||||
typedef std::function<bool(const Lease & l)> LeaseInspectFunc;
|
||||
#if OPENSSL_PQ
|
||||
const size_t MAX_LS_BUFFER_SIZE = 8192;
|
||||
#else
|
||||
|
||||
const size_t MAX_LS_BUFFER_SIZE = 4096;
|
||||
#endif
|
||||
const size_t LEASE_SIZE = 44; // 32 + 4 + 8
|
||||
const size_t LEASE2_SIZE = 40; // 32 + 4 + 4
|
||||
const uint8_t MAX_NUM_LEASES = 16;
|
||||
|
||||
@@ -52,11 +52,8 @@ namespace stream
|
||||
|
||||
const size_t STREAMING_MTU = 1730;
|
||||
const size_t STREAMING_MTU_RATCHETS = 1812;
|
||||
#if OPENSSL_PQ
|
||||
const size_t MAX_PACKET_SIZE = 8192;
|
||||
#else
|
||||
const size_t MAX_PACKET_SIZE = 4096;
|
||||
#endif
|
||||
const size_t MAX_PACKET_SIZE = 3072;
|
||||
|
||||
const size_t COMPRESSION_THRESHOLD_SIZE = 66;
|
||||
const int MAX_NUM_RESEND_ATTEMPTS = 10;
|
||||
const int INITIAL_WINDOW_SIZE = 10;
|
||||
|
||||
@@ -629,9 +629,7 @@ namespace client
|
||||
std::string address = section.second.get<std::string> (I2P_CLIENT_TUNNEL_ADDRESS, "127.0.0.1");
|
||||
uint16_t destinationPort = section.second.get<uint16_t> (I2P_CLIENT_TUNNEL_DESTINATION_PORT, 0);
|
||||
i2p::data::SigningKeyType sigType = section.second.get (I2P_CLIENT_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519);
|
||||
#if !OPENSSL_PQ
|
||||
if (sigType >= i2p::data::SIGNING_KEY_TYPE_MLDSA44) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
#endif
|
||||
if (sigType > i2p::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
i2p::data::CryptoKeyType cryptoType = section.second.get (I2P_CLIENT_TUNNEL_CRYPTO_TYPE, i2p::data::CRYPTO_KEY_TYPE_ELGAMAL);
|
||||
// I2CP
|
||||
i2p::util::Mapping options;
|
||||
@@ -796,9 +794,7 @@ namespace client
|
||||
accessList = section.second.get<std::string> (I2P_SERVER_TUNNEL_WHITE_LIST, "");
|
||||
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, false);
|
||||
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519);
|
||||
#if !OPENSSL_PQ
|
||||
if (sigType >= i2p::data::SIGNING_KEY_TYPE_MLDSA44) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
#endif
|
||||
if (sigType > i2p::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
i2p::data::CryptoKeyType cryptoType = section.second.get (I2P_CLIENT_TUNNEL_CRYPTO_TYPE, i2p::data::CRYPTO_KEY_TYPE_ELGAMAL);
|
||||
|
||||
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "");
|
||||
@@ -964,9 +960,7 @@ namespace client
|
||||
if (httpAddresshelper)
|
||||
i2p::config::GetOption("addressbook.enabled", httpAddresshelper); // addresshelper is not supported without address book
|
||||
i2p::data::SigningKeyType sigType; i2p::config::GetOption("httpproxy.signaturetype", sigType);
|
||||
#if !OPENSSL_PQ
|
||||
if (sigType >= i2p::data::SIGNING_KEY_TYPE_MLDSA44) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
#endif
|
||||
if (sigType > i2p::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
LogPrint(eLogInfo, "Clients: Starting HTTP Proxy at ", httpProxyAddr, ":", httpProxyPort);
|
||||
if (httpProxyKeys == "shareddest")
|
||||
{
|
||||
@@ -1016,9 +1010,7 @@ namespace client
|
||||
std::string socksOutProxyAddr; i2p::config::GetOption("socksproxy.outproxy", socksOutProxyAddr);
|
||||
uint16_t socksOutProxyPort; i2p::config::GetOption("socksproxy.outproxyport", socksOutProxyPort);
|
||||
i2p::data::SigningKeyType sigType; i2p::config::GetOption("socksproxy.signaturetype", sigType);
|
||||
#if !OPENSSL_PQ
|
||||
if (sigType >= i2p::data::SIGNING_KEY_TYPE_MLDSA44) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
#endif
|
||||
if (sigType > i2p::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
|
||||
LogPrint(eLogInfo, "Clients: Starting SOCKS Proxy at ", socksProxyAddr, ":", socksProxyPort);
|
||||
if (socksProxyKeys == "shareddest")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user