Add missing Makefile and fix couple of typos in commentary.
authorAndy Polyakov <appro@openssl.org>
Mon, 28 Nov 2005 20:16:56 +0000 (20:16 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 28 Nov 2005 20:16:56 +0000 (20:16 +0000)
crypto/whrlpool/Makefile [new file with mode: 0644]
crypto/whrlpool/whrlpool.h
crypto/whrlpool/wp_block.c

diff --git a/crypto/whrlpool/Makefile b/crypto/whrlpool/Makefile
new file mode 100644 (file)
index 0000000..4d7fa88
--- /dev/null
@@ -0,0 +1,92 @@
+#
+# crypto/whrlpool/Makefile
+#
+
+DIR=   whrlpool
+TOP=   ../..
+CC=    cc
+CPP=   $(CC) -E
+INCLUDES=
+CFLAG=-g
+MAKEFILE=      Makefile
+AR=            ar r
+
+CFLAGS= $(INCLUDES) $(CFLAG)
+ASFLAGS= $(INCLUDES) $(ASFLAG)
+AFLAGS= $(ASFLAGS)
+
+GENERAL=Makefile
+TEST=wp_test.c
+APPS=
+
+LIB=$(TOP)/libcrypto.a
+LIBSRC=wp_dgst.c wp_block.c
+LIBOBJ=wp_dgst.o wp_block.o
+
+SRC= $(LIBSRC)
+
+EXHEADER= whrlpool.h
+HEADER= wp_locl.h $(EXHEADER)
+
+ALL=    $(GENERAL) $(SRC) $(HEADER)
+
+top:
+       (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
+
+all:   lib
+
+lib:   $(LIBOBJ)
+       $(AR) $(LIB) $(LIBOBJ)
+       $(RANLIB) $(LIB) || echo Never mind.
+       @touch lib
+
+x86mmx-elf.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) wp-mmx.pl elf $(CFLAGS) $(PROCESSOR)) > $@
+x86mmx-cof.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) wp-mmx.pl coff $(CFLAGS) $(PROCESSOR)) > $@
+x86mmx-out.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
+       (cd asm; $(PERL) wp-mmx.pl a.out $(CFLAGS) $(PROCESSOR)) > $@
+
+$(LIBOBJ): $(LIBSRC)
+
+files:
+       $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+
+links:
+       @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
+       @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
+       @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
+
+install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+       @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
+       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:
+       @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
+       $(MAKEDEPEND) -- $(CFLAG) $(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 *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+wp_block.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
+wp_block.o: ../../include/openssl/whrlpool.h wp_block.c wp_locl.h
+wp_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
+wp_dgst.o: ../../include/openssl/whrlpool.h wp_dgst.c wp_locl.h
index 64fde8a..bf9d7f5 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
 typedef struct {
        union   {
                unsigned char   c[WHIRLPOOL_DIGEST_LENGTH];
-               /* double q is here to ensures 64-bit alignment */
+               /* double q is here to ensure 64-bit alignment */
                double          q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)];
                }       H;
        unsigned char   data[WHIRLPOOL_BBLOCK/8];
index b478e11..221f6cc 100644 (file)
@@ -193,7 +193,7 @@ union       {
        u8      c[(256*N+ROUNDS)*sizeof(u64)];
        u64     q[(256*N+ROUNDS)];
        } Cx = { {
-       /* Note edian-neutral representation:-) */
+       /* Note endian-neutral representation:-) */
        LL(0x18,0x18,0x60,0x18,0xc0,0x78,0x30,0xd8),
        LL(0x23,0x23,0x8c,0x23,0x05,0xaf,0x46,0x26),
        LL(0xc6,0xc6,0x3f,0xc6,0x7e,0xf9,0x91,0xb8),