From: tb Date: Mon, 1 May 2023 07:58:34 +0000 (+0000) Subject: Remove pointless/wrong .meth = 0 entries from curves_list[] X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2902c062fd243fbf689a6f432da7cdeee716f2d4;p=openbsd Remove pointless/wrong .meth = 0 entries from curves_list[] --- diff --git a/lib/libcrypto/ec/ec_curve.c b/lib/libcrypto/ec/ec_curve.c index 1af7db55a83..a55b90a11bc 100644 --- a/lib/libcrypto/ec/ec_curve.c +++ b/lib/libcrypto/ec/ec_curve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_curve.c,v 1.29 2023/05/01 07:56:05 tb Exp $ */ +/* $OpenBSD: ec_curve.c,v 1.30 2023/05/01 07:58:34 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -1829,246 +1829,206 @@ static const ec_list_element curve_list[] = { { .nid = NID_secp112r1, .data = &_EC_SECG_PRIME_112R1.h, - .meth = 0, .comment = "SECG/WTLS curve over a 112 bit prime field", }, { .nid = NID_secp112r2, .data = &_EC_SECG_PRIME_112R2.h, - .meth = 0, .comment = "SECG curve over a 112 bit prime field", }, { .nid = NID_secp128r1, .data = &_EC_SECG_PRIME_128R1.h, - .meth = 0, .comment = "SECG curve over a 128 bit prime field", }, { .nid = NID_secp128r2, .data = &_EC_SECG_PRIME_128R2.h, - .meth = 0, .comment = "SECG curve over a 128 bit prime field", }, { .nid = NID_secp160k1, .data = &_EC_SECG_PRIME_160K1.h, - .meth = 0, .comment = "SECG curve over a 160 bit prime field", }, { .nid = NID_secp160r1, .data = &_EC_SECG_PRIME_160R1.h, - .meth = 0, .comment = "SECG curve over a 160 bit prime field", }, { .nid = NID_secp160r2, .data = &_EC_SECG_PRIME_160R2.h, - .meth = 0, .comment = "SECG/WTLS curve over a 160 bit prime field", }, /* SECG secp192r1 is the same as X9.62 prime192v1 and hence omitted */ { .nid = NID_secp192k1, .data = &_EC_SECG_PRIME_192K1.h, - .meth = 0, .comment = "SECG curve over a 192 bit prime field", }, { .nid = NID_secp224k1, .data = &_EC_SECG_PRIME_224K1.h, - .meth = 0, .comment = "SECG curve over a 224 bit prime field", }, { .nid = NID_secp224r1, .data = &_EC_NIST_PRIME_224.h, - .meth = 0, .comment = "NIST/SECG curve over a 224 bit prime field", }, { .nid = NID_secp256k1, .data = &_EC_SECG_PRIME_256K1.h, - .meth = 0, .comment = "SECG curve over a 256 bit prime field", }, /* SECG secp256r1 is the same as X9.62 prime256v1 and hence omitted */ { .nid = NID_secp384r1, .data = &_EC_NIST_PRIME_384.h, - .meth = 0, .comment = "NIST/SECG curve over a 384 bit prime field", }, { .nid = NID_secp521r1, .data = &_EC_NIST_PRIME_521.h, - .meth = 0, .comment = "NIST/SECG curve over a 521 bit prime field", }, /* X9.62 curves */ { .nid = NID_X9_62_prime192v1, .data = &_EC_NIST_PRIME_192.h, - .meth = 0, .comment = "NIST/X9.62/SECG curve over a 192 bit prime field", }, { .nid = NID_X9_62_prime192v2, .data = &_EC_X9_62_PRIME_192V2.h, - .meth = 0, .comment = "X9.62 curve over a 192 bit prime field", }, { .nid = NID_X9_62_prime192v3, .data = &_EC_X9_62_PRIME_192V3.h, - .meth = 0, .comment = "X9.62 curve over a 192 bit prime field", }, { .nid = NID_X9_62_prime239v1, .data = &_EC_X9_62_PRIME_239V1.h, - .meth = 0, .comment = "X9.62 curve over a 239 bit prime field", }, { .nid = NID_X9_62_prime239v2, .data = &_EC_X9_62_PRIME_239V2.h, - .meth = 0, .comment = "X9.62 curve over a 239 bit prime field", }, { .nid = NID_X9_62_prime239v3, .data = &_EC_X9_62_PRIME_239V3.h, - .meth = 0, .comment = "X9.62 curve over a 239 bit prime field", }, { .nid = NID_X9_62_prime256v1, .data = &_EC_X9_62_PRIME_256V1.h, - .meth = 0, .comment = "X9.62/SECG curve over a 256 bit prime field", }, { .nid = NID_wap_wsg_idm_ecid_wtls6, .data = &_EC_SECG_PRIME_112R1.h, - .meth = 0, .comment = "SECG/WTLS curve over a 112 bit prime field", }, { .nid = NID_wap_wsg_idm_ecid_wtls7, .data = &_EC_SECG_PRIME_160R2.h, - .meth = 0, .comment = "SECG/WTLS curve over a 160 bit prime field", }, { .nid = NID_wap_wsg_idm_ecid_wtls8, .data = &_EC_WTLS_8.h, - .meth = 0, .comment = "WTLS curve over a 112 bit prime field", }, { .nid = NID_wap_wsg_idm_ecid_wtls9, .data = &_EC_WTLS_9.h, - .meth = 0, .comment = "WTLS curve over a 160 bit prime field", }, { .nid = NID_wap_wsg_idm_ecid_wtls12, .data = &_EC_WTLS_12.h, - .meth = 0, .comment = "WTLS curve over a 224 bit prime field", }, /* RFC 5639 curves */ { .nid = NID_brainpoolP160r1, .data = &_EC_brainpoolP160r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 160 bit prime field", }, { .nid = NID_brainpoolP160t1, .data = &_EC_brainpoolP160t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 160 bit prime field", }, { .nid = NID_brainpoolP192r1, .data = &_EC_brainpoolP192r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 192 bit prime field", }, { .nid = NID_brainpoolP192t1, .data = &_EC_brainpoolP192t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 192 bit prime field", }, { .nid = NID_brainpoolP224r1, .data = &_EC_brainpoolP224r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 224 bit prime field", }, { .nid = NID_brainpoolP224t1, .data = &_EC_brainpoolP224t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 224 bit prime field", }, { .nid = NID_brainpoolP256r1, .data = &_EC_brainpoolP256r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 256 bit prime field", }, { .nid = NID_brainpoolP256t1, .data = &_EC_brainpoolP256t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 256 bit prime field", }, { .nid = NID_brainpoolP320r1, .data = &_EC_brainpoolP320r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 320 bit prime field", }, { .nid = NID_brainpoolP320t1, .data = &_EC_brainpoolP320t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 320 bit prime field", }, { .nid = NID_brainpoolP384r1, .data = &_EC_brainpoolP384r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 384 bit prime field", }, { .nid = NID_brainpoolP384t1, .data = &_EC_brainpoolP384t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 384 bit prime field", }, { .nid = NID_brainpoolP512r1, .data = &_EC_brainpoolP512r1.h, - .meth = 0, .comment = "RFC 5639 curve over a 512 bit prime field", }, { .nid = NID_brainpoolP512t1, .data = &_EC_brainpoolP512t1.h, - .meth = 0, .comment = "RFC 5639 curve over a 512 bit prime field", }, /* ANSSI */ { .nid = NID_FRP256v1, .data = &_EC_FRP256v1.h, - .meth = 0, .comment = "FRP256v1", }, #ifndef OPENSSL_NO_GOST @@ -2076,85 +2036,71 @@ static const ec_list_element curve_list[] = { { .nid = NID_id_GostR3410_2001_TestParamSet, .data = &_EC_GOST_2001_Test.h, - .meth = 0, .comment = "GOST R 34.10-2001 Test Curve", }, { .nid = NID_id_GostR3410_2001_CryptoPro_A_ParamSet, .data = &_EC_GOST_2001_CryptoPro_A.h, - .meth = 0, .comment = "GOST R 34.10-2001 CryptoPro-A", }, { .nid = NID_id_GostR3410_2001_CryptoPro_B_ParamSet, .data = &_EC_GOST_2001_CryptoPro_B.h, - .meth = 0, .comment = "GOST R 34.10-2001 CryptoPro-B", }, { .nid = NID_id_GostR3410_2001_CryptoPro_C_ParamSet, .data = &_EC_GOST_2001_CryptoPro_C.h, - .meth = 0, .comment = "GOST R 34.10-2001 CryptoPro-C", }, { .nid = NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet, .data = &_EC_GOST_2001_CryptoPro_A.h, - .meth = 0, .comment = "GOST R 34.10-2001 CryptoPro-XchA", }, { .nid = NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet, .data = &_EC_GOST_2001_CryptoPro_C.h, - .meth = 0, .comment = "GOST R 34.10-2001 CryptoPro-XchB", }, { .nid = NID_id_tc26_gost_3410_12_256_paramSetA, .data = &_EC_GOST_2012_256_TC26_A.h, - .meth = 0, .comment = "GOST R 34.10-2012 256 TC26-A", }, { .nid = NID_id_tc26_gost_3410_12_256_paramSetB, .data = &_EC_GOST_2001_CryptoPro_A.h, - .meth = 0, .comment = "GOST R 34.10-2012 256 TC26-B", }, { .nid = NID_id_tc26_gost_3410_12_256_paramSetC, .data = &_EC_GOST_2001_CryptoPro_B.h, - .meth = 0, .comment = "GOST R 34.10-2012 256 TC26-C", }, { .nid = NID_id_tc26_gost_3410_12_256_paramSetD, .data = &_EC_GOST_2001_CryptoPro_C.h, - .meth = 0, .comment = "GOST R 34.10-2012 256 TC26-D", }, { .nid = NID_id_tc26_gost_3410_12_512_paramSetTest, .data = &_EC_GOST_2012_512_Test.h, - .meth = 0, .comment = "GOST R 34.10-2012 512 Test Curve", }, { .nid = NID_id_tc26_gost_3410_12_512_paramSetA, .data = &_EC_GOST_2012_512_TC26_A.h, - .meth = 0, .comment = "GOST R 34.10-2012 512 TC26-A", }, { .nid = NID_id_tc26_gost_3410_12_512_paramSetB, .data = &_EC_GOST_2012_512_TC26_B.h, - .meth = 0, .comment = "GOST R 34.10-2012 512 TC26-B", }, { .nid = NID_id_tc26_gost_3410_12_512_paramSetC, .data = &_EC_GOST_2012_512_TC26_C.h, - .meth = 0, .comment = "GOST R 34.10-2012 512 TC26-C", }, #endif