diff options
author | jsing <> | 2014-12-07 14:58:50 +0000 |
---|---|---|
committer | jsing <> | 2014-12-07 14:58:50 +0000 |
commit | 54c29dc63f86eb85f4c728ad9b5375acc16f8ea7 (patch) | |
tree | 7f5179a6cbdb8690e06dde4a5ee82b1c550d2140 /src | |
parent | b759fe3ab5f3e3c7e5ea4d3710d752edf8150ee1 (diff) | |
download | openbsd-54c29dc63f86eb85f4c728ad9b5375acc16f8ea7.tar.gz openbsd-54c29dc63f86eb85f4c728ad9b5375acc16f8ea7.tar.bz2 openbsd-54c29dc63f86eb85f4c728ad9b5375acc16f8ea7.zip |
Handle GF(2^m) EC curves for C code generation.
From Minux Ma.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/ecparam.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/usr.bin/openssl/ecparam.c b/src/usr.bin/openssl/ecparam.c index b4d65ad2e5..4b2119ee21 100644 --- a/src/usr.bin/openssl/ecparam.c +++ b/src/usr.bin/openssl/ecparam.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecparam.c,v 1.4 2014/10/13 02:46:14 bcook Exp $ */ | 1 | /* $OpenBSD: ecparam.c,v 1.5 2014/12/07 14:58:50 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -434,8 +434,9 @@ ecparam_main(int argc, char **argv) | |||
434 | ec_b, NULL)) | 434 | ec_b, NULL)) |
435 | goto end; | 435 | goto end; |
436 | } else { | 436 | } else { |
437 | /* TODO */ | 437 | if (!EC_GROUP_get_curve_GF2m(group, ec_p, ec_a, |
438 | goto end; | 438 | ec_b, NULL)) |
439 | goto end; | ||
439 | } | 440 | } |
440 | 441 | ||
441 | if ((point = EC_GROUP_get0_generator(group)) == NULL) | 442 | if ((point = EC_GROUP_get0_generator(group)) == NULL) |
@@ -504,8 +505,9 @@ ecparam_main(int argc, char **argv) | |||
504 | "GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" | 505 | "GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" |
505 | "\n\t\tgoto err;\n\n"); | 506 | "\n\t\tgoto err;\n\n"); |
506 | } else { | 507 | } else { |
507 | /* TODO */ | 508 | BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_" |
508 | goto end; | 509 | "GF2m(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" |
510 | "\n\t\tgoto err;\n\n"); | ||
509 | } | 511 | } |
510 | BIO_printf(out, "\t/* build generator */\n"); | 512 | BIO_printf(out, "\t/* build generator */\n"); |
511 | BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " | 513 | BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " |