diff options
author | Bodo Möller <bodo@openssl.org> | 2002-10-28 14:23:24 +0100 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-10-28 14:23:24 +0100 |
commit | 5c6bf03117a26942327f43d02e9113e9870f7aba (patch) | |
tree | 69fe35ae1e549a9b68c2e6fbb0d209a19dc8856f /apps | |
parent | remove superfluous code (diff) | |
download | openssl-5c6bf03117a26942327f43d02e9113e9870f7aba.tar.xz openssl-5c6bf03117a26942327f43d02e9113e9870f7aba.zip |
fast reduction for NIST curves
Submitted by: Nils Larsch
Diffstat (limited to 'apps')
-rw-r--r-- | apps/speed.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/apps/speed.c b/apps/speed.c index a8a375ff2d..ac643bd986 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -261,7 +261,7 @@ static int do_multi(int multi); #define RSA_NUM 4 #define DSA_NUM 3 -#define EC_NUM 15 +#define EC_NUM 16 #define MAX_ECDH_SIZE 256 static const char *names[ALGOR_NUM]={ @@ -520,20 +520,21 @@ int MAIN(int argc, char **argv) #define R_RSA_4096 3 #define R_EC_P160 0 -#define R_EC_P224 1 -#define R_EC_P256 2 -#define R_EC_P384 3 -#define R_EC_P521 4 -#define R_EC_K163 5 -#define R_EC_K233 6 -#define R_EC_K283 7 -#define R_EC_K409 8 -#define R_EC_K571 9 -#define R_EC_B163 10 -#define R_EC_B233 11 -#define R_EC_B283 12 -#define R_EC_B409 13 -#define R_EC_B571 14 +#define R_EC_P192 1 +#define R_EC_P224 2 +#define R_EC_P256 3 +#define R_EC_P384 4 +#define R_EC_P521 5 +#define R_EC_K163 6 +#define R_EC_K233 7 +#define R_EC_K283 8 +#define R_EC_K409 9 +#define R_EC_K571 10 +#define R_EC_B163 11 +#define R_EC_B233 12 +#define R_EC_B283 13 +#define R_EC_B409 14 +#define R_EC_B571 15 #ifndef OPENSSL_NO_RSA RSA *rsa_key[RSA_NUM]; @@ -560,6 +561,7 @@ int MAIN(int argc, char **argv) { /* Prime Curves */ NID_secp160r1, + NID_X9_62_prime192v1, NID_secp224r1, NID_X9_62_prime256v1, NID_secp384r1, @@ -580,6 +582,7 @@ int MAIN(int argc, char **argv) { /* Prime Curves */ "secp160r1", + "nistp192", "nistp224", "nistp256", "nistp384", @@ -598,7 +601,7 @@ int MAIN(int argc, char **argv) }; static int test_curves_bits[EC_NUM] = { - 160, 224, 256, 384, 521, + 160, 192, 224, 256, 384, 521, 163, 233, 283, 409, 571, 163, 233, 283, 409, 571 }; |