forked from rpms/openssl
c676ac32d5
add documentation of the PROFILE=SYSTEM special cipher string (#1420232)
132 lines
5.2 KiB
Diff
132 lines
5.2 KiB
Diff
diff -up openssl-1.1.0e/apps/speed.c.curves openssl-1.1.0e/apps/speed.c
|
|
--- openssl-1.1.0e/apps/speed.c.curves 2017-02-16 12:58:20.000000000 +0100
|
|
+++ openssl-1.1.0e/apps/speed.c 2017-02-16 15:46:22.271504354 +0100
|
|
@@ -536,42 +536,18 @@ static OPT_PAIR rsa_choices[] = {
|
|
#define R_EC_X25519 16
|
|
#ifndef OPENSSL_NO_EC
|
|
static OPT_PAIR ecdsa_choices[] = {
|
|
- {"ecdsap160", R_EC_P160},
|
|
- {"ecdsap192", R_EC_P192},
|
|
{"ecdsap224", R_EC_P224},
|
|
{"ecdsap256", R_EC_P256},
|
|
{"ecdsap384", R_EC_P384},
|
|
{"ecdsap521", R_EC_P521},
|
|
- {"ecdsak163", R_EC_K163},
|
|
- {"ecdsak233", R_EC_K233},
|
|
- {"ecdsak283", R_EC_K283},
|
|
- {"ecdsak409", R_EC_K409},
|
|
- {"ecdsak571", R_EC_K571},
|
|
- {"ecdsab163", R_EC_B163},
|
|
- {"ecdsab233", R_EC_B233},
|
|
- {"ecdsab283", R_EC_B283},
|
|
- {"ecdsab409", R_EC_B409},
|
|
- {"ecdsab571", R_EC_B571},
|
|
{NULL}
|
|
};
|
|
|
|
static OPT_PAIR ecdh_choices[] = {
|
|
- {"ecdhp160", R_EC_P160},
|
|
- {"ecdhp192", R_EC_P192},
|
|
{"ecdhp224", R_EC_P224},
|
|
{"ecdhp256", R_EC_P256},
|
|
{"ecdhp384", R_EC_P384},
|
|
{"ecdhp521", R_EC_P521},
|
|
- {"ecdhk163", R_EC_K163},
|
|
- {"ecdhk233", R_EC_K233},
|
|
- {"ecdhk283", R_EC_K283},
|
|
- {"ecdhk409", R_EC_K409},
|
|
- {"ecdhk571", R_EC_K571},
|
|
- {"ecdhb163", R_EC_B163},
|
|
- {"ecdhb233", R_EC_B233},
|
|
- {"ecdhb283", R_EC_B283},
|
|
- {"ecdhb409", R_EC_B409},
|
|
- {"ecdhb571", R_EC_B571},
|
|
{"ecdhx25519", R_EC_X25519},
|
|
{NULL}
|
|
};
|
|
diff -up openssl-1.1.0e/crypto/ec/ecp_smpl.c.curves openssl-1.1.0e/crypto/ec/ecp_smpl.c
|
|
--- openssl-1.1.0e/crypto/ec/ecp_smpl.c.curves 2017-02-16 12:58:21.000000000 +0100
|
|
+++ openssl-1.1.0e/crypto/ec/ecp_smpl.c 2017-02-16 15:46:22.264504188 +0100
|
|
@@ -144,6 +144,11 @@ int ec_GFp_simple_group_set_curve(EC_GRO
|
|
return 0;
|
|
}
|
|
|
|
+ if (BN_num_bits(p) < 224) {
|
|
+ ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE, EC_R_UNSUPPORTED_FIELD);
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
if (ctx == NULL) {
|
|
ctx = new_ctx = BN_CTX_new();
|
|
if (ctx == NULL)
|
|
diff -up openssl-1.1.0e/test/ecdhtest_cavs.h.curves openssl-1.1.0e/test/ecdhtest_cavs.h
|
|
--- openssl-1.1.0e/test/ecdhtest_cavs.h.curves 2017-02-16 15:46:22.237503550 +0100
|
|
+++ openssl-1.1.0e/test/ecdhtest_cavs.h 2017-02-16 16:08:16.091687111 +0100
|
|
@@ -29,6 +29,7 @@ typedef struct {
|
|
|
|
static const ecdh_cavs_kat_t ecdh_cavs_kats[] = {
|
|
/* curves over prime fields go here */
|
|
+#if 0
|
|
{ NID_X9_62_prime192v1,
|
|
"42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0",
|
|
"dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523",
|
|
@@ -204,6 +205,7 @@ static const ecdh_cavs_kat_t ecdh_cavs_k
|
|
"fcd345a976c720caaa97de6697226825615e1287a9eff67e",
|
|
"58ea42edbeeafca9ff44cfd7f29abd2cbde7626d79e422c9",
|
|
"72e88f3ea67d46d46dbf83926e7e2a6b85b54536741e6d2c" },
|
|
+#endif
|
|
{ NID_secp224r1,
|
|
"af33cd0629bc7e996320a3f40368f74de8704fa37b8fab69abaae280",
|
|
"882092ccbba7930f419a8a4f9bb16978bbc3838729992559a6f2e2d7",
|
|
diff -up openssl-1.1.0e/test/ecdhtest.c.curves openssl-1.1.0e/test/ecdhtest.c
|
|
--- openssl-1.1.0e/test/ecdhtest.c.curves 2017-02-16 12:58:24.000000000 +0100
|
|
+++ openssl-1.1.0e/test/ecdhtest.c 2017-02-16 16:07:30.412629758 +0100
|
|
@@ -252,10 +252,12 @@ typedef struct {
|
|
|
|
static const ecdh_kat_t ecdh_kats[] = {
|
|
/* Keys and shared secrets from RFC 5114 */
|
|
+#if 0
|
|
{ NID_X9_62_prime192v1,
|
|
"323FA3169D8E9C6593F59476BC142000AB5BE0E249C43426",
|
|
"631F95BB4A67632C9C476EEE9AB695AB240A0499307FCF62",
|
|
"AD420182633F8526BFE954ACDA376F05E5FF4F837F54FEBE" },
|
|
+#endif
|
|
{ NID_secp224r1,
|
|
"B558EB6C288DA707BBB4F8FBAE2AB9E9CB62E3BC5C7573E22E26D37F",
|
|
"AC3B1ADD3D9770E6F6A708EE9F3B8E0AB3B480E9F27F85C88B5E6D18",
|
|
@@ -303,6 +305,7 @@ static const ecdh_kat_t ecdh_kats[] = {
|
|
"01144C7D79AE6956BC8EDB8E7C787C4521CB086FA64407F97894E5E6B2D79B04"
|
|
"D1427E73CA4BAA240A34786859810C06B3C715A3A8CC3151F2BEE417996D19F3"
|
|
"DDEA" },
|
|
+#if 0
|
|
/* Keys and shared secrets from RFC 7027 */
|
|
{ NID_brainpoolP256r1,
|
|
"81DB1EE100150FF2EA338D708271BE38300CB54241D79950F77B063039804F1D",
|
|
@@ -322,6 +325,7 @@ static const ecdh_kat_t ecdh_kats[] = {
|
|
"ABBC19963DAB8E2F1EBA00BFFB29E4D72D13F2224562F405CB80503666B25429",
|
|
"A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76"
|
|
"D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F" }
|
|
+#endif
|
|
};
|
|
|
|
/* Given private value and NID, create EC_KEY structure */
|
|
diff -up openssl-1.1.0e/test/ecdsatest.c.curves openssl-1.1.0e/test/ecdsatest.c
|
|
--- openssl-1.1.0e/test/ecdsatest.c.curves 2017-02-16 12:58:24.000000000 +0100
|
|
+++ openssl-1.1.0e/test/ecdsatest.c 2017-02-16 15:46:22.250503857 +0100
|
|
@@ -216,6 +216,7 @@ int x9_62_tests(BIO *out)
|
|
if (!change_rand())
|
|
goto x962_err;
|
|
|
|
+#if 0
|
|
if (!x9_62_test_internal(out, NID_X9_62_prime192v1,
|
|
"3342403536405981729393488334694600415596881826869351677613",
|
|
"5735822328888155254683894997897571951568553642892029982342"))
|
|
@@ -226,6 +227,7 @@ int x9_62_tests(BIO *out)
|
|
"3238135532097973577080787768312505059318910517550078427819"
|
|
"78505179448783"))
|
|
goto x962_err;
|
|
+#endif
|
|
# ifndef OPENSSL_NO_EC2M
|
|
if (!x9_62_test_internal(out, NID_X9_62_c2tnb191v1,
|
|
"87194383164871543355722284926904419997237591535066528048",
|