summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:15:54 +0000
committerdjm <>2008-09-06 12:15:54 +0000
commitf519f07de9bfb123f2b32aa3965e6f73c8364b80 (patch)
treead353b318ee632f73212a174cffac9bb9e573b7c /src/lib/libcrypto/ec
parent89b182c5db7ea802edfc3ee734b4899b43e13e09 (diff)
parentf1625f274acf5dcd5601f6cb5e29e233b2a441a3 (diff)
downloadopenbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.tar.gz
openbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.tar.bz2
openbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.zip
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r--src/lib/libcrypto/ec/Makefile163
-rw-r--r--src/lib/libcrypto/ec/ec2_smpt.c74
2 files changed, 189 insertions, 48 deletions
diff --git a/src/lib/libcrypto/ec/Makefile b/src/lib/libcrypto/ec/Makefile
index 8f03658ad4..42f7bb7fc8 100644
--- a/src/lib/libcrypto/ec/Makefile
+++ b/src/lib/libcrypto/ec/Makefile
@@ -7,11 +7,6 @@ TOP= ../..
7CC= cc 7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include 8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g 9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKEDEPPROG= makedepend
14MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
15MAKEFILE= Makefile 10MAKEFILE= Makefile
16AR= ar r 11AR= ar r
17 12
@@ -22,11 +17,13 @@ TEST=ectest.c
22APPS= 17APPS=
23 18
24LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
25LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.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\
26 ec_err.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
27 23
28LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.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\
29 ec_err.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
30 27
31SRC= $(LIBSRC) 28SRC= $(LIBSRC)
32 29
@@ -54,6 +51,7 @@ links:
54 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) 51 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
55 52
56install: 53install:
54 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
57 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ 55 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
58 do \ 56 do \
59 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 57 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
@@ -69,6 +67,7 @@ lint:
69 lint -DLINT $(INCLUDES) $(SRC)>fluff 67 lint -DLINT $(INCLUDES) $(SRC)>fluff
70 68
71depend: 69depend:
70 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
72 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) 71 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
73 72
74dclean: 73dclean:
@@ -80,47 +79,115 @@ clean:
80 79
81# DO NOT DELETE THIS LINE -- make depend depends on it. 80# DO NOT DELETE THIS LINE -- make depend depends on it.
82 81
83ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h 82ec2_mult.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
84ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h 83ec2_mult.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
84ec2_mult.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
85ec2_mult.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
86ec2_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
87ec2_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
88ec2_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
89ec2_mult.o: ../../include/openssl/symhacks.h ec2_mult.c ec_lcl.h
90ec2_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
91ec2_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
92ec2_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
93ec2_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.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
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
98ec2_smpt.o: ec2_smpt.c
99ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
100ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
101ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
102ec_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h
103ec_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
104ec_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
105ec_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
106ec_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
107ec_asn1.o: ../../include/openssl/symhacks.h ec_asn1.c ec_lcl.h
108ec_check.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
109ec_check.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
110ec_check.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
111ec_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
112ec_check.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
113ec_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
114ec_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
115ec_check.o: ../../include/openssl/symhacks.h ec_check.c ec_lcl.h
116ec_curve.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
117ec_curve.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
118ec_curve.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
119ec_curve.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
120ec_curve.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
121ec_curve.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122ec_curve.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123ec_curve.o: ../../include/openssl/symhacks.h ec_curve.c ec_lcl.h
124ec_cvt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
125ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
126ec_cvt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
127ec_cvt.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
128ec_cvt.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
129ec_cvt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
130ec_cvt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
85ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h 131ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h
86ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 132ec_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
87ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 133ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h 134ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h
89ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 135ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
90ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h 136ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
91ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 137ec_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
92ec_err.o: ec_err.c 138ec_err.o: ../../include/openssl/symhacks.h ec_err.c
93ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 139ec_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
94ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 140ec_key.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
95ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h 141ec_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
96ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 142ec_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
97ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h 143ec_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
98ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 144ec_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
99ec_lib.o: ec_lcl.h ec_lib.c 145ec_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
100ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 146ec_key.o: ../../include/openssl/symhacks.h ec_key.c ec_lcl.h
101ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 147ec_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
102ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h 148ec_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
103ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 149ec_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
104ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h 150ec_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
105ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 151ec_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
106ec_mult.o: ec_lcl.h ec_mult.c 152ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 153ec_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
108ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 154ec_lib.o: ../../include/openssl/symhacks.h ec_lcl.h ec_lib.c
109ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h 155ec_mult.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
110ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 156ec_mult.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
111ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h 157ec_mult.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
112ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 158ec_mult.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
113ecp_mont.o: ec_lcl.h ecp_mont.c 159ec_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
114ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h 160ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
115ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h 161ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
162ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c
163ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
164ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
165ec_print.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
166ec_print.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
167ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
168ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
169ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c
170ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
171ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
172ecp_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
173ecp_mont.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
174ecp_mont.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
175ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
176ecp_mont.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
177ecp_mont.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_mont.c
178ecp_nist.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
179ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
180ecp_nist.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
181ecp_nist.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
182ecp_nist.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
183ecp_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
184ecp_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
116ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c 185ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
117ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h 186ecp_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
118ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h 187ecp_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
119ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c 188ecp_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
120ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 189ecp_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
121ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 190ecp_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
122ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h 191ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
123ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 192ecp_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
124ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h 193ecp_smpl.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_smpl.c
125ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
126ecp_smpl.o: ec_lcl.h ecp_smpl.c
diff --git a/src/lib/libcrypto/ec/ec2_smpt.c b/src/lib/libcrypto/ec/ec2_smpt.c
new file mode 100644
index 0000000000..59d52bf663
--- /dev/null
+++ b/src/lib/libcrypto/ec/ec2_smpt.c
@@ -0,0 +1,74 @@
1/* crypto/ec/ec2_smpt.c */
2/* This code was originally written by Douglas Stebila
3 * <dstebila@student.math.uwaterloo.ca> for the OpenSSL project.
4 */
5/* ====================================================================
6 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * 3. All advertising materials mentioning features or use of this
21 * software must display the following acknowledgment:
22 * "This product includes software developed by the OpenSSL Project
23 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24 *
25 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26 * endorse or promote products derived from this software without
27 * prior written permission. For written permission, please contact
28 * openssl-core@openssl.org.
29 *
30 * 5. Products derived from this software may not be called "OpenSSL"
31 * nor may "OpenSSL" appear in their names without prior written
32 * permission of the OpenSSL Project.
33 *
34 * 6. Redistributions of any form whatsoever must retain the following
35 * acknowledgment:
36 * "This product includes software developed by the OpenSSL Project
37 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50 * OF THE POSSIBILITY OF SUCH DAMAGE.
51 * ====================================================================
52 *
53 * This product includes cryptographic software written by Eric Young
54 * (eay@cryptsoft.com). This product includes software written by Tim
55 * Hudson (tjh@cryptsoft.com).
56 *
57 */
58
59
60/* Calaculates and sets the affine coordinates of an EC_POINT from the given
61 * compressed coordinates. Uses algorithm 2.3.4 of SEC 1.
62 * Note that the simple implementation only uses affine coordinates.
63 *
64 * This algorithm is patented by Certicom Corp. under US Patent 6,141,420
65 * (for licensing information, contact licensing@certicom.com).
66 * This function is disabled by default and can be enabled by defining the
67 * preprocessor macro OPENSSL_EC_BIN_PT_COMP at Configure-time.
68 */
69int ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point,
70 const BIGNUM *x_, int y_bit, BN_CTX *ctx)
71 {
72 ECerr(EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_DISABLED);
73 return 0;
74 }