2017-01-26 15:24:24 +00:00
|
|
|
diff -up openssl-1.1.0d/apps/speed.c.curves openssl-1.1.0d/apps/speed.c
|
|
|
|
--- openssl-1.1.0d/apps/speed.c.curves 2017-01-26 14:10:21.000000000 +0100
|
|
|
|
+++ openssl-1.1.0d/apps/speed.c 2017-01-26 15:53:33.913324153 +0100
|
2016-11-22 09:39:55 +00:00
|
|
|
@@ -536,42 +536,18 @@ static OPT_PAIR rsa_choices[] = {
|
2016-10-11 08:31:54 +00:00
|
|
|
#define R_EC_X25519 16
|
|
|
|
#ifndef OPENSSL_NO_EC
|
|
|
|
static OPT_PAIR ecdsa_choices[] = {
|
|
|
|
- {"ecdsap160", R_EC_P160},
|
|
|
|
- {"ecdsap192", R_EC_P192},
|
2016-11-22 09:39:55 +00:00
|
|
|
{"ecdsap224", R_EC_P224},
|
2016-10-11 08:31:54 +00:00
|
|
|
{"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},
|
2016-11-22 09:39:55 +00:00
|
|
|
{"ecdhp224", R_EC_P224},
|
2016-10-11 08:31:54 +00:00
|
|
|
{"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}
|
|
|
|
};
|
2017-01-26 15:24:24 +00:00
|
|
|
diff -up openssl-1.1.0d/crypto/ec/ecp_smpl.c.curves openssl-1.1.0d/crypto/ec/ecp_smpl.c
|
|
|
|
--- openssl-1.1.0d/crypto/ec/ecp_smpl.c.curves 2017-01-26 14:10:22.000000000 +0100
|
|
|
|
+++ openssl-1.1.0d/crypto/ec/ecp_smpl.c 2017-01-26 15:53:33.913324153 +0100
|
2016-11-22 09:39:55 +00:00
|
|
|
@@ -144,6 +144,11 @@ int ec_GFp_simple_group_set_curve(EC_GRO
|
|
|
|
return 0;
|
|
|
|
}
|
2016-10-11 08:31:54 +00:00
|
|
|
|
2016-11-22 09:39:55 +00:00
|
|
|
+ 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)
|