diff options
| author | djm <> | 2010-10-01 22:54:18 +0000 |
|---|---|---|
| committer | djm <> | 2010-10-01 22:54:18 +0000 |
| commit | 75291ae343a87368ad49c13ac02f85a88159417f (patch) | |
| tree | a55c90bd6ea9329d2afb5540220340cadd107178 /src/lib/libcrypto/ec | |
| parent | 40d5d67842948fbf904eb73da8f09a2ebcd2e243 (diff) | |
| download | openbsd-75291ae343a87368ad49c13ac02f85a88159417f.tar.gz openbsd-75291ae343a87368ad49c13ac02f85a88159417f.tar.bz2 openbsd-75291ae343a87368ad49c13ac02f85a88159417f.zip | |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/ec')
| -rw-r--r-- | src/lib/libcrypto/ec/Makefile | 48 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ectest.c | 14 |
2 files changed, 45 insertions, 17 deletions
diff --git a/src/lib/libcrypto/ec/Makefile b/src/lib/libcrypto/ec/Makefile index b5bbc9faa1..db380ed16f 100644 --- a/src/lib/libcrypto/ec/Makefile +++ b/src/lib/libcrypto/ec/Makefile | |||
| @@ -19,11 +19,11 @@ APPS= | |||
| 19 | LIB=$(TOP)/libcrypto.a | 19 | LIB=$(TOP)/libcrypto.a |
| 20 | LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c\ | 20 | LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c\ |
| 21 | ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\ | 21 | ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\ |
| 22 | ec2_smpl.c ec2_smpt.c ec2_mult.c | 22 | ec2_smpl.c ec2_mult.c ec_ameth.c ec_pmeth.c eck_prn.c |
| 23 | 23 | ||
| 24 | LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_nist.o ec_cvt.o ec_mult.o\ | 24 | LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_nist.o ec_cvt.o ec_mult.o\ |
| 25 | ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\ | 25 | ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\ |
| 26 | ec2_smpl.o ec2_mult.o | 26 | ec2_smpl.o ec2_mult.o ec_ameth.o ec_pmeth.o eck_prn.o |
| 27 | 27 | ||
| 28 | SRC= $(LIBSRC) | 28 | SRC= $(LIBSRC) |
| 29 | 29 | ||
| @@ -38,7 +38,7 @@ top: | |||
| 38 | all: lib | 38 | all: lib |
| 39 | 39 | ||
| 40 | lib: $(LIBOBJ) | 40 | lib: $(LIBOBJ) |
| 41 | $(ARX) $(LIB) $(LIBOBJ) | 41 | $(AR) $(LIB) $(LIBOBJ) |
| 42 | $(RANLIB) $(LIB) || echo Never mind. | 42 | $(RANLIB) $(LIB) || echo Never mind. |
| 43 | @touch lib | 43 | @touch lib |
| 44 | 44 | ||
| @@ -94,8 +94,22 @@ ec2_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | |||
| 94 | ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h | 94 | ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h |
| 95 | ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 95 | ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 96 | ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 96 | ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 97 | ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec2_smpt.c ec_lcl.h | 97 | ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec_lcl.h |
| 98 | ec2_smpt.o: ec2_smpt.c | 98 | ec_ameth.o: ../../e_os.h ../../include/openssl/asn1.h |
| 99 | ec_ameth.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 100 | ec_ameth.o: ../../include/openssl/buffer.h ../../include/openssl/cms.h | ||
| 101 | ec_ameth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 102 | ec_ameth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 103 | ec_ameth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 104 | ec_ameth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 105 | ec_ameth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 106 | ec_ameth.o: ../../include/openssl/opensslconf.h | ||
| 107 | ec_ameth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 108 | ec_ameth.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 109 | ec_ameth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 110 | ec_ameth.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 111 | ec_ameth.o: ../../include/openssl/x509_vfy.h ../asn1/asn1_locl.h ../cryptlib.h | ||
| 112 | ec_ameth.o: ec_ameth.c | ||
| 99 | ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h | 113 | ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h |
| 100 | ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 114 | ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 101 | ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | 115 | ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
| @@ -160,6 +174,20 @@ ec_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h | |||
| 160 | ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 174 | ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 161 | ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 175 | ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 162 | ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c | 176 | ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c |
| 177 | ec_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 178 | ec_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h | ||
| 179 | ec_pmeth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 180 | ec_pmeth.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 181 | ec_pmeth.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 182 | ec_pmeth.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 183 | ec_pmeth.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 184 | ec_pmeth.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 185 | ec_pmeth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 186 | ec_pmeth.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 187 | ec_pmeth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 188 | ec_pmeth.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 189 | ec_pmeth.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ../evp/evp_locl.h | ||
| 190 | ec_pmeth.o: ec_pmeth.c | ||
| 163 | ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 191 | ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 164 | ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 192 | ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
| 165 | ec_print.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | 193 | ec_print.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
| @@ -167,6 +195,16 @@ ec_print.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h | |||
| 167 | ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 195 | ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 168 | ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 196 | ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 169 | ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c | 197 | ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c |
| 198 | eck_prn.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 199 | eck_prn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 200 | eck_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 201 | eck_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 202 | eck_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 203 | eck_prn.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 204 | eck_prn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 205 | eck_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 206 | eck_prn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 207 | eck_prn.o: ../../include/openssl/symhacks.h ../cryptlib.h eck_prn.c | ||
| 170 | ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 208 | ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 171 | ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 209 | ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
| 172 | ecp_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | 210 | ecp_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
diff --git a/src/lib/libcrypto/ec/ectest.c b/src/lib/libcrypto/ec/ectest.c index 6148d553f9..7509cb9c7c 100644 --- a/src/lib/libcrypto/ec/ectest.c +++ b/src/lib/libcrypto/ec/ectest.c | |||
| @@ -432,9 +432,7 @@ void prime_field_tests() | |||
| 432 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 432 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 433 | fprintf(stdout, "."); | 433 | fprintf(stdout, "."); |
| 434 | fflush(stdout); | 434 | fflush(stdout); |
| 435 | #if 0 | ||
| 436 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; | 435 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; |
| 437 | #endif | ||
| 438 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; | 436 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; |
| 439 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 437 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 440 | fprintf(stdout, " ok\n"); | 438 | fprintf(stdout, " ok\n"); |
| @@ -478,9 +476,7 @@ void prime_field_tests() | |||
| 478 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 476 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 479 | fprintf(stdout, "."); | 477 | fprintf(stdout, "."); |
| 480 | fflush(stdout); | 478 | fflush(stdout); |
| 481 | #if 0 | ||
| 482 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; | 479 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; |
| 483 | #endif | ||
| 484 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; | 480 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; |
| 485 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 481 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 486 | fprintf(stdout, " ok\n"); | 482 | fprintf(stdout, " ok\n"); |
| @@ -525,9 +521,7 @@ void prime_field_tests() | |||
| 525 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 521 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 526 | fprintf(stdout, "."); | 522 | fprintf(stdout, "."); |
| 527 | fflush(stdout); | 523 | fflush(stdout); |
| 528 | #if 0 | ||
| 529 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; | 524 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; |
| 530 | #endif | ||
| 531 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; | 525 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; |
| 532 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 526 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 533 | fprintf(stdout, " ok\n"); | 527 | fprintf(stdout, " ok\n"); |
| @@ -577,9 +571,7 @@ void prime_field_tests() | |||
| 577 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 571 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 578 | fprintf(stdout, "."); | 572 | fprintf(stdout, "."); |
| 579 | fflush(stdout); | 573 | fflush(stdout); |
| 580 | #if 0 | ||
| 581 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; | 574 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; |
| 582 | #endif | ||
| 583 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; | 575 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; |
| 584 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 576 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 585 | fprintf(stdout, " ok\n"); | 577 | fprintf(stdout, " ok\n"); |
| @@ -635,9 +627,7 @@ void prime_field_tests() | |||
| 635 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 627 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 636 | fprintf(stdout, "."); | 628 | fprintf(stdout, "."); |
| 637 | fflush(stdout); | 629 | fflush(stdout); |
| 638 | #if 0 | ||
| 639 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; | 630 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; |
| 640 | #endif | ||
| 641 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; | 631 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; |
| 642 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; | 632 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; |
| 643 | fprintf(stdout, " ok\n"); | 633 | fprintf(stdout, " ok\n"); |
| @@ -809,7 +799,7 @@ void prime_field_tests() | |||
| 809 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ | 799 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ |
| 810 | fprintf(stdout, "."); \ | 800 | fprintf(stdout, "."); \ |
| 811 | fflush(stdout); \ | 801 | fflush(stdout); \ |
| 812 | /* if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; */ \ | 802 | if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; \ |
| 813 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ | 803 | if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ |
| 814 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ | 804 | if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ |
| 815 | fprintf(stdout, " ok\n"); \ | 805 | fprintf(stdout, " ok\n"); \ |
| @@ -1336,7 +1326,7 @@ int main(int argc, char *argv[]) | |||
| 1336 | #endif | 1326 | #endif |
| 1337 | CRYPTO_cleanup_all_ex_data(); | 1327 | CRYPTO_cleanup_all_ex_data(); |
| 1338 | ERR_free_strings(); | 1328 | ERR_free_strings(); |
| 1339 | ERR_remove_state(0); | 1329 | ERR_remove_thread_state(NULL); |
| 1340 | CRYPTO_mem_leaks_fp(stderr); | 1330 | CRYPTO_mem_leaks_fp(stderr); |
| 1341 | 1331 | ||
| 1342 | return 0; | 1332 | return 0; |
