Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/minoura-xpg4dl]: src/crypto/dist/openssl/crypto The pieces of OpenSSL mi...



details:   https://anonhg.NetBSD.org/src/rev/3a2150ca4c47
branches:  minoura-xpg4dl
changeset: 486680:3a2150ca4c47
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 16 05:28:50 2000 +0000

description:
The pieces of OpenSSL missing from netbsd-cryptosrc-intl.

diffstat:

 crypto/dist/openssl/crypto/idea/Makefile.ssl    |   90 +++
 crypto/dist/openssl/crypto/idea/Makefile.uni    |   73 +++
 crypto/dist/openssl/crypto/idea/i_cbc.c         |  168 +++++++
 crypto/dist/openssl/crypto/idea/i_cfb64.c       |  122 +++++
 crypto/dist/openssl/crypto/idea/i_ecb.c         |   85 +++
 crypto/dist/openssl/crypto/idea/i_ofb64.c       |  110 ++++
 crypto/dist/openssl/crypto/idea/i_skey.c        |  156 ++++++
 crypto/dist/openssl/crypto/idea/idea.h          |   99 ++++
 crypto/dist/openssl/crypto/idea/idea_lcl.h      |  215 ++++++++
 crypto/dist/openssl/crypto/idea/idea_spd.c      |  296 ++++++++++++
 crypto/dist/openssl/crypto/idea/ideatest.c      |  230 +++++++++
 crypto/dist/openssl/crypto/idea/version         |   12 +
 crypto/dist/openssl/crypto/rc5/Makefile.ssl     |  112 ++++
 crypto/dist/openssl/crypto/rc5/Makefile.uni     |   73 +++
 crypto/dist/openssl/crypto/rc5/asm/r5-win32.asm |  574 ++++++++++++++++++++++++
 crypto/dist/openssl/crypto/rc5/asm/rc5-586.pl   |  109 ++++
 crypto/dist/openssl/crypto/rc5/rc5.h            |  113 ++++
 crypto/dist/openssl/crypto/rc5/rc5_ecb.c        |   80 +++
 crypto/dist/openssl/crypto/rc5/rc5_enc.c        |  214 ++++++++
 crypto/dist/openssl/crypto/rc5/rc5_locl.h       |  187 +++++++
 crypto/dist/openssl/crypto/rc5/rc5_skey.c       |  113 ++++
 crypto/dist/openssl/crypto/rc5/rc5cfb64.c       |  121 +++++
 crypto/dist/openssl/crypto/rc5/rc5ofb64.c       |  110 ++++
 crypto/dist/openssl/crypto/rc5/rc5s.cpp         |   70 ++
 crypto/dist/openssl/crypto/rc5/rc5speed.c       |  274 +++++++++++
 crypto/dist/openssl/crypto/rc5/rc5test.c        |  384 ++++++++++++++++
 crypto/dist/openssl/crypto/rsa/Makefile.ssl     |  172 +++++++
 crypto/dist/openssl/crypto/rsa/rsa.h            |  317 +++++++++++++
 crypto/dist/openssl/crypto/rsa/rsa_chk.c        |  184 +++++++
 crypto/dist/openssl/crypto/rsa/rsa_eay.c        |  489 ++++++++++++++++++++
 crypto/dist/openssl/crypto/rsa/rsa_err.c        |  144 ++++++
 crypto/dist/openssl/crypto/rsa/rsa_gen.c        |  195 ++++++++
 crypto/dist/openssl/crypto/rsa/rsa_lib.c        |  329 +++++++++++++
 crypto/dist/openssl/crypto/rsa/rsa_none.c       |   98 ++++
 crypto/dist/openssl/crypto/rsa/rsa_oaep.c       |  162 ++++++
 crypto/dist/openssl/crypto/rsa/rsa_oaep_test.c  |  309 ++++++++++++
 crypto/dist/openssl/crypto/rsa/rsa_pk1.c        |  212 ++++++++
 crypto/dist/openssl/crypto/rsa/rsa_saos.c       |  144 ++++++
 crypto/dist/openssl/crypto/rsa/rsa_sign.c       |  188 +++++++
 crypto/dist/openssl/crypto/rsa/rsa_ssl.c        |  147 ++++++
 40 files changed, 7280 insertions(+), 0 deletions(-)

