Engage Whirlpool assembler and mention Whirlpool in CHANGES.

This commit is contained in:
Andy Polyakov 2005-12-16 12:55:33 +00:00
parent 0fbd4bf044
commit ed26604a71
4 changed files with 22 additions and 8 deletions

View File

@ -4,6 +4,9 @@
Changes between 0.9.8a and 0.9.9 [xx XXX xxxx] Changes between 0.9.8a and 0.9.9 [xx XXX xxxx]
*) Whirlpool hash implementation is added.
[Andy Polyakov]
*) BIGNUM code on 64-bit SPARCv9 targets is switched from bn(64,64) to *) BIGNUM code on 64-bit SPARCv9 targets is switched from bn(64,64) to
bn(64,32). Because of instruction set limitations it doesn't have bn(64,32). Because of instruction set limitations it doesn't have
any negative impact on performance. This was done mostly in order any negative impact on performance. This was done mostly in order

View File

@ -114,11 +114,11 @@ my $tlib="-lnsl -lsocket";
my $bits1="THIRTY_TWO_BIT "; my $bits1="THIRTY_TWO_BIT ";
my $bits2="SIXTY_FOUR_BIT "; my $bits2="SIXTY_FOUR_BIT ";
my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o mo86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o:"; my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o mo86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o:w86mmx-elf.o";
my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o mo86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o:"; my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o mo86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o:w86mmx-cof.o";
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o mo86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o:"; my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o mo86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o:w86mmx-out.o";
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::"; my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o";
my $ia64_asm="ia64cpuid.o:bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::"; my $ia64_asm="ia64cpuid.o:bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::";
my $no_asm=":::::::::::"; my $no_asm=":::::::::::";
@ -1224,6 +1224,11 @@ if ($aes_obj =~ /\.o$/)
else { else {
$aes_obj=$aes_enc; $aes_obj=$aes_enc;
} }
if ($wp_obj =~ /\.o$/)
{
if ($wp_obj =~ /mmx/ && $processor eq "386") { $wp_obj=""; }
else { $cflags.=" -DWHIRLPOOL_ASM"; }
}
# "Stringify" the C flags string. This permits it to be made part of a string # "Stringify" the C flags string. This permits it to be made part of a string
# and works as well on command lines. # and works as well on command lines.
@ -1308,6 +1313,7 @@ while (<IN>)
s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/; s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
s/^WP_ASM_OBJ=.*$/WP_ASM_OBJ= $wp_obj/;
s/^PROCESSOR=.*/PROCESSOR= $processor/; s/^PROCESSOR=.*/PROCESSOR= $processor/;
s/^RANLIB=.*/RANLIB= $ranlib/; s/^RANLIB=.*/RANLIB= $ranlib/;
s/^ARFLAGS=.*/ARFLAGS= $arflags/; s/^ARFLAGS=.*/ARFLAGS= $arflags/;

View File

@ -95,6 +95,7 @@ RC5_ENC= rc5_enc.o
MD5_ASM_OBJ= MD5_ASM_OBJ=
SHA1_ASM_OBJ= SHA1_ASM_OBJ=
RMD160_ASM_OBJ= RMD160_ASM_OBJ=
WP_ASM_OBJ=
# KRB5 stuff # KRB5 stuff
KRB5_INCLUDES= KRB5_INCLUDES=
@ -191,6 +192,7 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \ SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
MD5_ASM_OBJ='${MD5_ASM_OBJ}' \ MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \ RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
WP_ASM_OBJ='${WP_ASM_OBJ}' \
THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
# which in turn eliminates ambiguities in variable treatment with -e. # which in turn eliminates ambiguities in variable treatment with -e.

View File

@ -21,7 +21,7 @@ APPS=
LIB=$(TOP)/libcrypto.a LIB=$(TOP)/libcrypto.a
LIBSRC=wp_dgst.c wp_block.c LIBSRC=wp_dgst.c wp_block.c
LIBOBJ=wp_dgst.o wp_block.o LIBOBJ=wp_dgst.o wp_block.o $(WP_ASM_OBJ)
SRC= $(LIBSRC) SRC= $(LIBSRC)
@ -40,13 +40,16 @@ lib: $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind. $(RANLIB) $(LIB) || echo Never mind.
@touch lib @touch lib
x86mmx-elf.s: asm/wp-mmx.pl ../perlasm/x86asm.pl w86mmx-elf.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) wp-mmx.pl elf $(CFLAGS) $(PROCESSOR)) > $@ (cd asm; $(PERL) wp-mmx.pl elf $(CFLAGS) $(PROCESSOR)) > $@
x86mmx-cof.s: asm/wp-mmx.pl ../perlasm/x86asm.pl w86mmx-cof.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) wp-mmx.pl coff $(CFLAGS) $(PROCESSOR)) > $@ (cd asm; $(PERL) wp-mmx.pl coff $(CFLAGS) $(PROCESSOR)) > $@
x86mmx-out.s: asm/wp-mmx.pl ../perlasm/x86asm.pl w86mmx-out.s: asm/wp-mmx.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) wp-mmx.pl a.out $(CFLAGS) $(PROCESSOR)) > $@ (cd asm; $(PERL) wp-mmx.pl a.out $(CFLAGS) $(PROCESSOR)) > $@
wp-x86_64.s: asm/wp-x86_64.pl
$(PERL) asm/wp-x86_64.pl $@
$(LIBOBJ): $(LIBSRC) $(LIBOBJ): $(LIBSRC)
files: files: