From 43a6d78bccef244103ae076d934b8c7bed5d4589 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sun, 11 Apr 2004 15:59:57 +0000 Subject: [PATCH] Add SHA-1 assembler. --- Configure | 4 +- Makefile.org | 11 +- fips/Makefile | 6 +- fips/sha1/Makefile | 4 +- fips/sha1/asm/sx86-elf.s | 1568 ++++++++++++++++++++++++++++++++++++ fips/sha1/fingerprint.sha1 | 2 +- fips/sha1/fips_sha1dgst.c | 1 - fips/sha1/standalone.sha1 | 2 +- 8 files changed, 1584 insertions(+), 14 deletions(-) create mode 100644 fips/sha1/asm/sx86-elf.s diff --git a/Configure b/Configure index a75a6ae6c9..bbf8a8e100 100755 --- a/Configure +++ b/Configure @@ -1159,11 +1159,12 @@ if ($fips) $des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/); my $fips_des_obj='asm/fips-dx86-elf.o'; $fips_des_obj=$fips_des_enc unless $processor eq '386'; +my $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386'; $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); $rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); -if ($sha1_obj =~ /\.o$/) +if ($sha1_obj =~ /\.o$/ || $fips_sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; $cflags.=" -DSHA1_ASM"; @@ -1264,6 +1265,7 @@ while () s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/; s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/; s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; + s/^FIPS_SHA1_ASM_OBJ=.*$/FIPS_SHA1_ASM_OBJ= $fips_sha1_obj/; s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; s/^PROCESSOR=.*/PROCESSOR= $processor/; s/^RANLIB=.*/RANLIB= $ranlib/; diff --git a/Makefile.org b/Makefile.org index 4051fcf033..802fbeab60 100644 --- a/Makefile.org +++ b/Makefile.org @@ -154,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o # Also need SHA1_ASM defined SHA1_ASM_OBJ= asm/sx86-out.o +FIPS_SHA1_ASM_OBJ= asm/sx86-out.o #SHA1_ASM_OBJ= asm/sx86-elf.o # elf #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD @@ -236,7 +237,7 @@ sub_all: do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making all in $$i..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ else \ $(MAKE) $$i; \ fi; \ @@ -247,7 +248,7 @@ sub_target: do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making $(TARGET) in $$i..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \ else \ $(MAKE) $$i; \ fi; \ @@ -657,13 +658,13 @@ links: @for i in $(DIRS); do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making links in $$i..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \ fi; \ done; gentests: @(cd test && echo "generating dummy tests (if needed)..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); dclean: rm -f *.bak @@ -692,7 +693,7 @@ test: tests tests: rehash @(cd test && echo "testing..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests ); + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests ); @LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \ DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \ SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \ diff --git a/fips/Makefile b/fips/Makefile index 2feecef946..8f7b8ceede 100644 --- a/fips/Makefile +++ b/fips/Makefile @@ -54,14 +54,14 @@ subdirs: @for i in $(FDIRS) ;\ do \ (cd $$i && echo "making all in fips/$$i..." && \ - $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ done; sub_target: @for i in $(FDIRS) ;\ do \ (cd $$i && echo "making $(TARGET) in fips/$$i..." && \ - $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' $(TARGET) ) || exit 1; \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' $(TARGET) ) || exit 1; \ done; files: @@ -76,7 +76,7 @@ links: @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) @for i in $(FDIRS); do \ (cd $$i && echo "making links in fips/$$i..." && \ - $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \ done; lib: $(LIBOBJ) diff --git a/fips/sha1/Makefile b/fips/sha1/Makefile index c579f2f273..2d56960df6 100644 --- a/fips/sha1/Makefile +++ b/fips/sha1/Makefile @@ -25,7 +25,7 @@ EXE= fips_standalone_sha1 LIB=$(TOP)/libcrypto.a LIBSRC=fips_sha1dgst.c fips_sha1_selftest.c -LIBOBJ=fips_sha1dgst.o fips_sha1_selftest.o +LIBOBJ=fips_sha1dgst.o fips_sha1_selftest.o $(FIPS_SHA1_ASM_OBJ) SRC= $(LIBSRC) fips_standalone_sha1.c @@ -52,7 +52,7 @@ lib: $(LIBOBJ) fips_standalone_sha1: fips_standalone_sha1.o fips_sha1dgst.o $(CC) -o fips_standalone_sha1 $(CFLAGS) fips_standalone_sha1.o \ - fips_sha1dgst.o + fips_sha1dgst.o $(FIPS_SHA1_ASM_OBJ) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/fips/sha1/asm/sx86-elf.s b/fips/sha1/asm/sx86-elf.s new file mode 100644 index 0000000000..2cdd009a24 --- /dev/null +++ b/fips/sha1/asm/sx86-elf.s @@ -0,0 +1,1568 @@ + + + + + + + .file "sha1-586.s" + .version "01.01" +gcc2_compiled.: +.text + .align 16 +.globl sha1_block_asm_data_order + .type sha1_block_asm_data_order,@function +sha1_block_asm_data_order: + movl 12(%esp), %ecx + pushl %esi + sall $6, %ecx + movl 12(%esp), %esi + pushl %ebp + addl %esi, %ecx + pushl %ebx + movl 16(%esp), %ebp + pushl %edi + movl 12(%ebp), %edx + subl $108, %esp + movl 16(%ebp), %edi + movl 8(%ebp), %ebx + movl %ecx, 68(%esp) + +.L000start: + + movl (%esi), %eax + movl 4(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, (%esp) + movl %ecx, 4(%esp) + movl 8(%esi), %eax + movl 12(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 8(%esp) + movl %ecx, 12(%esp) + movl 16(%esi), %eax + movl 20(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 16(%esp) + movl %ecx, 20(%esp) + movl 24(%esi), %eax + movl 28(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 24(%esp) + movl %ecx, 28(%esp) + movl 32(%esi), %eax + movl 36(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 32(%esp) + movl %ecx, 36(%esp) + movl 40(%esi), %eax + movl 44(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 40(%esp) + movl %ecx, 44(%esp) + movl 48(%esi), %eax + movl 52(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 48(%esp) + movl %ecx, 52(%esp) + movl 56(%esi), %eax + movl 60(%esi), %ecx + + xchg %al, %ah + rorl $16, %eax + xchg %al, %ah + + xchg %cl, %ch + rorl $16, %ecx + xchg %cl, %ch + movl %eax, 56(%esp) + movl %ecx, 60(%esp) + + + movl %esi, 132(%esp) +.L001shortcut: + + + movl (%ebp), %eax + movl 4(%ebp), %ecx + + movl %eax, %ebp + movl %ebx, %esi + roll $5, %ebp + xorl %edx, %esi + andl %ecx, %esi + rorl $2, %ecx + addl %edi, %ebp + movl (%esp), %edi + xorl %edx, %esi + leal 1518500249(%ebp,%edi,1),%ebp + addl %ebp, %esi + + movl %esi, %ebp + movl %ecx, %edi + roll $5, %ebp + xorl %ebx, %edi + andl %eax, %edi + rorl $2, %eax + addl %edx, %ebp + movl 4(%esp), %edx + xorl %ebx, %edi + leal 1518500249(%ebp,%edx,1),%ebp + addl %ebp, %edi + + movl %edi, %ebp + movl %eax, %edx + roll $5, %ebp + xorl %ecx, %edx + andl %esi, %edx + rorl $2, %esi + addl %ebx, %ebp + movl 8(%esp), %ebx + xorl %ecx, %edx + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ebp, %edx + + movl %edx, %ebp + movl %esi, %ebx + roll $5, %ebp + xorl %eax, %ebx + andl %edi, %ebx + rorl $2, %edi + addl %ecx, %ebp + movl 12(%esp), %ecx + xorl %eax, %ebx + leal 1518500249(%ebp,%ecx,1),%ebp + addl %ebp, %ebx + + movl %ebx, %ebp + movl %edi, %ecx + roll $5, %ebp + xorl %esi, %ecx + andl %edx, %ecx + rorl $2, %edx + addl %eax, %ebp + movl 16(%esp), %eax + xorl %esi, %ecx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebp, %ecx + + movl %ecx, %ebp + movl %edx, %eax + roll $5, %ebp + xorl %edi, %eax + andl %ebx, %eax + rorl $2, %ebx + addl %esi, %ebp + movl 20(%esp), %esi + xorl %edi, %eax + leal 1518500249(%ebp,%esi,1),%ebp + addl %ebp, %eax + + movl %eax, %ebp + movl %ebx, %esi + roll $5, %ebp + xorl %edx, %esi + andl %ecx, %esi + rorl $2, %ecx + addl %edi, %ebp + movl 24(%esp), %edi + xorl %edx, %esi + leal 1518500249(%ebp,%edi,1),%ebp + addl %ebp, %esi + + movl %esi, %ebp + movl %ecx, %edi + roll $5, %ebp + xorl %ebx, %edi + andl %eax, %edi + rorl $2, %eax + addl %edx, %ebp + movl 28(%esp), %edx + xorl %ebx, %edi + leal 1518500249(%ebp,%edx,1),%ebp + addl %ebp, %edi + + movl %edi, %ebp + movl %eax, %edx + roll $5, %ebp + xorl %ecx, %edx + andl %esi, %edx + rorl $2, %esi + addl %ebx, %ebp + movl 32(%esp), %ebx + xorl %ecx, %edx + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ebp, %edx + + movl %edx, %ebp + movl %esi, %ebx + roll $5, %ebp + xorl %eax, %ebx + andl %edi, %ebx + rorl $2, %edi + addl %ecx, %ebp + movl 36(%esp), %ecx + xorl %eax, %ebx + leal 1518500249(%ebp,%ecx,1),%ebp + addl %ebp, %ebx + + movl %ebx, %ebp + movl %edi, %ecx + roll $5, %ebp + xorl %esi, %ecx + andl %edx, %ecx + rorl $2, %edx + addl %eax, %ebp + movl 40(%esp), %eax + xorl %esi, %ecx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebp, %ecx + + movl %ecx, %ebp + movl %edx, %eax + roll $5, %ebp + xorl %edi, %eax + andl %ebx, %eax + rorl $2, %ebx + addl %esi, %ebp + movl 44(%esp), %esi + xorl %edi, %eax + leal 1518500249(%ebp,%esi,1),%ebp + addl %ebp, %eax + + movl %eax, %ebp + movl %ebx, %esi + roll $5, %ebp + xorl %edx, %esi + andl %ecx, %esi + rorl $2, %ecx + addl %edi, %ebp + movl 48(%esp), %edi + xorl %edx, %esi + leal 1518500249(%ebp,%edi,1),%ebp + addl %ebp, %esi + + movl %esi, %ebp + movl %ecx, %edi + roll $5, %ebp + xorl %ebx, %edi + andl %eax, %edi + rorl $2, %eax + addl %edx, %ebp + movl 52(%esp), %edx + xorl %ebx, %edi + leal 1518500249(%ebp,%edx,1),%ebp + addl %ebp, %edi + + movl %edi, %ebp + movl %eax, %edx + roll $5, %ebp + xorl %ecx, %edx + andl %esi, %edx + rorl $2, %esi + addl %ebx, %ebp + movl 56(%esp), %ebx + xorl %ecx, %edx + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ebp, %edx + + movl %edx, %ebp + movl %esi, %ebx + roll $5, %ebp + xorl %eax, %ebx + andl %edi, %ebx + rorl $2, %edi + addl %ecx, %ebp + movl 60(%esp), %ecx + xorl %eax, %ebx + leal 1518500249(%ebp,%ecx,1),%ebp + addl %ebp, %ebx + + movl 8(%esp), %ecx + movl %edi, %ebp + xorl (%esp), %ecx + xorl %esi, %ebp + xorl 32(%esp), %ecx + andl %edx, %ebp + xorl 52(%esp), %ecx + rorl $2, %edx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, (%esp) + leal 1518500249(%ecx,%eax,1),%ecx + movl %ebx, %eax + addl %ebp, %ecx + roll $5, %eax + addl %eax, %ecx + + movl 12(%esp), %eax + movl %edx, %ebp + xorl 4(%esp), %eax + xorl %edi, %ebp + xorl 36(%esp), %eax + andl %ebx, %ebp + xorl 56(%esp), %eax + rorl $2, %ebx + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 4(%esp) + leal 1518500249(%eax,%esi,1),%eax + movl %ecx, %esi + addl %ebp, %eax + roll $5, %esi + addl %esi, %eax + + movl 16(%esp), %esi + movl %ebx, %ebp + xorl 8(%esp), %esi + xorl %edx, %ebp + xorl 40(%esp), %esi + andl %ecx, %ebp + xorl 60(%esp), %esi + rorl $2, %ecx + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 8(%esp) + leal 1518500249(%esi,%edi,1),%esi + movl %eax, %edi + addl %ebp, %esi + roll $5, %edi + addl %edi, %esi + + movl 20(%esp), %edi + movl %ecx, %ebp + xorl 12(%esp), %edi + xorl %ebx, %ebp + xorl 44(%esp), %edi + andl %eax, %ebp + xorl (%esp), %edi + rorl $2, %eax + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 12(%esp) + leal 1518500249(%edi,%edx,1),%edi + movl %esi, %edx + addl %ebp, %edi + roll $5, %edx + addl %edx, %edi + + movl 16(%esp), %edx + movl %esi, %ebp + xorl 24(%esp), %edx + rorl $2, %esi + xorl 48(%esp), %edx + xorl %eax, %ebp + xorl 4(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 16(%esp) + leal 1859775393(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 20(%esp), %ebx + movl %edi, %ebp + xorl 28(%esp), %ebx + rorl $2, %edi + xorl 52(%esp), %ebx + xorl %esi, %ebp + xorl 8(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 20(%esp) + leal 1859775393(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 24(%esp), %ecx + movl %edx, %ebp + xorl 32(%esp), %ecx + rorl $2, %edx + xorl 56(%esp), %ecx + xorl %edi, %ebp + xorl 12(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, 24(%esp) + leal 1859775393(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 28(%esp), %eax + movl %ebx, %ebp + xorl 36(%esp), %eax + rorl $2, %ebx + xorl 60(%esp), %eax + xorl %edx, %ebp + xorl 16(%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 28(%esp) + leal 1859775393(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 32(%esp), %esi + movl %ecx, %ebp + xorl 40(%esp), %esi + rorl $2, %ecx + xorl (%esp), %esi + xorl %ebx, %ebp + xorl 20(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 32(%esp) + leal 1859775393(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 36(%esp), %edi + movl %eax, %ebp + xorl 44(%esp), %edi + rorl $2, %eax + xorl 4(%esp), %edi + xorl %ecx, %ebp + xorl 24(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 36(%esp) + leal 1859775393(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl 40(%esp), %edx + movl %esi, %ebp + xorl 48(%esp), %edx + rorl $2, %esi + xorl 8(%esp), %edx + xorl %eax, %ebp + xorl 28(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 40(%esp) + leal 1859775393(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 44(%esp), %ebx + movl %edi, %ebp + xorl 52(%esp), %ebx + rorl $2, %edi + xorl 12(%esp), %ebx + xorl %esi, %ebp + xorl 32(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 44(%esp) + leal 1859775393(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 48(%esp), %ecx + movl %edx, %ebp + xorl 56(%esp), %ecx + rorl $2, %edx + xorl 16(%esp), %ecx + xorl %edi, %ebp + xorl 36(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, 48(%esp) + leal 1859775393(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 52(%esp), %eax + movl %ebx, %ebp + xorl 60(%esp), %eax + rorl $2, %ebx + xorl 20(%esp), %eax + xorl %edx, %ebp + xorl 40(%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 52(%esp) + leal 1859775393(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 56(%esp), %esi + movl %ecx, %ebp + xorl (%esp), %esi + rorl $2, %ecx + xorl 24(%esp), %esi + xorl %ebx, %ebp + xorl 44(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 56(%esp) + leal 1859775393(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 60(%esp), %edi + movl %eax, %ebp + xorl 4(%esp), %edi + rorl $2, %eax + xorl 28(%esp), %edi + xorl %ecx, %ebp + xorl 48(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 60(%esp) + leal 1859775393(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl (%esp), %edx + movl %esi, %ebp + xorl 8(%esp), %edx + rorl $2, %esi + xorl 32(%esp), %edx + xorl %eax, %ebp + xorl 52(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, (%esp) + leal 1859775393(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 4(%esp), %ebx + movl %edi, %ebp + xorl 12(%esp), %ebx + rorl $2, %edi + xorl 36(%esp), %ebx + xorl %esi, %ebp + xorl 56(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 4(%esp) + leal 1859775393(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 8(%esp), %ecx + movl %edx, %ebp + xorl 16(%esp), %ecx + rorl $2, %edx + xorl 40(%esp), %ecx + xorl %edi, %ebp + xorl 60(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, 8(%esp) + leal 1859775393(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 12(%esp), %eax + movl %ebx, %ebp + xorl 20(%esp), %eax + rorl $2, %ebx + xorl 44(%esp), %eax + xorl %edx, %ebp + xorl (%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 12(%esp) + leal 1859775393(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 16(%esp), %esi + movl %ecx, %ebp + xorl 24(%esp), %esi + rorl $2, %ecx + xorl 48(%esp), %esi + xorl %ebx, %ebp + xorl 4(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 16(%esp) + leal 1859775393(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 20(%esp), %edi + movl %eax, %ebp + xorl 28(%esp), %edi + rorl $2, %eax + xorl 52(%esp), %edi + xorl %ecx, %ebp + xorl 8(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 20(%esp) + leal 1859775393(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl 24(%esp), %edx + movl %esi, %ebp + xorl 32(%esp), %edx + rorl $2, %esi + xorl 56(%esp), %edx + xorl %eax, %ebp + xorl 12(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 24(%esp) + leal 1859775393(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 28(%esp), %ebx + movl %edi, %ebp + xorl 36(%esp), %ebx + rorl $2, %edi + xorl 60(%esp), %ebx + xorl %esi, %ebp + xorl 16(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 28(%esp) + leal 1859775393(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 32(%esp), %ecx + movl %edx, %ebp + xorl 40(%esp), %ecx + orl %edi, %ebp + xorl (%esp), %ecx + andl %esi, %ebp + xorl 20(%esp), %ecx +.byte 209 +.byte 193 + movl %ecx, 32(%esp) + leal 2400959708(%ecx,%eax,1),%ecx + movl %edx, %eax + rorl $2, %edx + andl %edi, %eax + orl %eax, %ebp + movl %ebx, %eax + roll $5, %eax + addl %eax, %ebp + addl %ebp, %ecx + + movl 36(%esp), %eax + movl %ebx, %ebp + xorl 44(%esp), %eax + orl %edx, %ebp + xorl 4(%esp), %eax + andl %edi, %ebp + xorl 24(%esp), %eax +.byte 209 +.byte 192 + movl %eax, 36(%esp) + leal 2400959708(%eax,%esi,1),%eax + movl %ebx, %esi + rorl $2, %ebx + andl %edx, %esi + orl %esi, %ebp + movl %ecx, %esi + roll $5, %esi + addl %esi, %ebp + addl %ebp, %eax + + movl 40(%esp), %esi + movl %ecx, %ebp + xorl 48(%esp), %esi + orl %ebx, %ebp + xorl 8(%esp), %esi + andl %edx, %ebp + xorl 28(%esp), %esi +.byte 209 +.byte 198 + movl %esi, 40(%esp) + leal 2400959708(%esi,%edi,1),%esi + movl %ecx, %edi + rorl $2, %ecx + andl %ebx, %edi + orl %edi, %ebp + movl %eax, %edi + roll $5, %edi + addl %edi, %ebp + addl %ebp, %esi + + movl 44(%esp), %edi + movl %eax, %ebp + xorl 52(%esp), %edi + orl %ecx, %ebp + xorl 12(%esp), %edi + andl %ebx, %ebp + xorl 32(%esp), %edi +.byte 209 +.byte 199 + movl %edi, 44(%esp) + leal 2400959708(%edi,%edx,1),%edi + movl %eax, %edx + rorl $2, %eax + andl %ecx, %edx + orl %edx, %ebp + movl %esi, %edx + roll $5, %edx + addl %edx, %ebp + addl %ebp, %edi + + movl 48(%esp), %edx + movl %esi, %ebp + xorl 56(%esp), %edx + orl %eax, %ebp + xorl 16(%esp), %edx + andl %ecx, %ebp + xorl 36(%esp), %edx +.byte 209 +.byte 194 + movl %edx, 48(%esp) + leal 2400959708(%edx,%ebx,1),%edx + movl %esi, %ebx + rorl $2, %esi + andl %eax, %ebx + orl %ebx, %ebp + movl %edi, %ebx + roll $5, %ebx + addl %ebx, %ebp + addl %ebp, %edx + + movl 52(%esp), %ebx + movl %edi, %ebp + xorl 60(%esp), %ebx + orl %esi, %ebp + xorl 20(%esp), %ebx + andl %eax, %ebp + xorl 40(%esp), %ebx +.byte 209 +.byte 195 + movl %ebx, 52(%esp) + leal 2400959708(%ebx,%ecx,1),%ebx + movl %edi, %ecx + rorl $2, %edi + andl %esi, %ecx + orl %ecx, %ebp + movl %edx, %ecx + roll $5, %ecx + addl %ecx, %ebp + addl %ebp, %ebx + + movl 56(%esp), %ecx + movl %edx, %ebp + xorl (%esp), %ecx + orl %edi, %ebp + xorl 24(%esp), %ecx + andl %esi, %ebp + xorl 44(%esp), %ecx +.byte 209 +.byte 193 + movl %ecx, 56(%esp) + leal 2400959708(%ecx,%eax,1),%ecx + movl %edx, %eax + rorl $2, %edx + andl %edi, %eax + orl %eax, %ebp + movl %ebx, %eax + roll $5, %eax + addl %eax, %ebp + addl %ebp, %ecx + + movl 60(%esp), %eax + movl %ebx, %ebp + xorl 4(%esp), %eax + orl %edx, %ebp + xorl 28(%esp), %eax + andl %edi, %ebp + xorl 48(%esp), %eax +.byte 209 +.byte 192 + movl %eax, 60(%esp) + leal 2400959708(%eax,%esi,1),%eax + movl %ebx, %esi + rorl $2, %ebx + andl %edx, %esi + orl %esi, %ebp + movl %ecx, %esi + roll $5, %esi + addl %esi, %ebp + addl %ebp, %eax + + movl (%esp), %esi + movl %ecx, %ebp + xorl 8(%esp), %esi + orl %ebx, %ebp + xorl 32(%esp), %esi + andl %edx, %ebp + xorl 52(%esp), %esi +.byte 209 +.byte 198 + movl %esi, (%esp) + leal 2400959708(%esi,%edi,1),%esi + movl %ecx, %edi + rorl $2, %ecx + andl %ebx, %edi + orl %edi, %ebp + movl %eax, %edi + roll $5, %edi + addl %edi, %ebp + addl %ebp, %esi + + movl 4(%esp), %edi + movl %eax, %ebp + xorl 12(%esp), %edi + orl %ecx, %ebp + xorl 36(%esp), %edi + andl %ebx, %ebp + xorl 56(%esp), %edi +.byte 209 +.byte 199 + movl %edi, 4(%esp) + leal 2400959708(%edi,%edx,1),%edi + movl %eax, %edx + rorl $2, %eax + andl %ecx, %edx + orl %edx, %ebp + movl %esi, %edx + roll $5, %edx + addl %edx, %ebp + addl %ebp, %edi + + movl 8(%esp), %edx + movl %esi, %ebp + xorl 16(%esp), %edx + orl %eax, %ebp + xorl 40(%esp), %edx + andl %ecx, %ebp + xorl 60(%esp), %edx +.byte 209 +.byte 194 + movl %edx, 8(%esp) + leal 2400959708(%edx,%ebx,1),%edx + movl %esi, %ebx + rorl $2, %esi + andl %eax, %ebx + orl %ebx, %ebp + movl %edi, %ebx + roll $5, %ebx + addl %ebx, %ebp + addl %ebp, %edx + + movl 12(%esp), %ebx + movl %edi, %ebp + xorl 20(%esp), %ebx + orl %esi, %ebp + xorl 44(%esp), %ebx + andl %eax, %ebp + xorl (%esp), %ebx +.byte 209 +.byte 195 + movl %ebx, 12(%esp) + leal 2400959708(%ebx,%ecx,1),%ebx + movl %edi, %ecx + rorl $2, %edi + andl %esi, %ecx + orl %ecx, %ebp + movl %edx, %ecx + roll $5, %ecx + addl %ecx, %ebp + addl %ebp, %ebx + + movl 16(%esp), %ecx + movl %edx, %ebp + xorl 24(%esp), %ecx + orl %edi, %ebp + xorl 48(%esp), %ecx + andl %esi, %ebp + xorl 4(%esp), %ecx +.byte 209 +.byte 193 + movl %ecx, 16(%esp) + leal 2400959708(%ecx,%eax,1),%ecx + movl %edx, %eax + rorl $2, %edx + andl %edi, %eax + orl %eax, %ebp + movl %ebx, %eax + roll $5, %eax + addl %eax, %ebp + addl %ebp, %ecx + + movl 20(%esp), %eax + movl %ebx, %ebp + xorl 28(%esp), %eax + orl %edx, %ebp + xorl 52(%esp), %eax + andl %edi, %ebp + xorl 8(%esp), %eax +.byte 209 +.byte 192 + movl %eax, 20(%esp) + leal 2400959708(%eax,%esi,1),%eax + movl %ebx, %esi + rorl $2, %ebx + andl %edx, %esi + orl %esi, %ebp + movl %ecx, %esi + roll $5, %esi + addl %esi, %ebp + addl %ebp, %eax + + movl 24(%esp), %esi + movl %ecx, %ebp + xorl 32(%esp), %esi + orl %ebx, %ebp + xorl 56(%esp), %esi + andl %edx, %ebp + xorl 12(%esp), %esi +.byte 209 +.byte 198 + movl %esi, 24(%esp) + leal 2400959708(%esi,%edi,1),%esi + movl %ecx, %edi + rorl $2, %ecx + andl %ebx, %edi + orl %edi, %ebp + movl %eax, %edi + roll $5, %edi + addl %edi, %ebp + addl %ebp, %esi + + movl 28(%esp), %edi + movl %eax, %ebp + xorl 36(%esp), %edi + orl %ecx, %ebp + xorl 60(%esp), %edi + andl %ebx, %ebp + xorl 16(%esp), %edi +.byte 209 +.byte 199 + movl %edi, 28(%esp) + leal 2400959708(%edi,%edx,1),%edi + movl %eax, %edx + rorl $2, %eax + andl %ecx, %edx + orl %edx, %ebp + movl %esi, %edx + roll $5, %edx + addl %edx, %ebp + addl %ebp, %edi + + movl 32(%esp), %edx + movl %esi, %ebp + xorl 40(%esp), %edx + orl %eax, %ebp + xorl (%esp), %edx + andl %ecx, %ebp + xorl 20(%esp), %edx +.byte 209 +.byte 194 + movl %edx, 32(%esp) + leal 2400959708(%edx,%ebx,1),%edx + movl %esi, %ebx + rorl $2, %esi + andl %eax, %ebx + orl %ebx, %ebp + movl %edi, %ebx + roll $5, %ebx + addl %ebx, %ebp + addl %ebp, %edx + + movl 36(%esp), %ebx + movl %edi, %ebp + xorl 44(%esp), %ebx + orl %esi, %ebp + xorl 4(%esp), %ebx + andl %eax, %ebp + xorl 24(%esp), %ebx +.byte 209 +.byte 195 + movl %ebx, 36(%esp) + leal 2400959708(%ebx,%ecx,1),%ebx + movl %edi, %ecx + rorl $2, %edi + andl %esi, %ecx + orl %ecx, %ebp + movl %edx, %ecx + roll $5, %ecx + addl %ecx, %ebp + addl %ebp, %ebx + + movl 40(%esp), %ecx + movl %edx, %ebp + xorl 48(%esp), %ecx + orl %edi, %ebp + xorl 8(%esp), %ecx + andl %esi, %ebp + xorl 28(%esp), %ecx +.byte 209 +.byte 193 + movl %ecx, 40(%esp) + leal 2400959708(%ecx,%eax,1),%ecx + movl %edx, %eax + rorl $2, %edx + andl %edi, %eax + orl %eax, %ebp + movl %ebx, %eax + roll $5, %eax + addl %eax, %ebp + addl %ebp, %ecx + + movl 44(%esp), %eax + movl %ebx, %ebp + xorl 52(%esp), %eax + orl %edx, %ebp + xorl 12(%esp), %eax + andl %edi, %ebp + xorl 32(%esp), %eax +.byte 209 +.byte 192 + movl %eax, 44(%esp) + leal 2400959708(%eax,%esi,1),%eax + movl %ebx, %esi + rorl $2, %ebx + andl %edx, %esi + orl %esi, %ebp + movl %ecx, %esi + roll $5, %esi + addl %esi, %ebp + addl %ebp, %eax + + movl 48(%esp), %esi + movl %ecx, %ebp + xorl 56(%esp), %esi + rorl $2, %ecx + xorl 16(%esp), %esi + xorl %ebx, %ebp + xorl 36(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 48(%esp) + leal 3395469782(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 52(%esp), %edi + movl %eax, %ebp + xorl 60(%esp), %edi + rorl $2, %eax + xorl 20(%esp), %edi + xorl %ecx, %ebp + xorl 40(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 52(%esp) + leal 3395469782(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl 56(%esp), %edx + movl %esi, %ebp + xorl (%esp), %edx + rorl $2, %esi + xorl 24(%esp), %edx + xorl %eax, %ebp + xorl 44(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 56(%esp) + leal 3395469782(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 60(%esp), %ebx + movl %edi, %ebp + xorl 4(%esp), %ebx + rorl $2, %edi + xorl 28(%esp), %ebx + xorl %esi, %ebp + xorl 48(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 60(%esp) + leal 3395469782(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl (%esp), %ecx + movl %edx, %ebp + xorl 8(%esp), %ecx + rorl $2, %edx + xorl 32(%esp), %ecx + xorl %edi, %ebp + xorl 52(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, (%esp) + leal 3395469782(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 4(%esp), %eax + movl %ebx, %ebp + xorl 12(%esp), %eax + rorl $2, %ebx + xorl 36(%esp), %eax + xorl %edx, %ebp + xorl 56(%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 4(%esp) + leal 3395469782(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 8(%esp), %esi + movl %ecx, %ebp + xorl 16(%esp), %esi + rorl $2, %ecx + xorl 40(%esp), %esi + xorl %ebx, %ebp + xorl 60(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 8(%esp) + leal 3395469782(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 12(%esp), %edi + movl %eax, %ebp + xorl 20(%esp), %edi + rorl $2, %eax + xorl 44(%esp), %edi + xorl %ecx, %ebp + xorl (%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 12(%esp) + leal 3395469782(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl 16(%esp), %edx + movl %esi, %ebp + xorl 24(%esp), %edx + rorl $2, %esi + xorl 48(%esp), %edx + xorl %eax, %ebp + xorl 4(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 16(%esp) + leal 3395469782(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 20(%esp), %ebx + movl %edi, %ebp + xorl 28(%esp), %ebx + rorl $2, %edi + xorl 52(%esp), %ebx + xorl %esi, %ebp + xorl 8(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 20(%esp) + leal 3395469782(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 24(%esp), %ecx + movl %edx, %ebp + xorl 32(%esp), %ecx + rorl $2, %edx + xorl 56(%esp), %ecx + xorl %edi, %ebp + xorl 12(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, 24(%esp) + leal 3395469782(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 28(%esp), %eax + movl %ebx, %ebp + xorl 36(%esp), %eax + rorl $2, %ebx + xorl 60(%esp), %eax + xorl %edx, %ebp + xorl 16(%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 28(%esp) + leal 3395469782(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 32(%esp), %esi + movl %ecx, %ebp + xorl 40(%esp), %esi + rorl $2, %ecx + xorl (%esp), %esi + xorl %ebx, %ebp + xorl 20(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 32(%esp) + leal 3395469782(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 36(%esp), %edi + movl %eax, %ebp + xorl 44(%esp), %edi + rorl $2, %eax + xorl 4(%esp), %edi + xorl %ecx, %ebp + xorl 24(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 36(%esp) + leal 3395469782(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + movl 40(%esp), %edx + movl %esi, %ebp + xorl 48(%esp), %edx + rorl $2, %esi + xorl 8(%esp), %edx + xorl %eax, %ebp + xorl 28(%esp), %edx + xorl %ecx, %ebp +.byte 209 +.byte 194 + movl %edx, 40(%esp) + leal 3395469782(%edx,%ebx,1),%edx + movl %edi, %ebx + roll $5, %ebx + addl %ebp, %edx + addl %ebx, %edx + + movl 44(%esp), %ebx + movl %edi, %ebp + xorl 52(%esp), %ebx + rorl $2, %edi + xorl 12(%esp), %ebx + xorl %esi, %ebp + xorl 32(%esp), %ebx + xorl %eax, %ebp +.byte 209 +.byte 195 + movl %ebx, 44(%esp) + leal 3395469782(%ebx,%ecx,1),%ebx + movl %edx, %ecx + roll $5, %ecx + addl %ebp, %ebx + addl %ecx, %ebx + + movl 48(%esp), %ecx + movl %edx, %ebp + xorl 56(%esp), %ecx + rorl $2, %edx + xorl 16(%esp), %ecx + xorl %edi, %ebp + xorl 36(%esp), %ecx + xorl %esi, %ebp +.byte 209 +.byte 193 + movl %ecx, 48(%esp) + leal 3395469782(%ecx,%eax,1),%ecx + movl %ebx, %eax + roll $5, %eax + addl %ebp, %ecx + addl %eax, %ecx + + movl 52(%esp), %eax + movl %ebx, %ebp + xorl 60(%esp), %eax + rorl $2, %ebx + xorl 20(%esp), %eax + xorl %edx, %ebp + xorl 40(%esp), %eax + xorl %edi, %ebp +.byte 209 +.byte 192 + movl %eax, 52(%esp) + leal 3395469782(%eax,%esi,1),%eax + movl %ecx, %esi + roll $5, %esi + addl %ebp, %eax + addl %esi, %eax + + movl 56(%esp), %esi + movl %ecx, %ebp + xorl (%esp), %esi + rorl $2, %ecx + xorl 24(%esp), %esi + xorl %ebx, %ebp + xorl 44(%esp), %esi + xorl %edx, %ebp +.byte 209 +.byte 198 + movl %esi, 56(%esp) + leal 3395469782(%esi,%edi,1),%esi + movl %eax, %edi + roll $5, %edi + addl %ebp, %esi + addl %edi, %esi + + movl 60(%esp), %edi + movl %eax, %ebp + xorl 4(%esp), %edi + rorl $2, %eax + xorl 28(%esp), %edi + xorl %ecx, %ebp + xorl 48(%esp), %edi + xorl %ebx, %ebp +.byte 209 +.byte 199 + movl %edi, 60(%esp) + leal 3395469782(%edi,%edx,1),%edi + movl %esi, %edx + roll $5, %edx + addl %ebp, %edi + addl %edx, %edi + + + movl 128(%esp), %ebp + movl 12(%ebp), %edx + addl %ecx, %edx + movl 4(%ebp), %ecx + addl %esi, %ecx + movl %eax, %esi + movl (%ebp), %eax + movl %edx, 12(%ebp) + addl %edi, %eax + movl 16(%ebp), %edi + addl %ebx, %edi + movl 8(%ebp), %ebx + addl %esi, %ebx + movl %eax, (%ebp) + movl 132(%esp), %esi + movl %ebx, 8(%ebp) + addl $64, %esi + movl 68(%esp), %eax + movl %edi, 16(%ebp) + cmpl %eax, %esi + movl %ecx, 4(%ebp) + jl .L000start + addl $108, %esp + popl %edi + popl %ebx + popl %ebp + popl %esi + ret +.L_sha1_block_asm_data_order_end: + .size sha1_block_asm_data_order,.L_sha1_block_asm_data_order_end-sha1_block_asm_data_order +.ident "desasm.pl" +.text + .align 16 +.globl sha1_block_asm_host_order + .type sha1_block_asm_host_order,@function +sha1_block_asm_host_order: + movl 12(%esp), %ecx + pushl %esi + sall $6, %ecx + movl 12(%esp), %esi + pushl %ebp + addl %esi, %ecx + pushl %ebx + movl 16(%esp), %ebp + pushl %edi + movl 12(%ebp), %edx + subl $108, %esp + movl 16(%ebp), %edi + movl 8(%ebp), %ebx + movl %ecx, 68(%esp) + + movl (%esi), %eax + movl 4(%esi), %ecx + movl %eax, (%esp) + movl %ecx, 4(%esp) + movl 8(%esi), %eax + movl 12(%esi), %ecx + movl %eax, 8(%esp) + movl %ecx, 12(%esp) + movl 16(%esi), %eax + movl 20(%esi), %ecx + movl %eax, 16(%esp) + movl %ecx, 20(%esp) + movl 24(%esi), %eax + movl 28(%esi), %ecx + movl %eax, 24(%esp) + movl %ecx, 28(%esp) + movl 32(%esi), %eax + movl 36(%esi), %ecx + movl %eax, 32(%esp) + movl %ecx, 36(%esp) + movl 40(%esi), %eax + movl 44(%esi), %ecx + movl %eax, 40(%esp) + movl %ecx, 44(%esp) + movl 48(%esi), %eax + movl 52(%esi), %ecx + movl %eax, 48(%esp) + movl %ecx, 52(%esp) + movl 56(%esi), %eax + movl 60(%esi), %ecx + movl %eax, 56(%esp) + movl %ecx, 60(%esp) + jmp .L001shortcut +.L_sha1_block_asm_host_order_end: + .size sha1_block_asm_host_order,.L_sha1_block_asm_host_order_end-sha1_block_asm_host_order +.ident "desasm.pl" diff --git a/fips/sha1/fingerprint.sha1 b/fips/sha1/fingerprint.sha1 index a43dccb423..9528c639df 100644 --- a/fips/sha1/fingerprint.sha1 +++ b/fips/sha1/fingerprint.sha1 @@ -1,4 +1,4 @@ -HMAC-SHA1(fips_sha1dgst.c)= 87dd5198b5ab3df38549422d3313126085589b60 +HMAC-SHA1(fips_sha1dgst.c)= 10575600a9540eb15188a7d3b0b031e60aedbc18 HMAC-SHA1(fips_sha1_selftest.c)= 9719f7e68950250ce4b7726be3e560c24cd72a32 HMAC-SHA1(fips_sha_locl.h)= 199ceca9016ba5514997ce1fcd22be7d4f66e9b5 HMAC-SHA1(fips_md32_common.h)= 4dd5d27e9bedbbaab6c6c5536b254e040137471e diff --git a/fips/sha1/fips_sha1dgst.c b/fips/sha1/fips_sha1dgst.c index 2ca2f75fa8..dc2ce7daf0 100644 --- a/fips/sha1/fips_sha1dgst.c +++ b/fips/sha1/fips_sha1dgst.c @@ -68,7 +68,6 @@ const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT; /* The implementation is in fips_md32_common.h */ - #include "fips_sha_locl.h" #else /* ndef OPENSSL_FIPS */ diff --git a/fips/sha1/standalone.sha1 b/fips/sha1/standalone.sha1 index efbb87cb06..63a1b37539 100644 --- a/fips/sha1/standalone.sha1 +++ b/fips/sha1/standalone.sha1 @@ -1,4 +1,4 @@ -HMAC-SHA1(fips_sha1dgst.c)= 87dd5198b5ab3df38549422d3313126085589b60 +HMAC-SHA1(fips_sha1dgst.c)= 10575600a9540eb15188a7d3b0b031e60aedbc18 HMAC-SHA1(fips_sha1_selftest.c)= 9719f7e68950250ce4b7726be3e560c24cd72a32 HMAC-SHA1(fips_standalone_sha1.c)= c17f83ccfe601558b33b6df27d2d82887b8c9dc2 HMAC-SHA1(fips_sha_locl.h)= 199ceca9016ba5514997ce1fcd22be7d4f66e9b5 -- 2.25.1