diffs (truncated from 7440 to 300 lines):

diff -r 2eeb44bd1b82 -r 3a2150ca4c47 crypto/dist/openssl/crypto/idea/Makefile.ssl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/openssl/crypto/idea/Makefile.ssl      Fri Jun 16 05:28:50 2000 +0000
@@ -0,0 +1,90 @@
+#
+# SSLeay/crypto/idea/Makefile
+#
+
+DIR=   idea
+TOP=   ../..
+CC=    cc
+INCLUDES=
+CFLAG=-g
+INSTALL_PREFIX=
+OPENSSLDIR=     /usr/local/ssl
+INSTALLTOP=/usr/local/ssl
+MAKE=          make -f Makefile.ssl
+MAKEDEPEND=    $(TOP)/util/domd $(TOP)
+MAKEFILE=      Makefile.ssl
+AR=            ar r
+
+CFLAGS= $(INCLUDES) $(CFLAG)
+
+GENERAL=Makefile
+TEST=ideatest.c
+APPS=
+
+LIB=$(TOP)/libcrypto.a
+LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c
+LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o
+
+SRC= $(LIBSRC)
+
+EXHEADER= idea.h
+HEADER=        idea_lcl.h $(EXHEADER)
+
+ALL=    $(GENERAL) $(SRC) $(HEADER)
+
+top:
+       (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
+
+all:   lib
+
+lib:   $(LIBOBJ)
+       $(AR) $(LIB) $(LIBOBJ)
+       $(RANLIB) $(LIB)
+       @touch lib
+
+files:
+       $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
+
+links:
+       @$(TOP)/util/point.sh Makefile.ssl Makefile
+       @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
+       @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
+       @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
+
+install:
+       @for i in $(EXHEADER) ; \
+       do  \
+       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+       done;
+
+tags:
+       ctags $(SRC)
+
+tests:
+
+lint:
+       lint -DLINT $(INCLUDES) $(SRC)>fluff
+
+depend:
+       $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
+
+dclean:
+       $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
+       mv -f Makefile.new $(MAKEFILE)
+
+clean:
+       rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+i_cbc.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
+i_cbc.o: idea_lcl.h
+i_cfb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
+i_cfb64.o: idea_lcl.h
+i_ecb.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
+i_ecb.o: ../../include/openssl/opensslv.h idea_lcl.h
+i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
+i_ofb64.o: idea_lcl.h
+i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
+i_skey.o: idea_lcl.h
diff -r 2eeb44bd1b82 -r 3a2150ca4c47 crypto/dist/openssl/crypto/idea/Makefile.uni
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/openssl/crypto/idea/Makefile.uni      Fri Jun 16 05:28:50 2000 +0000
@@ -0,0 +1,73 @@
+# Targets
+# make          - twidle the options yourself :-)
+# make cc       - standard cc options
+# make gcc      - standard gcc options
+
+DIR=    cast
+TOP=    .
+CC=     gcc
+CFLAG= -O3 -fomit-frame-pointer
+
+CPP=    $(CC) -E
+INCLUDES=
+INSTALLTOP=/usr/local/lib
+MAKE=           make
+MAKEDEPEND=     makedepend
+MAKEFILE=       Makefile.uni
+AR=             ar r
+RANLIB=         ranlib
+
+IDEA_ENC=i_cbc.o
+
+CFLAGS= $(INCLUDES) $(CFLAG)
+
+GENERAL=Makefile
+TEST=ideatest
+APPS=idea_spd
+
+LIB=libidea.a
+LIBSRC=i_skey.c i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c
+LIBOBJ=i_skey.o i_ecb.o $(IDEA_ENC) i_cfb64.o i_ofb64.o
+
+SRC= $(LIBSRC)
+
+EXHEADER= idea.h
+HEADER= idea_lcl.h $(EXHEADER)
+
+ALL=    $(GENERAL) $(SRC) $(HEADER)
+
+all:    $(LIB) $(TEST) $(APPS)
+
+$(LIB):    $(LIBOBJ)
+       $(AR) $(LIB) $(LIBOBJ)
+       $(RANLIB) $(LIB)
+
+test:  $(TEST)
+       ./$(TEST)
+
+$(TEST): $(TEST).c $(LIB)
+       $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
+
+$(APPS): $(APPS).c $(LIB)
+       $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
+
+lint:
+       lint -DLINT $(INCLUDES) $(SRC)>fluff
+
+depend:
+       $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
+
+dclean:
+       perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
+       mv -f Makefile.new $(MAKEFILE)
+
+clean:
+       /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+
+cc:
+       $(MAKE) CC="cc" CFLAG="-O" all
+
+gcc:
+       $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
diff -r 2eeb44bd1b82 -r 3a2150ca4c47 crypto/dist/openssl/crypto/idea/i_cbc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/dist/openssl/crypto/idea/i_cbc.c   Fri Jun 16 05:28:50 2000 +0000
@@ -0,0 +1,168 @@
+/* crypto/idea/i_cbc.c */
+/* Copyright (C) 1995-1998 Eric Young (eay%cryptsoft.com@localhost)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay%cryptsoft.com@localhost).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh%cryptsoft.com@localhost).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay%cryptsoft.com@localhost)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh%cryptsoft.com@localhost)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <openssl/idea.h>
+#include "idea_lcl.h"
+
+void idea_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+            IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int encrypt)
+       {
+       register unsigned long tin0,tin1;
+       register unsigned long tout0,tout1,xor0,xor1;
+       register long l=length;
+       unsigned long tin[2];
+
+       if (encrypt)
+               {
+               n2l(iv,tout0);
+               n2l(iv,tout1);
+               iv-=8;
+               for (l-=8; l>=0; l-=8)
+                       {
+                       n2l(in,tin0);
+                       n2l(in,tin1);
+                       tin0^=tout0;
+                       tin1^=tout1;
+                       tin[0]=tin0;
+                       tin[1]=tin1;
+                       idea_encrypt(tin,ks);
+                       tout0=tin[0]; l2n(tout0,out);
+                       tout1=tin[1]; l2n(tout1,out);
+                       }
+               if (l != -8)
+                       {
+                       n2ln(in,tin0,tin1,l+8);
+                       tin0^=tout0;
+                       tin1^=tout1;
+                       tin[0]=tin0;
+                       tin[1]=tin1;
+                       idea_encrypt(tin,ks);
+                       tout0=tin[0]; l2n(tout0,out);
+                       tout1=tin[1]; l2n(tout1,out);
+                       }
+               l2n(tout0,iv);
+               l2n(tout1,iv);
+               }
+       else
+               {
+               n2l(iv,xor0);
+               n2l(iv,xor1);
+               iv-=8;
+               for (l-=8; l>=0; l-=8)
+                       {
+                       n2l(in,tin0); tin[0]=tin0;
+                       n2l(in,tin1); tin[1]=tin1;
+                       idea_encrypt(tin,ks);
+                       tout0=tin[0]^xor0;
+                       tout1=tin[1]^xor1;
+                       l2n(tout0,out);
+                       l2n(tout1,out);
+                       xor0=tin0;
+                       xor1=tin1;
+                       }
+               if (l != -8)
+                       {
+                       n2l(in,tin0); tin[0]=tin0;
+                       n2l(in,tin1); tin[1]=tin1;
+                       idea_encrypt(tin,ks);
+                       tout0=tin[0]^xor0;
+                       tout1=tin[1]^xor1;
+                       l2nn(tout0,tout1,out,l+8);



Home | Main Index | Thread Index | Old Index