summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec
diff options
context:
space:
mode:
authordjm <>2010-10-01 22:54:19 +0000
committerdjm <>2010-10-01 22:54:19 +0000
commit242690ab2a8e991b85b4735c4e0bac0ec7bd3481 (patch)
treea55c90bd6ea9329d2afb5540220340cadd107178 /src/lib/libcrypto/ec
parent5d1f64994b96668ba794f5211364ed54dd7ee08d (diff)
downloadopenbsd-242690ab2a8e991b85b4735c4e0bac0ec7bd3481.tar.gz
openbsd-242690ab2a8e991b85b4735c4e0bac0ec7bd3481.tar.bz2
openbsd-242690ab2a8e991b85b4735c4e0bac0ec7bd3481.zip
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r--src/lib/libcrypto/ec/Makefile48
-rw-r--r--src/lib/libcrypto/ec/ectest.c14
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=
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c\ 20LIBSRC= 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
24LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_nist.o ec_cvt.o ec_mult.o\ 24LIBOBJ= 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
28SRC= $(LIBSRC) 28SRC= $(LIBSRC)
29 29
@@ -38,7 +38,7 @@ top:
38all: lib 38all: lib
39 39
40lib: $(LIBOBJ) 40lib: $(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
94ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h 94ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
95ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 95ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
96ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 96ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
97ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec2_smpt.c ec_lcl.h 97ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec_lcl.h
98ec2_smpt.o: ec2_smpt.c 98ec_ameth.o: ../../e_os.h ../../include/openssl/asn1.h
99ec_ameth.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
100ec_ameth.o: ../../include/openssl/buffer.h ../../include/openssl/cms.h
101ec_ameth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
102ec_ameth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
103ec_ameth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
104ec_ameth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
105ec_ameth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
106ec_ameth.o: ../../include/openssl/opensslconf.h
107ec_ameth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
108ec_ameth.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
109ec_ameth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
110ec_ameth.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
111ec_ameth.o: ../../include/openssl/x509_vfy.h ../asn1/asn1_locl.h ../cryptlib.h
112ec_ameth.o: ec_ameth.c
99ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h 113ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
100ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 114ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
101ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 115ec_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
160ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 174ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
161ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 175ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
162ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c 176ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c
177ec_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h
178ec_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
179ec_pmeth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
180ec_pmeth.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
181ec_pmeth.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
182ec_pmeth.o: ../../include/openssl/err.h ../../include/openssl/evp.h
183ec_pmeth.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
184ec_pmeth.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
185ec_pmeth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
186ec_pmeth.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
187ec_pmeth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
188ec_pmeth.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
189ec_pmeth.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ../evp/evp_locl.h
190ec_pmeth.o: ec_pmeth.c
163ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 191ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
164ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 192ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
165ec_print.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 193ec_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
167ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 195ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
168ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 196ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
169ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c 197ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c
198eck_prn.o: ../../e_os.h ../../include/openssl/asn1.h
199eck_prn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
200eck_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
201eck_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
202eck_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h
203eck_prn.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
204eck_prn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
205eck_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
206eck_prn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
207eck_prn.o: ../../include/openssl/symhacks.h ../cryptlib.h eck_prn.c
170ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 208ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
171ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 209ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
172ecp_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 210ecp_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;