ntru: Remove legacy NTRU key exchange method

This commit is contained in:
Andreas Steffen
2024-11-22 14:05:36 +01:00
committed by Tobias Brunner
parent 8e3a373e18
commit 1265d78cac
52 changed files with 18 additions and 5062 deletions
+2 -16
View File
@@ -56,12 +56,7 @@ ENUM_NEXT(key_exchange_method_names, MODP_1024_160, ML_KEM_1024, ECP_521_BIT,
"ML_KEM_1024");
ENUM_NEXT(key_exchange_method_names, MODP_NULL, MODP_NULL, ML_KEM_1024,
"MODP_NULL");
ENUM_NEXT(key_exchange_method_names, NTRU_112_BIT, NTRU_256_BIT, MODP_NULL,
"NTRU_112",
"NTRU_128",
"NTRU_192",
"NTRU_256");
ENUM_NEXT(key_exchange_method_names, MODP_CUSTOM, MODP_CUSTOM, NTRU_256_BIT,
ENUM_NEXT(key_exchange_method_names, MODP_CUSTOM, MODP_CUSTOM, MODP_NULL,
"MODP_CUSTOM");
ENUM_END(key_exchange_method_names, MODP_CUSTOM);
@@ -99,12 +94,7 @@ ENUM_NEXT(key_exchange_method_names_short, MODP_1024_160, ML_KEM_1024, ECP_521_B
"mlkem1024");
ENUM_NEXT(key_exchange_method_names_short, MODP_NULL, MODP_NULL, ML_KEM_1024,
"modpnull");
ENUM_NEXT(key_exchange_method_names_short, NTRU_112_BIT, NTRU_256_BIT, MODP_NULL,
"ntru112",
"ntru128",
"ntru192",
"ntru256");
ENUM_NEXT(key_exchange_method_names_short, MODP_CUSTOM, MODP_CUSTOM, NTRU_256_BIT,
ENUM_NEXT(key_exchange_method_names_short, MODP_CUSTOM, MODP_CUSTOM, MODP_NULL,
"modpcustom");
ENUM_END(key_exchange_method_names_short, MODP_CUSTOM);
@@ -701,10 +691,6 @@ bool key_exchange_verify_pubkey(key_exchange_method_t ke, chunk_t value)
case GOST3410_512:
valid = value.len == 128;
break;
case NTRU_112_BIT:
case NTRU_128_BIT:
case NTRU_192_BIT:
case NTRU_256_BIT:
case ML_KEM_512:
case ML_KEM_768:
case ML_KEM_1024:
-5
View File
@@ -75,11 +75,6 @@ enum key_exchange_method_t {
ML_KEM_1024 = 37,
/** insecure NULL diffie hellman group for testing, in PRIVATE USE */
MODP_NULL = 1024,
/** Parameters defined by IEEE 1363.1, in PRIVATE USE */
NTRU_112_BIT = 1030,
NTRU_128_BIT = 1031,
NTRU_192_BIT = 1032,
NTRU_256_BIT = 1033,
/** MODP group with custom generator/prime */
/** internally used DH group with additional parameters g and p, outside
* of PRIVATE USE (i.e. IKEv2 DH group range) so it can't be negotiated */
+1 -5
View File
@@ -1215,7 +1215,7 @@ static bool proposal_add_supported_ike(private_proposal_t *this, bool aead)
}
enumerator->destroy(enumerator);
/* Round 1 adds ECC and NTRU algorithms with at least 128 bit security strength */
/* Round 1 adds ECC with at least 128 bit security strength */
enumerator = lib->crypto->create_ke_enumerator(lib->crypto);
while (enumerator->enumerate(enumerator, &group, &plugin_name))
{
@@ -1229,9 +1229,6 @@ static bool proposal_add_supported_ike(private_proposal_t *this, bool aead)
case ECP_512_BP:
case CURVE_25519:
case CURVE_448:
case NTRU_128_BIT:
case NTRU_192_BIT:
case NTRU_256_BIT:
add_algorithm(this, KEY_EXCHANGE_METHOD, group, 0);
break;
default:
@@ -1280,7 +1277,6 @@ static bool proposal_add_supported_ike(private_proposal_t *this, bool aead)
case ECP_224_BIT:
case ECP_224_BP:
case ECP_192_BIT:
case NTRU_112_BIT:
/* rarely used */
break;
case MODP_2048_BIT:
@@ -181,9 +181,5 @@ gost512, KEY_EXCHANGE_METHOD, GOST3410_512, 0
mlkem512, KEY_EXCHANGE_METHOD, ML_KEM_512, 0
mlkem768, KEY_EXCHANGE_METHOD, ML_KEM_768, 0
mlkem1024, KEY_EXCHANGE_METHOD, ML_KEM_1024, 0
ntru112, KEY_EXCHANGE_METHOD, NTRU_112_BIT, 0
ntru128, KEY_EXCHANGE_METHOD, NTRU_128_BIT, 0
ntru192, KEY_EXCHANGE_METHOD, NTRU_192_BIT, 0
ntru256, KEY_EXCHANGE_METHOD, NTRU_256_BIT, 0
noesn, EXTENDED_SEQUENCE_NUMBERS, NO_EXT_SEQ_NUMBERS, 0
esn, EXTENDED_SEQUENCE_NUMBERS, EXT_SEQ_NUMBERS, 0