From 1192c4575ea7afdf38e3fa0df4587a08620af11e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Jul 2020 10:00:46 +0200 Subject: SZS v2.18a --- project/src/crypto/md32_common.h | 408 ++++++++++ project/src/crypto/sha1-586-cygwin.s | 1441 +++++++++++++++++++++++++++++++++ project/src/crypto/sha1-586-elf.s | 1442 ++++++++++++++++++++++++++++++++++ project/src/crypto/sha1-x86_64.s | 1282 ++++++++++++++++++++++++++++++ project/src/crypto/sha1_one.c | 74 ++ project/src/crypto/sha1dgst.c | 64 ++ project/src/crypto/sha_locl.h | 435 ++++++++++ project/src/crypto/ssl-asm.S | 39 + project/src/crypto/ssl-asm.h | 56 ++ project/src/crypto/wiimm-sha.h | 204 +++++ 10 files changed, 5445 insertions(+) create mode 100644 project/src/crypto/md32_common.h create mode 100644 project/src/crypto/sha1-586-cygwin.s create mode 100644 project/src/crypto/sha1-586-elf.s create mode 100644 project/src/crypto/sha1-x86_64.s create mode 100644 project/src/crypto/sha1_one.c create mode 100644 project/src/crypto/sha1dgst.c create mode 100644 project/src/crypto/sha_locl.h create mode 100644 project/src/crypto/ssl-asm.S create mode 100644 project/src/crypto/ssl-asm.h create mode 100644 project/src/crypto/wiimm-sha.h (limited to 'project/src/crypto') diff --git a/project/src/crypto/md32_common.h b/project/src/crypto/md32_common.h new file mode 100644 index 0000000..7525d04 --- /dev/null +++ b/project/src/crypto/md32_common.h @@ -0,0 +1,408 @@ +/* crypto/md32_common.h */ +/* ==================================================================== + * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. + * + * 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 above 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 acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * licensing@OpenSSL.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED 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 OpenSSL PROJECT OR + * ITS 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. + * ==================================================================== + * + */ + +/* + * This is a generic 32 bit "collector" for message digest algorithms. + * Whenever needed it collects input character stream into chunks of + * 32 bit values and invokes a block function that performs actual hash + * calculations. + * + * Porting guide. + * + * Obligatory macros: + * + * DATA_ORDER_IS_BIG_ENDIAN or DATA_ORDER_IS_LITTLE_ENDIAN + * this macro defines byte order of input stream. + * HASH_CBLOCK + * size of a unit chunk HASH_BLOCK operates on. + * HASH_LONG + * has to be at lest 32 bit wide, if it's wider, then + * HASH_LONG_LOG2 *has to* be defined along + * HASH_CTX + * context structure that at least contains following + * members: + * typedef struct { + * ... + * HASH_LONG Nl,Nh; + * either { + * HASH_LONG data[HASH_LBLOCK]; + * unsigned char data[HASH_CBLOCK]; + * }; + * unsigned int num; + * ... + * } HASH_CTX; + * data[] vector is expected to be zeroed upon first call to + * HASH_UPDATE. + * HASH_UPDATE + * name of "Update" function, implemented here. + * HASH_TRANSFORM + * name of "Transform" function, implemented here. + * HASH_FINAL + * name of "Final" function, implemented here. + * HASH_BLOCK_DATA_ORDER + * name of "block" function capable of treating *unaligned* input + * message in original (data) byte order, implemented externally. + * HASH_MAKE_STRING + * macro convering context variables to an ASCII hash string. + * + * MD5 example: + * + * #define DATA_ORDER_IS_LITTLE_ENDIAN + * + * #define HASH_LONG MD5_LONG + * #define HASH_LONG_LOG2 MD5_LONG_LOG2 + * #define HASH_CTX MD5_CTX + * #define HASH_CBLOCK MD5_CBLOCK + * #define HASH_UPDATE MD5_Update + * #define HASH_TRANSFORM MD5_Transform + * #define HASH_FINAL MD5_Final + * #define HASH_BLOCK_DATA_ORDER md5_block_data_order + * + * + */ + +#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) +#error "DATA_ORDER must be defined!" +#endif + +#ifndef HASH_CBLOCK +#error "HASH_CBLOCK must be defined!" +#endif +#ifndef HASH_LONG +#error "HASH_LONG must be defined!" +#endif +#ifndef HASH_CTX +#error "HASH_CTX must be defined!" +#endif + +#ifndef HASH_UPDATE +#error "HASH_UPDATE must be defined!" +#endif +#ifndef HASH_TRANSFORM +#error "HASH_TRANSFORM must be defined!" +#endif +#ifndef HASH_FINAL +#error "HASH_FINAL must be defined!" +#endif + +#ifndef HASH_BLOCK_DATA_ORDER +#error "HASH_BLOCK_DATA_ORDER must be defined!" +#endif + +/* + * Engage compiler specific rotate intrinsic function if available. + */ +#undef ROTATE +#ifndef PEDANTIC +# if defined(_MSC_VER) || defined(__ICC) +# define ROTATE(a,n) _lrotl(a,n) +# elif defined(__MWERKS__) +# if defined(__POWERPC__) +# define ROTATE(a,n) __rlwinm(a,n,0,31) +# elif defined(__MC68K__) + /* Motorola specific tweak. */ +# define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) ) +# else +# define ROTATE(a,n) __rol(a,n) +# endif +# elif defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) + /* + * Some GNU C inline assembler templates. Note that these are + * rotates by *constant* number of bits! But that's exactly + * what we need here... + * + */ +# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) +# define ROTATE(a,n) ({ register unsigned int ret; \ + asm ( \ + "roll %1,%0" \ + : "=r"(ret) \ + : "I"(n), "0"((unsigned int)(a)) \ + : "cc"); \ + ret; \ + }) +# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ + defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) +# define ROTATE(a,n) ({ register unsigned int ret; \ + asm ( \ + "rlwinm %0,%1,%2,0,31" \ + : "=r"(ret) \ + : "r"(a), "I"(n)); \ + ret; \ + }) +# elif defined(__s390x__) +# define ROTATE(a,n) ({ register unsigned int ret; \ + asm ("rll %0,%1,%2" \ + : "=r"(ret) \ + : "r"(a), "I"(n)); \ + ret; \ + }) +# endif +# endif +#endif /* PEDANTIC */ + +#ifndef ROTATE +#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) +#endif + +#if defined(DATA_ORDER_IS_BIG_ENDIAN) + +#ifndef PEDANTIC +# if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) +# if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ + (defined(__x86_64) || defined(__x86_64__)) +# if !defined(B_ENDIAN) + /* + * This gives ~30-40% performance improvement in SHA-256 compiled + * with gcc [on P4]. Well, first macro to be frank. We can pull + * this trick on x86* platforms only, because these CPUs can fetch + * unaligned data without raising an exception. + */ +# define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ + asm ("bswapl %0":"=r"(r):"0"(r)); \ + (c)+=4; (l)=r; }) +# define HOST_l2c(l,c) ({ unsigned int r=(l); \ + asm ("bswapl %0":"=r"(r):"0"(r)); \ + *((unsigned int *)(c))=r; (c)+=4; r; }) +# endif +# endif +# endif +#endif +#if defined(__s390__) || defined(__s390x__) +# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l)) +# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l)) +#endif + +#ifndef HOST_c2l +#define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++)))<<24), \ + l|=(((unsigned long)(*((c)++)))<<16), \ + l|=(((unsigned long)(*((c)++)))<< 8), \ + l|=(((unsigned long)(*((c)++))) ), \ + l) +#endif +#ifndef HOST_l2c +#define HOST_l2c(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ + *((c)++)=(unsigned char)(((l)>>16)&0xff), \ + *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ + *((c)++)=(unsigned char)(((l) )&0xff), \ + l) +#endif + +#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) + +#ifndef PEDANTIC +# if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) +# if defined(__s390x__) +# define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ + :"=d"(l) :"m"(*(const unsigned int *)(c)));\ + (c)+=4; (l); }) +# define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ + :"=m"(*(unsigned int *)(c)) :"d"(l));\ + (c)+=4; (l); }) +# endif +# endif +#endif +#if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) +# ifndef B_ENDIAN + /* See comment in DATA_ORDER_IS_BIG_ENDIAN section. */ +# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, l) +# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, l) +# endif +#endif + +#ifndef HOST_c2l +#define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++))) ), \ + l|=(((unsigned long)(*((c)++)))<< 8), \ + l|=(((unsigned long)(*((c)++)))<<16), \ + l|=(((unsigned long)(*((c)++)))<<24), \ + l) +#endif +#ifndef HOST_l2c +#define HOST_l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ + *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ + *((c)++)=(unsigned char)(((l)>>16)&0xff), \ + *((c)++)=(unsigned char)(((l)>>24)&0xff), \ + l) +#endif + +#endif + +/* + * Time for some action:-) + */ + +int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len) + { + const unsigned char *data=data_; + unsigned char *p; + HASH_LONG l; + size_t n; + + if (len==0) return 1; + + l=(c->Nl+(((HASH_LONG)len)<<3))&0xffffffffUL; + /* 95-05-24 eay Fixed a bug with the overflow handling, thanks to + * Wei Dai for pointing it out. */ + if (l < c->Nl) /* overflow */ + c->Nh++; + c->Nh+=(HASH_LONG)(len>>29); /* might cause compiler warning on 16-bit */ + c->Nl=l; + + n = c->num; + if (n != 0) + { + p=(unsigned char *)c->data; + + if (len >= HASH_CBLOCK || len+n >= HASH_CBLOCK) + { + memcpy (p+n,data,HASH_CBLOCK-n); + HASH_BLOCK_DATA_ORDER (c,p,1); + n = HASH_CBLOCK-n; + data += n; + len -= n; + c->num = 0; + memset (p,0,HASH_CBLOCK); /* keep it zeroed */ + } + else + { + memcpy (p+n,data,len); + c->num += (unsigned int)len; + return 1; + } + } + + n = len/HASH_CBLOCK; + if (n > 0) + { + HASH_BLOCK_DATA_ORDER (c,data,n); + n *= HASH_CBLOCK; + data += n; + len -= n; + } + + if (len != 0) + { + p = (unsigned char *)c->data; + c->num = (unsigned int)len; + memcpy (p,data,len); + } + return 1; + } + + +void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data) + { + HASH_BLOCK_DATA_ORDER (c,data,1); + } + + +int HASH_FINAL (unsigned char *md, HASH_CTX *c) + { + unsigned char *p = (unsigned char *)c->data; + size_t n = c->num; + + p[n] = 0x80; /* there is always room for one */ + n++; + + if (n > (HASH_CBLOCK-8)) + { + memset (p+n,0,HASH_CBLOCK-n); + n=0; + HASH_BLOCK_DATA_ORDER (c,p,1); + } + memset (p+n,0,HASH_CBLOCK-8-n); + + p += HASH_CBLOCK-8; +#if defined(DATA_ORDER_IS_BIG_ENDIAN) + (void)HOST_l2c(c->Nh,p); + (void)HOST_l2c(c->Nl,p); +#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) + (void)HOST_l2c(c->Nl,p); + (void)HOST_l2c(c->Nh,p); +#endif + p -= HASH_CBLOCK; + HASH_BLOCK_DATA_ORDER (c,p,1); + c->num=0; + memset (p,0,HASH_CBLOCK); + +#ifndef HASH_MAKE_STRING +#error "HASH_MAKE_STRING must be defined!" +#else + HASH_MAKE_STRING(c,md); +#endif + + return 1; + } + +#ifndef MD32_REG_T +#define MD32_REG_T long +/* + * This comment was originaly written for MD5, which is why it + * discusses A-D. But it basically applies to all 32-bit digests, + * which is why it was moved to common header file. + * + * In case you wonder why A-D are declared as long and not + * as MD5_LONG. Doing so results in slight performance + * boost on LP64 architectures. The catch is we don't + * really care if 32 MSBs of a 64-bit register get polluted + * with eventual overflows as we *save* only 32 LSBs in + * *either* case. Now declaring 'em long excuses the compiler + * from keeping 32 MSBs zeroed resulting in 13% performance + * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. + * Well, to be honest it should say that this *prevents* + * performance degradation. + * + * Apparently there're LP64 compilers that generate better + * code if A-D are declared int. Most notably GCC-x86_64 + * generates better code. + * + */ +#endif diff --git a/project/src/crypto/sha1-586-cygwin.s b/project/src/crypto/sha1-586-cygwin.s new file mode 100644 index 0000000..2751a8f --- /dev/null +++ b/project/src/crypto/sha1-586-cygwin.s @@ -0,0 +1,1441 @@ +.file "sha1-586.s" +.text +.globl _wit_sha1_block_data_order +.def _wit_sha1_block_data_order; .scl 2; .type 32; .endef +.align 16 +_wit_sha1_block_data_order: +.L_wit_sha1_block_data_order_begin: + pushl %ebp + pushl %ebx + pushl %esi + pushl %edi + movl 20(%esp),%ebp + movl 24(%esp),%esi + movl 28(%esp),%eax + subl $64,%esp + shll $6,%eax + addl %esi,%eax + movl %eax,92(%esp) + movl 16(%ebp),%edi +.align 16 +.L000loop: + movl (%esi),%eax + movl 4(%esi),%ebx + movl 8(%esi),%ecx + movl 12(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,(%esp) + movl %ebx,4(%esp) + movl %ecx,8(%esp) + movl %edx,12(%esp) + movl 16(%esi),%eax + movl 20(%esi),%ebx + movl 24(%esi),%ecx + movl 28(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,16(%esp) + movl %ebx,20(%esp) + movl %ecx,24(%esp) + movl %edx,28(%esp) + movl 32(%esi),%eax + movl 36(%esi),%ebx + movl 40(%esi),%ecx + movl 44(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,32(%esp) + movl %ebx,36(%esp) + movl %ecx,40(%esp) + movl %edx,44(%esp) + movl 48(%esi),%eax + movl 52(%esi),%ebx + movl 56(%esi),%ecx + movl 60(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,48(%esp) + movl %ebx,52(%esp) + movl %ecx,56(%esp) + movl %edx,60(%esp) + movl %esi,88(%esp) + movl (%ebp),%eax + movl 4(%ebp),%ebx + movl 8(%ebp),%ecx + movl 12(%ebp),%edx + # 00_15 0 + movl %ecx,%esi + movl %eax,%ebp + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl (%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + # 00_15 1 + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 4(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + # 00_15 2 + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 8(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + # 00_15 3 + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 12(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ecx,%ebp + # 00_15 4 + movl %edi,%ebx + movl %ebp,%ecx + roll $5,%ebp + xorl %esi,%ebx + addl %eax,%ebp + andl %edx,%ebx + movl 16(%esp),%eax + xorl %esi,%ebx + rorl $2,%edx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebx,%ebp + # 00_15 5 + movl %edx,%eax + movl %ebp,%ebx + roll $5,%ebp + xorl %edi,%eax + addl %esi,%ebp + andl %ecx,%eax + movl 20(%esp),%esi + xorl %edi,%eax + rorl $2,%ecx + leal 1518500249(%ebp,%esi,1),%ebp + addl %eax,%ebp + # 00_15 6 + movl %ecx,%esi + movl %ebp,%eax + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl 24(%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + # 00_15 7 + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 28(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + # 00_15 8 + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 32(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + # 00_15 9 + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 36(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ecx,%ebp + # 00_15 10 + movl %edi,%ebx + movl %ebp,%ecx + roll $5,%ebp + xorl %esi,%ebx + addl %eax,%ebp + andl %edx,%ebx + movl 40(%esp),%eax + xorl %esi,%ebx + rorl $2,%edx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebx,%ebp + # 00_15 11 + movl %edx,%eax + movl %ebp,%ebx + roll $5,%ebp + xorl %edi,%eax + addl %esi,%ebp + andl %ecx,%eax + movl 44(%esp),%esi + xorl %edi,%eax + rorl $2,%ecx + leal 1518500249(%ebp,%esi,1),%ebp + addl %eax,%ebp + # 00_15 12 + movl %ecx,%esi + movl %ebp,%eax + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl 48(%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + # 00_15 13 + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 52(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + # 00_15 14 + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 56(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + # 00_15 15 + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 60(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ebp,%ecx + # 16_19 16 + movl (%esp),%ebx + movl %edi,%ebp + xorl 8(%esp),%ebx + xorl %esi,%ebp + xorl 32(%esp),%ebx + andl %edx,%ebp + rorl $2,%edx + xorl 52(%esp),%ebx + roll $1,%ebx + xorl %esi,%ebp + movl %ebx,(%esp) + leal 1518500249(%ebx,%eax,1),%ebx + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + # 16_19 17 + movl 4(%esp),%eax + movl %edx,%ebp + xorl 12(%esp),%eax + xorl %edi,%ebp + xorl 36(%esp),%eax + andl %ecx,%ebp + rorl $2,%ecx + xorl 56(%esp),%eax + roll $1,%eax + xorl %edi,%ebp + movl %eax,4(%esp) + leal 1518500249(%eax,%esi,1),%eax + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + # 16_19 18 + movl 8(%esp),%esi + movl %ecx,%ebp + xorl 16(%esp),%esi + xorl %edx,%ebp + xorl 40(%esp),%esi + andl %ebx,%ebp + rorl $2,%ebx + xorl 60(%esp),%esi + roll $1,%esi + xorl %edx,%ebp + movl %esi,8(%esp) + leal 1518500249(%esi,%edi,1),%esi + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + # 16_19 19 + movl 12(%esp),%edi + movl %ebx,%ebp + xorl 20(%esp),%edi + xorl %ecx,%ebp + xorl 44(%esp),%edi + andl %eax,%ebp + rorl $2,%eax + xorl (%esp),%edi + roll $1,%edi + xorl %ecx,%ebp + movl %edi,12(%esp) + leal 1518500249(%edi,%edx,1),%edi + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + # 20_39 20 + movl %esi,%ebp + movl 16(%esp),%edx + rorl $2,%esi + xorl 24(%esp),%edx + xorl %eax,%ebp + xorl 48(%esp),%edx + xorl %ebx,%ebp + xorl 4(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,16(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 21 + movl %edi,%ebp + movl 20(%esp),%ecx + rorl $2,%edi + xorl 28(%esp),%ecx + xorl %esi,%ebp + xorl 52(%esp),%ecx + xorl %eax,%ebp + xorl 8(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,20(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 22 + movl %edx,%ebp + movl 24(%esp),%ebx + rorl $2,%edx + xorl 32(%esp),%ebx + xorl %edi,%ebp + xorl 56(%esp),%ebx + xorl %esi,%ebp + xorl 12(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,24(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 23 + movl %ecx,%ebp + movl 28(%esp),%eax + rorl $2,%ecx + xorl 36(%esp),%eax + xorl %edx,%ebp + xorl 60(%esp),%eax + xorl %edi,%ebp + xorl 16(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,28(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 24 + movl %ebx,%ebp + movl 32(%esp),%esi + rorl $2,%ebx + xorl 40(%esp),%esi + xorl %ecx,%ebp + xorl (%esp),%esi + xorl %edx,%ebp + xorl 20(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,32(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 25 + movl %eax,%ebp + movl 36(%esp),%edi + rorl $2,%eax + xorl 44(%esp),%edi + xorl %ebx,%ebp + xorl 4(%esp),%edi + xorl %ecx,%ebp + xorl 24(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,36(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 26 + movl %esi,%ebp + movl 40(%esp),%edx + rorl $2,%esi + xorl 48(%esp),%edx + xorl %eax,%ebp + xorl 8(%esp),%edx + xorl %ebx,%ebp + xorl 28(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,40(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 27 + movl %edi,%ebp + movl 44(%esp),%ecx + rorl $2,%edi + xorl 52(%esp),%ecx + xorl %esi,%ebp + xorl 12(%esp),%ecx + xorl %eax,%ebp + xorl 32(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,44(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 28 + movl %edx,%ebp + movl 48(%esp),%ebx + rorl $2,%edx + xorl 56(%esp),%ebx + xorl %edi,%ebp + xorl 16(%esp),%ebx + xorl %esi,%ebp + xorl 36(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,48(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 29 + movl %ecx,%ebp + movl 52(%esp),%eax + rorl $2,%ecx + xorl 60(%esp),%eax + xorl %edx,%ebp + xorl 20(%esp),%eax + xorl %edi,%ebp + xorl 40(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,52(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 30 + movl %ebx,%ebp + movl 56(%esp),%esi + rorl $2,%ebx + xorl (%esp),%esi + xorl %ecx,%ebp + xorl 24(%esp),%esi + xorl %edx,%ebp + xorl 44(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,56(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 31 + movl %eax,%ebp + movl 60(%esp),%edi + rorl $2,%eax + xorl 4(%esp),%edi + xorl %ebx,%ebp + xorl 28(%esp),%edi + xorl %ecx,%ebp + xorl 48(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,60(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 32 + movl %esi,%ebp + movl (%esp),%edx + rorl $2,%esi + xorl 8(%esp),%edx + xorl %eax,%ebp + xorl 32(%esp),%edx + xorl %ebx,%ebp + xorl 52(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 33 + movl %edi,%ebp + movl 4(%esp),%ecx + rorl $2,%edi + xorl 12(%esp),%ecx + xorl %esi,%ebp + xorl 36(%esp),%ecx + xorl %eax,%ebp + xorl 56(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,4(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 34 + movl %edx,%ebp + movl 8(%esp),%ebx + rorl $2,%edx + xorl 16(%esp),%ebx + xorl %edi,%ebp + xorl 40(%esp),%ebx + xorl %esi,%ebp + xorl 60(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,8(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 35 + movl %ecx,%ebp + movl 12(%esp),%eax + rorl $2,%ecx + xorl 20(%esp),%eax + xorl %edx,%ebp + xorl 44(%esp),%eax + xorl %edi,%ebp + xorl (%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,12(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 36 + movl %ebx,%ebp + movl 16(%esp),%esi + rorl $2,%ebx + xorl 24(%esp),%esi + xorl %ecx,%ebp + xorl 48(%esp),%esi + xorl %edx,%ebp + xorl 4(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,16(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 37 + movl %eax,%ebp + movl 20(%esp),%edi + rorl $2,%eax + xorl 28(%esp),%edi + xorl %ebx,%ebp + xorl 52(%esp),%edi + xorl %ecx,%ebp + xorl 8(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,20(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 38 + movl %esi,%ebp + movl 24(%esp),%edx + rorl $2,%esi + xorl 32(%esp),%edx + xorl %eax,%ebp + xorl 56(%esp),%edx + xorl %ebx,%ebp + xorl 12(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,24(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 39 + movl %edi,%ebp + movl 28(%esp),%ecx + rorl $2,%edi + xorl 36(%esp),%ecx + xorl %esi,%ebp + xorl 60(%esp),%ecx + xorl %eax,%ebp + xorl 16(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,28(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 40_59 40 + movl 32(%esp),%ebx + movl 40(%esp),%ebp + xorl %ebp,%ebx + movl (%esp),%ebp + xorl %ebp,%ebx + movl 20(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,32(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + # 40_59 41 + movl 36(%esp),%eax + movl 44(%esp),%ebp + xorl %ebp,%eax + movl 4(%esp),%ebp + xorl %ebp,%eax + movl 24(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,36(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + # 40_59 42 + movl 40(%esp),%esi + movl 48(%esp),%ebp + xorl %ebp,%esi + movl 8(%esp),%ebp + xorl %ebp,%esi + movl 28(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,40(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + # 40_59 43 + movl 44(%esp),%edi + movl 52(%esp),%ebp + xorl %ebp,%edi + movl 12(%esp),%ebp + xorl %ebp,%edi + movl 32(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,44(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + # 40_59 44 + movl 48(%esp),%edx + movl 56(%esp),%ebp + xorl %ebp,%edx + movl 16(%esp),%ebp + xorl %ebp,%edx + movl 36(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,48(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + # 40_59 45 + movl 52(%esp),%ecx + movl 60(%esp),%ebp + xorl %ebp,%ecx + movl 20(%esp),%ebp + xorl %ebp,%ecx + movl 40(%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,52(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + # 40_59 46 + movl 56(%esp),%ebx + movl (%esp),%ebp + xorl %ebp,%ebx + movl 24(%esp),%ebp + xorl %ebp,%ebx + movl 44(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,56(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + # 40_59 47 + movl 60(%esp),%eax + movl 4(%esp),%ebp + xorl %ebp,%eax + movl 28(%esp),%ebp + xorl %ebp,%eax + movl 48(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,60(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + # 40_59 48 + movl (%esp),%esi + movl 8(%esp),%ebp + xorl %ebp,%esi + movl 32(%esp),%ebp + xorl %ebp,%esi + movl 52(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + # 40_59 49 + movl 4(%esp),%edi + movl 12(%esp),%ebp + xorl %ebp,%edi + movl 36(%esp),%ebp + xorl %ebp,%edi + movl 56(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,4(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + # 40_59 50 + movl 8(%esp),%edx + movl 16(%esp),%ebp + xorl %ebp,%edx + movl 40(%esp),%ebp + xorl %ebp,%edx + movl 60(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,8(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + # 40_59 51 + movl 12(%esp),%ecx + movl 20(%esp),%ebp + xorl %ebp,%ecx + movl 44(%esp),%ebp + xorl %ebp,%ecx + movl (%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,12(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + # 40_59 52 + movl 16(%esp),%ebx + movl 24(%esp),%ebp + xorl %ebp,%ebx + movl 48(%esp),%ebp + xorl %ebp,%ebx + movl 4(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,16(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + # 40_59 53 + movl 20(%esp),%eax + movl 28(%esp),%ebp + xorl %ebp,%eax + movl 52(%esp),%ebp + xorl %ebp,%eax + movl 8(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,20(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + # 40_59 54 + movl 24(%esp),%esi + movl 32(%esp),%ebp + xorl %ebp,%esi + movl 56(%esp),%ebp + xorl %ebp,%esi + movl 12(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,24(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + # 40_59 55 + movl 28(%esp),%edi + movl 36(%esp),%ebp + xorl %ebp,%edi + movl 60(%esp),%ebp + xorl %ebp,%edi + movl 16(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,28(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + # 40_59 56 + movl 32(%esp),%edx + movl 40(%esp),%ebp + xorl %ebp,%edx + movl (%esp),%ebp + xorl %ebp,%edx + movl 20(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,32(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + # 40_59 57 + movl 36(%esp),%ecx + movl 44(%esp),%ebp + xorl %ebp,%ecx + movl 4(%esp),%ebp + xorl %ebp,%ecx + movl 24(%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,36(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + # 40_59 58 + movl 40(%esp),%ebx + movl 48(%esp),%ebp + xorl %ebp,%ebx + movl 8(%esp),%ebp + xorl %ebp,%ebx + movl 28(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,40(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + # 40_59 59 + movl 44(%esp),%eax + movl 52(%esp),%ebp + xorl %ebp,%eax + movl 12(%esp),%ebp + xorl %ebp,%eax + movl 32(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,44(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + # 20_39 60 + movl %ebx,%ebp + movl 48(%esp),%esi + rorl $2,%ebx + xorl 56(%esp),%esi + xorl %ecx,%ebp + xorl 16(%esp),%esi + xorl %edx,%ebp + xorl 36(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,48(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 61 + movl %eax,%ebp + movl 52(%esp),%edi + rorl $2,%eax + xorl 60(%esp),%edi + xorl %ebx,%ebp + xorl 20(%esp),%edi + xorl %ecx,%ebp + xorl 40(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,52(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 62 + movl %esi,%ebp + movl 56(%esp),%edx + rorl $2,%esi + xorl (%esp),%edx + xorl %eax,%ebp + xorl 24(%esp),%edx + xorl %ebx,%ebp + xorl 44(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,56(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 63 + movl %edi,%ebp + movl 60(%esp),%ecx + rorl $2,%edi + xorl 4(%esp),%ecx + xorl %esi,%ebp + xorl 28(%esp),%ecx + xorl %eax,%ebp + xorl 48(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,60(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 64 + movl %edx,%ebp + movl (%esp),%ebx + rorl $2,%edx + xorl 8(%esp),%ebx + xorl %edi,%ebp + xorl 32(%esp),%ebx + xorl %esi,%ebp + xorl 52(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 65 + movl %ecx,%ebp + movl 4(%esp),%eax + rorl $2,%ecx + xorl 12(%esp),%eax + xorl %edx,%ebp + xorl 36(%esp),%eax + xorl %edi,%ebp + xorl 56(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,4(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 66 + movl %ebx,%ebp + movl 8(%esp),%esi + rorl $2,%ebx + xorl 16(%esp),%esi + xorl %ecx,%ebp + xorl 40(%esp),%esi + xorl %edx,%ebp + xorl 60(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,8(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 67 + movl %eax,%ebp + movl 12(%esp),%edi + rorl $2,%eax + xorl 20(%esp),%edi + xorl %ebx,%ebp + xorl 44(%esp),%edi + xorl %ecx,%ebp + xorl (%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,12(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 68 + movl %esi,%ebp + movl 16(%esp),%edx + rorl $2,%esi + xorl 24(%esp),%edx + xorl %eax,%ebp + xorl 48(%esp),%edx + xorl %ebx,%ebp + xorl 4(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,16(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 69 + movl %edi,%ebp + movl 20(%esp),%ecx + rorl $2,%edi + xorl 28(%esp),%ecx + xorl %esi,%ebp + xorl 52(%esp),%ecx + xorl %eax,%ebp + xorl 8(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,20(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 70 + movl %edx,%ebp + movl 24(%esp),%ebx + rorl $2,%edx + xorl 32(%esp),%ebx + xorl %edi,%ebp + xorl 56(%esp),%ebx + xorl %esi,%ebp + xorl 12(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,24(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 71 + movl %ecx,%ebp + movl 28(%esp),%eax + rorl $2,%ecx + xorl 36(%esp),%eax + xorl %edx,%ebp + xorl 60(%esp),%eax + xorl %edi,%ebp + xorl 16(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,28(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 72 + movl %ebx,%ebp + movl 32(%esp),%esi + rorl $2,%ebx + xorl 40(%esp),%esi + xorl %ecx,%ebp + xorl (%esp),%esi + xorl %edx,%ebp + xorl 20(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,32(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 73 + movl %eax,%ebp + movl 36(%esp),%edi + rorl $2,%eax + xorl 44(%esp),%edi + xorl %ebx,%ebp + xorl 4(%esp),%edi + xorl %ecx,%ebp + xorl 24(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,36(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + # 20_39 74 + movl %esi,%ebp + movl 40(%esp),%edx + rorl $2,%esi + xorl 48(%esp),%edx + xorl %eax,%ebp + xorl 8(%esp),%edx + xorl %ebx,%ebp + xorl 28(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,40(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + # 20_39 75 + movl %edi,%ebp + movl 44(%esp),%ecx + rorl $2,%edi + xorl 52(%esp),%ecx + xorl %esi,%ebp + xorl 12(%esp),%ecx + xorl %eax,%ebp + xorl 32(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,44(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + # 20_39 76 + movl %edx,%ebp + movl 48(%esp),%ebx + rorl $2,%edx + xorl 56(%esp),%ebx + xorl %edi,%ebp + xorl 16(%esp),%ebx + xorl %esi,%ebp + xorl 36(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,48(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + # 20_39 77 + movl %ecx,%ebp + movl 52(%esp),%eax + rorl $2,%ecx + xorl 60(%esp),%eax + xorl %edx,%ebp + xorl 20(%esp),%eax + xorl %edi,%ebp + xorl 40(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,52(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + # 20_39 78 + movl %ebx,%ebp + movl 56(%esp),%esi + rorl $2,%ebx + xorl (%esp),%esi + xorl %ecx,%ebp + xorl 24(%esp),%esi + xorl %edx,%ebp + xorl 44(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,56(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + # 20_39 79 + movl %eax,%ebp + movl 60(%esp),%edi + rorl $2,%eax + xorl 4(%esp),%edi + xorl %ebx,%ebp + xorl 28(%esp),%edi + xorl %ecx,%ebp + xorl 48(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,60(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + movl 84(%esp),%ebp + movl 88(%esp),%edx + addl (%ebp),%edi + addl 4(%ebp),%esi + addl 8(%ebp),%eax + addl 12(%ebp),%ebx + addl 16(%ebp),%ecx + movl %edi,(%ebp) + addl $64,%edx + movl %esi,4(%ebp) + cmpl 92(%esp),%edx + movl %eax,8(%ebp) + movl %ecx,%edi + movl %ebx,12(%ebp) + movl %edx,%esi + movl %ecx,16(%ebp) + jb .L000loop + addl $64,%esp + popl %edi + popl %esi + popl %ebx + popl %ebp + ret +.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 +.byte 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82 +.byte 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112 +.byte 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 diff --git a/project/src/crypto/sha1-586-elf.s b/project/src/crypto/sha1-586-elf.s new file mode 100644 index 0000000..15c7d36 --- /dev/null +++ b/project/src/crypto/sha1-586-elf.s @@ -0,0 +1,1442 @@ +.file "sha1-586-elf.s" +.text +.globl wit_sha1_block_data_order +.type wit_sha1_block_data_order,@function +.align 16 +wit_sha1_block_data_order: +.L_wit_sha1_block_data_order_begin: + pushl %ebp + pushl %ebx + pushl %esi + pushl %edi + movl 20(%esp),%ebp + movl 24(%esp),%esi + movl 28(%esp),%eax + subl $64,%esp + shll $6,%eax + addl %esi,%eax + movl %eax,92(%esp) + movl 16(%ebp),%edi +.align 16 +.L000loop: + movl (%esi),%eax + movl 4(%esi),%ebx + movl 8(%esi),%ecx + movl 12(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,(%esp) + movl %ebx,4(%esp) + movl %ecx,8(%esp) + movl %edx,12(%esp) + movl 16(%esi),%eax + movl 20(%esi),%ebx + movl 24(%esi),%ecx + movl 28(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,16(%esp) + movl %ebx,20(%esp) + movl %ecx,24(%esp) + movl %edx,28(%esp) + movl 32(%esi),%eax + movl 36(%esi),%ebx + movl 40(%esi),%ecx + movl 44(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,32(%esp) + movl %ebx,36(%esp) + movl %ecx,40(%esp) + movl %edx,44(%esp) + movl 48(%esi),%eax + movl 52(%esi),%ebx + movl 56(%esi),%ecx + movl 60(%esi),%edx + bswap %eax + bswap %ebx + bswap %ecx + bswap %edx + movl %eax,48(%esp) + movl %ebx,52(%esp) + movl %ecx,56(%esp) + movl %edx,60(%esp) + movl %esi,88(%esp) + movl (%ebp),%eax + movl 4(%ebp),%ebx + movl 8(%ebp),%ecx + movl 12(%ebp),%edx + + movl %ecx,%esi + movl %eax,%ebp + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl (%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 4(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 8(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 12(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ecx,%ebp + + movl %edi,%ebx + movl %ebp,%ecx + roll $5,%ebp + xorl %esi,%ebx + addl %eax,%ebp + andl %edx,%ebx + movl 16(%esp),%eax + xorl %esi,%ebx + rorl $2,%edx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebx,%ebp + + movl %edx,%eax + movl %ebp,%ebx + roll $5,%ebp + xorl %edi,%eax + addl %esi,%ebp + andl %ecx,%eax + movl 20(%esp),%esi + xorl %edi,%eax + rorl $2,%ecx + leal 1518500249(%ebp,%esi,1),%ebp + addl %eax,%ebp + + movl %ecx,%esi + movl %ebp,%eax + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl 24(%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 28(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 32(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 36(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ecx,%ebp + + movl %edi,%ebx + movl %ebp,%ecx + roll $5,%ebp + xorl %esi,%ebx + addl %eax,%ebp + andl %edx,%ebx + movl 40(%esp),%eax + xorl %esi,%ebx + rorl $2,%edx + leal 1518500249(%ebp,%eax,1),%ebp + addl %ebx,%ebp + + movl %edx,%eax + movl %ebp,%ebx + roll $5,%ebp + xorl %edi,%eax + addl %esi,%ebp + andl %ecx,%eax + movl 44(%esp),%esi + xorl %edi,%eax + rorl $2,%ecx + leal 1518500249(%ebp,%esi,1),%ebp + addl %eax,%ebp + + movl %ecx,%esi + movl %ebp,%eax + roll $5,%ebp + xorl %edx,%esi + addl %edi,%ebp + andl %ebx,%esi + movl 48(%esp),%edi + xorl %edx,%esi + rorl $2,%ebx + leal 1518500249(%ebp,%edi,1),%ebp + addl %esi,%ebp + + movl %ebx,%edi + movl %ebp,%esi + roll $5,%ebp + xorl %ecx,%edi + addl %edx,%ebp + andl %eax,%edi + movl 52(%esp),%edx + xorl %ecx,%edi + rorl $2,%eax + leal 1518500249(%ebp,%edx,1),%ebp + addl %edi,%ebp + + movl %eax,%edx + movl %ebp,%edi + roll $5,%ebp + xorl %ebx,%edx + addl %ecx,%ebp + andl %esi,%edx + movl 56(%esp),%ecx + xorl %ebx,%edx + rorl $2,%esi + leal 1518500249(%ebp,%ecx,1),%ebp + addl %edx,%ebp + + movl %esi,%ecx + movl %ebp,%edx + roll $5,%ebp + xorl %eax,%ecx + addl %ebx,%ebp + andl %edi,%ecx + movl 60(%esp),%ebx + xorl %eax,%ecx + rorl $2,%edi + leal 1518500249(%ebp,%ebx,1),%ebp + addl %ebp,%ecx + + movl (%esp),%ebx + movl %edi,%ebp + xorl 8(%esp),%ebx + xorl %esi,%ebp + xorl 32(%esp),%ebx + andl %edx,%ebp + rorl $2,%edx + xorl 52(%esp),%ebx + roll $1,%ebx + xorl %esi,%ebp + movl %ebx,(%esp) + leal 1518500249(%ebx,%eax,1),%ebx + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + + movl 4(%esp),%eax + movl %edx,%ebp + xorl 12(%esp),%eax + xorl %edi,%ebp + xorl 36(%esp),%eax + andl %ecx,%ebp + rorl $2,%ecx + xorl 56(%esp),%eax + roll $1,%eax + xorl %edi,%ebp + movl %eax,4(%esp) + leal 1518500249(%eax,%esi,1),%eax + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + + movl 8(%esp),%esi + movl %ecx,%ebp + xorl 16(%esp),%esi + xorl %edx,%ebp + xorl 40(%esp),%esi + andl %ebx,%ebp + rorl $2,%ebx + xorl 60(%esp),%esi + roll $1,%esi + xorl %edx,%ebp + movl %esi,8(%esp) + leal 1518500249(%esi,%edi,1),%esi + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + + movl 12(%esp),%edi + movl %ebx,%ebp + xorl 20(%esp),%edi + xorl %ecx,%ebp + xorl 44(%esp),%edi + andl %eax,%ebp + rorl $2,%eax + xorl (%esp),%edi + roll $1,%edi + xorl %ecx,%ebp + movl %edi,12(%esp) + leal 1518500249(%edi,%edx,1),%edi + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + + movl %esi,%ebp + movl 16(%esp),%edx + rorl $2,%esi + xorl 24(%esp),%edx + xorl %eax,%ebp + xorl 48(%esp),%edx + xorl %ebx,%ebp + xorl 4(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,16(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 20(%esp),%ecx + rorl $2,%edi + xorl 28(%esp),%ecx + xorl %esi,%ebp + xorl 52(%esp),%ecx + xorl %eax,%ebp + xorl 8(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,20(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl 24(%esp),%ebx + rorl $2,%edx + xorl 32(%esp),%ebx + xorl %edi,%ebp + xorl 56(%esp),%ebx + xorl %esi,%ebp + xorl 12(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,24(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 28(%esp),%eax + rorl $2,%ecx + xorl 36(%esp),%eax + xorl %edx,%ebp + xorl 60(%esp),%eax + xorl %edi,%ebp + xorl 16(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,28(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 32(%esp),%esi + rorl $2,%ebx + xorl 40(%esp),%esi + xorl %ecx,%ebp + xorl (%esp),%esi + xorl %edx,%ebp + xorl 20(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,32(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 36(%esp),%edi + rorl $2,%eax + xorl 44(%esp),%edi + xorl %ebx,%ebp + xorl 4(%esp),%edi + xorl %ecx,%ebp + xorl 24(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,36(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl 40(%esp),%edx + rorl $2,%esi + xorl 48(%esp),%edx + xorl %eax,%ebp + xorl 8(%esp),%edx + xorl %ebx,%ebp + xorl 28(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,40(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 44(%esp),%ecx + rorl $2,%edi + xorl 52(%esp),%ecx + xorl %esi,%ebp + xorl 12(%esp),%ecx + xorl %eax,%ebp + xorl 32(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,44(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl 48(%esp),%ebx + rorl $2,%edx + xorl 56(%esp),%ebx + xorl %edi,%ebp + xorl 16(%esp),%ebx + xorl %esi,%ebp + xorl 36(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,48(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 52(%esp),%eax + rorl $2,%ecx + xorl 60(%esp),%eax + xorl %edx,%ebp + xorl 20(%esp),%eax + xorl %edi,%ebp + xorl 40(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,52(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 56(%esp),%esi + rorl $2,%ebx + xorl (%esp),%esi + xorl %ecx,%ebp + xorl 24(%esp),%esi + xorl %edx,%ebp + xorl 44(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,56(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 60(%esp),%edi + rorl $2,%eax + xorl 4(%esp),%edi + xorl %ebx,%ebp + xorl 28(%esp),%edi + xorl %ecx,%ebp + xorl 48(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,60(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl (%esp),%edx + rorl $2,%esi + xorl 8(%esp),%edx + xorl %eax,%ebp + xorl 32(%esp),%edx + xorl %ebx,%ebp + xorl 52(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 4(%esp),%ecx + rorl $2,%edi + xorl 12(%esp),%ecx + xorl %esi,%ebp + xorl 36(%esp),%ecx + xorl %eax,%ebp + xorl 56(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,4(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl 8(%esp),%ebx + rorl $2,%edx + xorl 16(%esp),%ebx + xorl %edi,%ebp + xorl 40(%esp),%ebx + xorl %esi,%ebp + xorl 60(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,8(%esp) + movl %ecx,%eax + roll $5,%eax + leal 1859775393(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 12(%esp),%eax + rorl $2,%ecx + xorl 20(%esp),%eax + xorl %edx,%ebp + xorl 44(%esp),%eax + xorl %edi,%ebp + xorl (%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,12(%esp) + movl %ebx,%esi + roll $5,%esi + leal 1859775393(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 16(%esp),%esi + rorl $2,%ebx + xorl 24(%esp),%esi + xorl %ecx,%ebp + xorl 48(%esp),%esi + xorl %edx,%ebp + xorl 4(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,16(%esp) + movl %eax,%edi + roll $5,%edi + leal 1859775393(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 20(%esp),%edi + rorl $2,%eax + xorl 28(%esp),%edi + xorl %ebx,%ebp + xorl 52(%esp),%edi + xorl %ecx,%ebp + xorl 8(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,20(%esp) + movl %esi,%edx + roll $5,%edx + leal 1859775393(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl 24(%esp),%edx + rorl $2,%esi + xorl 32(%esp),%edx + xorl %eax,%ebp + xorl 56(%esp),%edx + xorl %ebx,%ebp + xorl 12(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,24(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 1859775393(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 28(%esp),%ecx + rorl $2,%edi + xorl 36(%esp),%ecx + xorl %esi,%ebp + xorl 60(%esp),%ecx + xorl %eax,%ebp + xorl 16(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,28(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 1859775393(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl 32(%esp),%ebx + movl 40(%esp),%ebp + xorl %ebp,%ebx + movl (%esp),%ebp + xorl %ebp,%ebx + movl 20(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,32(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + + movl 36(%esp),%eax + movl 44(%esp),%ebp + xorl %ebp,%eax + movl 4(%esp),%ebp + xorl %ebp,%eax + movl 24(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,36(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + + movl 40(%esp),%esi + movl 48(%esp),%ebp + xorl %ebp,%esi + movl 8(%esp),%ebp + xorl %ebp,%esi + movl 28(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,40(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + + movl 44(%esp),%edi + movl 52(%esp),%ebp + xorl %ebp,%edi + movl 12(%esp),%ebp + xorl %ebp,%edi + movl 32(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,44(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + + movl 48(%esp),%edx + movl 56(%esp),%ebp + xorl %ebp,%edx + movl 16(%esp),%ebp + xorl %ebp,%edx + movl 36(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,48(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + + movl 52(%esp),%ecx + movl 60(%esp),%ebp + xorl %ebp,%ecx + movl 20(%esp),%ebp + xorl %ebp,%ecx + movl 40(%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,52(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + + movl 56(%esp),%ebx + movl (%esp),%ebp + xorl %ebp,%ebx + movl 24(%esp),%ebp + xorl %ebp,%ebx + movl 44(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,56(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + + movl 60(%esp),%eax + movl 4(%esp),%ebp + xorl %ebp,%eax + movl 28(%esp),%ebp + xorl %ebp,%eax + movl 48(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,60(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + + movl (%esp),%esi + movl 8(%esp),%ebp + xorl %ebp,%esi + movl 32(%esp),%ebp + xorl %ebp,%esi + movl 52(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + + movl 4(%esp),%edi + movl 12(%esp),%ebp + xorl %ebp,%edi + movl 36(%esp),%ebp + xorl %ebp,%edi + movl 56(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,4(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + + movl 8(%esp),%edx + movl 16(%esp),%ebp + xorl %ebp,%edx + movl 40(%esp),%ebp + xorl %ebp,%edx + movl 60(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,8(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + + movl 12(%esp),%ecx + movl 20(%esp),%ebp + xorl %ebp,%ecx + movl 44(%esp),%ebp + xorl %ebp,%ecx + movl (%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,12(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + + movl 16(%esp),%ebx + movl 24(%esp),%ebp + xorl %ebp,%ebx + movl 48(%esp),%ebp + xorl %ebp,%ebx + movl 4(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,16(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + + movl 20(%esp),%eax + movl 28(%esp),%ebp + xorl %ebp,%eax + movl 52(%esp),%ebp + xorl %ebp,%eax + movl 8(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,20(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + + movl 24(%esp),%esi + movl 32(%esp),%ebp + xorl %ebp,%esi + movl 56(%esp),%ebp + xorl %ebp,%esi + movl 12(%esp),%ebp + xorl %ebp,%esi + movl %ebx,%ebp + roll $1,%esi + orl %ecx,%ebp + movl %esi,24(%esp) + andl %edx,%ebp + leal 2400959708(%esi,%edi,1),%esi + movl %ebx,%edi + rorl $2,%ebx + andl %ecx,%edi + orl %edi,%ebp + movl %eax,%edi + roll $5,%edi + addl %ebp,%esi + addl %edi,%esi + + movl 28(%esp),%edi + movl 36(%esp),%ebp + xorl %ebp,%edi + movl 60(%esp),%ebp + xorl %ebp,%edi + movl 16(%esp),%ebp + xorl %ebp,%edi + movl %eax,%ebp + roll $1,%edi + orl %ebx,%ebp + movl %edi,28(%esp) + andl %ecx,%ebp + leal 2400959708(%edi,%edx,1),%edi + movl %eax,%edx + rorl $2,%eax + andl %ebx,%edx + orl %edx,%ebp + movl %esi,%edx + roll $5,%edx + addl %ebp,%edi + addl %edx,%edi + + movl 32(%esp),%edx + movl 40(%esp),%ebp + xorl %ebp,%edx + movl (%esp),%ebp + xorl %ebp,%edx + movl 20(%esp),%ebp + xorl %ebp,%edx + movl %esi,%ebp + roll $1,%edx + orl %eax,%ebp + movl %edx,32(%esp) + andl %ebx,%ebp + leal 2400959708(%edx,%ecx,1),%edx + movl %esi,%ecx + rorl $2,%esi + andl %eax,%ecx + orl %ecx,%ebp + movl %edi,%ecx + roll $5,%ecx + addl %ebp,%edx + addl %ecx,%edx + + movl 36(%esp),%ecx + movl 44(%esp),%ebp + xorl %ebp,%ecx + movl 4(%esp),%ebp + xorl %ebp,%ecx + movl 24(%esp),%ebp + xorl %ebp,%ecx + movl %edi,%ebp + roll $1,%ecx + orl %esi,%ebp + movl %ecx,36(%esp) + andl %eax,%ebp + leal 2400959708(%ecx,%ebx,1),%ecx + movl %edi,%ebx + rorl $2,%edi + andl %esi,%ebx + orl %ebx,%ebp + movl %edx,%ebx + roll $5,%ebx + addl %ebp,%ecx + addl %ebx,%ecx + + movl 40(%esp),%ebx + movl 48(%esp),%ebp + xorl %ebp,%ebx + movl 8(%esp),%ebp + xorl %ebp,%ebx + movl 28(%esp),%ebp + xorl %ebp,%ebx + movl %edx,%ebp + roll $1,%ebx + orl %edi,%ebp + movl %ebx,40(%esp) + andl %esi,%ebp + leal 2400959708(%ebx,%eax,1),%ebx + movl %edx,%eax + rorl $2,%edx + andl %edi,%eax + orl %eax,%ebp + movl %ecx,%eax + roll $5,%eax + addl %ebp,%ebx + addl %eax,%ebx + + movl 44(%esp),%eax + movl 52(%esp),%ebp + xorl %ebp,%eax + movl 12(%esp),%ebp + xorl %ebp,%eax + movl 32(%esp),%ebp + xorl %ebp,%eax + movl %ecx,%ebp + roll $1,%eax + orl %edx,%ebp + movl %eax,44(%esp) + andl %edi,%ebp + leal 2400959708(%eax,%esi,1),%eax + movl %ecx,%esi + rorl $2,%ecx + andl %edx,%esi + orl %esi,%ebp + movl %ebx,%esi + roll $5,%esi + addl %ebp,%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 48(%esp),%esi + rorl $2,%ebx + xorl 56(%esp),%esi + xorl %ecx,%ebp + xorl 16(%esp),%esi + xorl %edx,%ebp + xorl 36(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,48(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 52(%esp),%edi + rorl $2,%eax + xorl 60(%esp),%edi + xorl %ebx,%ebp + xorl 20(%esp),%edi + xorl %ecx,%ebp + xorl 40(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,52(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl 56(%esp),%edx + rorl $2,%esi + xorl (%esp),%edx + xorl %eax,%ebp + xorl 24(%esp),%edx + xorl %ebx,%ebp + xorl 44(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,56(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 60(%esp),%ecx + rorl $2,%edi + xorl 4(%esp),%ecx + xorl %esi,%ebp + xorl 28(%esp),%ecx + xorl %eax,%ebp + xorl 48(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,60(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl (%esp),%ebx + rorl $2,%edx + xorl 8(%esp),%ebx + xorl %edi,%ebp + xorl 32(%esp),%ebx + xorl %esi,%ebp + xorl 52(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 4(%esp),%eax + rorl $2,%ecx + xorl 12(%esp),%eax + xorl %edx,%ebp + xorl 36(%esp),%eax + xorl %edi,%ebp + xorl 56(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,4(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 8(%esp),%esi + rorl $2,%ebx + xorl 16(%esp),%esi + xorl %ecx,%ebp + xorl 40(%esp),%esi + xorl %edx,%ebp + xorl 60(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,8(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 12(%esp),%edi + rorl $2,%eax + xorl 20(%esp),%edi + xorl %ebx,%ebp + xorl 44(%esp),%edi + xorl %ecx,%ebp + xorl (%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,12(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl 16(%esp),%edx + rorl $2,%esi + xorl 24(%esp),%edx + xorl %eax,%ebp + xorl 48(%esp),%edx + xorl %ebx,%ebp + xorl 4(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,16(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 20(%esp),%ecx + rorl $2,%edi + xorl 28(%esp),%ecx + xorl %esi,%ebp + xorl 52(%esp),%ecx + xorl %eax,%ebp + xorl 8(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,20(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl 24(%esp),%ebx + rorl $2,%edx + xorl 32(%esp),%ebx + xorl %edi,%ebp + xorl 56(%esp),%ebx + xorl %esi,%ebp + xorl 12(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,24(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 28(%esp),%eax + rorl $2,%ecx + xorl 36(%esp),%eax + xorl %edx,%ebp + xorl 60(%esp),%eax + xorl %edi,%ebp + xorl 16(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,28(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 32(%esp),%esi + rorl $2,%ebx + xorl 40(%esp),%esi + xorl %ecx,%ebp + xorl (%esp),%esi + xorl %edx,%ebp + xorl 20(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,32(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 36(%esp),%edi + rorl $2,%eax + xorl 44(%esp),%edi + xorl %ebx,%ebp + xorl 4(%esp),%edi + xorl %ecx,%ebp + xorl 24(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,36(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + + movl %esi,%ebp + movl 40(%esp),%edx + rorl $2,%esi + xorl 48(%esp),%edx + xorl %eax,%ebp + xorl 8(%esp),%edx + xorl %ebx,%ebp + xorl 28(%esp),%edx + roll $1,%edx + addl %ecx,%ebp + movl %edx,40(%esp) + movl %edi,%ecx + roll $5,%ecx + leal 3395469782(%edx,%ebp,1),%edx + addl %ecx,%edx + + movl %edi,%ebp + movl 44(%esp),%ecx + rorl $2,%edi + xorl 52(%esp),%ecx + xorl %esi,%ebp + xorl 12(%esp),%ecx + xorl %eax,%ebp + xorl 32(%esp),%ecx + roll $1,%ecx + addl %ebx,%ebp + movl %ecx,44(%esp) + movl %edx,%ebx + roll $5,%ebx + leal 3395469782(%ecx,%ebp,1),%ecx + addl %ebx,%ecx + + movl %edx,%ebp + movl 48(%esp),%ebx + rorl $2,%edx + xorl 56(%esp),%ebx + xorl %edi,%ebp + xorl 16(%esp),%ebx + xorl %esi,%ebp + xorl 36(%esp),%ebx + roll $1,%ebx + addl %eax,%ebp + movl %ebx,48(%esp) + movl %ecx,%eax + roll $5,%eax + leal 3395469782(%ebx,%ebp,1),%ebx + addl %eax,%ebx + + movl %ecx,%ebp + movl 52(%esp),%eax + rorl $2,%ecx + xorl 60(%esp),%eax + xorl %edx,%ebp + xorl 20(%esp),%eax + xorl %edi,%ebp + xorl 40(%esp),%eax + roll $1,%eax + addl %esi,%ebp + movl %eax,52(%esp) + movl %ebx,%esi + roll $5,%esi + leal 3395469782(%eax,%ebp,1),%eax + addl %esi,%eax + + movl %ebx,%ebp + movl 56(%esp),%esi + rorl $2,%ebx + xorl (%esp),%esi + xorl %ecx,%ebp + xorl 24(%esp),%esi + xorl %edx,%ebp + xorl 44(%esp),%esi + roll $1,%esi + addl %edi,%ebp + movl %esi,56(%esp) + movl %eax,%edi + roll $5,%edi + leal 3395469782(%esi,%ebp,1),%esi + addl %edi,%esi + + movl %eax,%ebp + movl 60(%esp),%edi + rorl $2,%eax + xorl 4(%esp),%edi + xorl %ebx,%ebp + xorl 28(%esp),%edi + xorl %ecx,%ebp + xorl 48(%esp),%edi + roll $1,%edi + addl %edx,%ebp + movl %edi,60(%esp) + movl %esi,%edx + roll $5,%edx + leal 3395469782(%edi,%ebp,1),%edi + addl %edx,%edi + movl 84(%esp),%ebp + movl 88(%esp),%edx + addl (%ebp),%edi + addl 4(%ebp),%esi + addl 8(%ebp),%eax + addl 12(%ebp),%ebx + addl 16(%ebp),%ecx + movl %edi,(%ebp) + addl $64,%edx + movl %esi,4(%ebp) + cmpl 92(%esp),%edx + movl %eax,8(%ebp) + movl %ecx,%edi + movl %ebx,12(%ebp) + movl %edx,%esi + movl %ecx,16(%ebp) + jb .L000loop + addl $64,%esp + popl %edi + popl %esi + popl %ebx + popl %ebp + ret +.size wit_sha1_block_data_order,.-.L_wit_sha1_block_data_order_begin +.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 +.byte 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82 +.byte 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112 +.byte 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 diff --git a/project/src/crypto/sha1-x86_64.s b/project/src/crypto/sha1-x86_64.s new file mode 100644 index 0000000..f0ae885 --- /dev/null +++ b/project/src/crypto/sha1-x86_64.s @@ -0,0 +1,1282 @@ +.text +.globl wit_sha1_block_data_order +.type wit_sha1_block_data_order,@function +.align 16 +wit_sha1_block_data_order: + pushq %rbx + pushq %rbp + pushq %r12 + movq %rsp,%r11 + movq %rdi,%r8 + subq $72,%rsp + movq %rsi,%r9 + andq $-64,%rsp + movq %rdx,%r10 + movq %r11,64(%rsp) +.Lprologue: + + movl 0(%r8),%edx + movl 4(%r8),%esi + movl 8(%r8),%edi + movl 12(%r8),%ebp + movl 16(%r8),%r11d +.align 4 +.Lloop: + movl 0(%r9),%eax + bswapl %eax + movl %eax,0(%rsp) + leal 1518500249(%rax,%r11,1),%r12d + movl %edi,%ebx + movl 4(%r9),%eax + movl %edx,%r11d + xorl %ebp,%ebx + bswapl %eax + roll $5,%r11d + andl %esi,%ebx + movl %eax,4(%rsp) + addl %r11d,%r12d + xorl %ebp,%ebx + roll $30,%esi + addl %ebx,%r12d + leal 1518500249(%rax,%rbp,1),%r11d + movl %esi,%ebx + movl 8(%r9),%eax + movl %r12d,%ebp + xorl %edi,%ebx + bswapl %eax + roll $5,%ebp + andl %edx,%ebx + movl %eax,8(%rsp) + addl %ebp,%r11d + xorl %edi,%ebx + roll $30,%edx + addl %ebx,%r11d + leal 1518500249(%rax,%rdi,1),%ebp + movl %edx,%ebx + movl 12(%r9),%eax + movl %r11d,%edi + xorl %esi,%ebx + bswapl %eax + roll $5,%edi + andl %r12d,%ebx + movl %eax,12(%rsp) + addl %edi,%ebp + xorl %esi,%ebx + roll $30,%r12d + addl %ebx,%ebp + leal 1518500249(%rax,%rsi,1),%edi + movl %r12d,%ebx + movl 16(%r9),%eax + movl %ebp,%esi + xorl %edx,%ebx + bswapl %eax + roll $5,%esi + andl %r11d,%ebx + movl %eax,16(%rsp) + addl %esi,%edi + xorl %edx,%ebx + roll $30,%r11d + addl %ebx,%edi + leal 1518500249(%rax,%rdx,1),%esi + movl %r11d,%ebx + movl 20(%r9),%eax + movl %edi,%edx + xorl %r12d,%ebx + bswapl %eax + roll $5,%edx + andl %ebp,%ebx + movl %eax,20(%rsp) + addl %edx,%esi + xorl %r12d,%ebx + roll $30,%ebp + addl %ebx,%esi + leal 1518500249(%rax,%r12,1),%edx + movl %ebp,%ebx + movl 24(%r9),%eax + movl %esi,%r12d + xorl %r11d,%ebx + bswapl %eax + roll $5,%r12d + andl %edi,%ebx + movl %eax,24(%rsp) + addl %r12d,%edx + xorl %r11d,%ebx + roll $30,%edi + addl %ebx,%edx + leal 1518500249(%rax,%r11,1),%r12d + movl %edi,%ebx + movl 28(%r9),%eax + movl %edx,%r11d + xorl %ebp,%ebx + bswapl %eax + roll $5,%r11d + andl %esi,%ebx + movl %eax,28(%rsp) + addl %r11d,%r12d + xorl %ebp,%ebx + roll $30,%esi + addl %ebx,%r12d + leal 1518500249(%rax,%rbp,1),%r11d + movl %esi,%ebx + movl 32(%r9),%eax + movl %r12d,%ebp + xorl %edi,%ebx + bswapl %eax + roll $5,%ebp + andl %edx,%ebx + movl %eax,32(%rsp) + addl %ebp,%r11d + xorl %edi,%ebx + roll $30,%edx + addl %ebx,%r11d + leal 1518500249(%rax,%rdi,1),%ebp + movl %edx,%ebx + movl 36(%r9),%eax + movl %r11d,%edi + xorl %esi,%ebx + bswapl %eax + roll $5,%edi + andl %r12d,%ebx + movl %eax,36(%rsp) + addl %edi,%ebp + xorl %esi,%ebx + roll $30,%r12d + addl %ebx,%ebp + leal 1518500249(%rax,%rsi,1),%edi + movl %r12d,%ebx + movl 40(%r9),%eax + movl %ebp,%esi + xorl %edx,%ebx + bswapl %eax + roll $5,%esi + andl %r11d,%ebx + movl %eax,40(%rsp) + addl %esi,%edi + xorl %edx,%ebx + roll $30,%r11d + addl %ebx,%edi + leal 1518500249(%rax,%rdx,1),%esi + movl %r11d,%ebx + movl 44(%r9),%eax + movl %edi,%edx + xorl %r12d,%ebx + bswapl %eax + roll $5,%edx + andl %ebp,%ebx + movl %eax,44(%rsp) + addl %edx,%esi + xorl %r12d,%ebx + roll $30,%ebp + addl %ebx,%esi + leal 1518500249(%rax,%r12,1),%edx + movl %ebp,%ebx + movl 48(%r9),%eax + movl %esi,%r12d + xorl %r11d,%ebx + bswapl %eax + roll $5,%r12d + andl %edi,%ebx + movl %eax,48(%rsp) + addl %r12d,%edx + xorl %r11d,%ebx + roll $30,%edi + addl %ebx,%edx + leal 1518500249(%rax,%r11,1),%r12d + movl %edi,%ebx + movl 52(%r9),%eax + movl %edx,%r11d + xorl %ebp,%ebx + bswapl %eax + roll $5,%r11d + andl %esi,%ebx + movl %eax,52(%rsp) + addl %r11d,%r12d + xorl %ebp,%ebx + roll $30,%esi + addl %ebx,%r12d + leal 1518500249(%rax,%rbp,1),%r11d + movl %esi,%ebx + movl 56(%r9),%eax + movl %r12d,%ebp + xorl %edi,%ebx + bswapl %eax + roll $5,%ebp + andl %edx,%ebx + movl %eax,56(%rsp) + addl %ebp,%r11d + xorl %edi,%ebx + roll $30,%edx + addl %ebx,%r11d + leal 1518500249(%rax,%rdi,1),%ebp + movl %edx,%ebx + movl 60(%r9),%eax + movl %r11d,%edi + xorl %esi,%ebx + bswapl %eax + roll $5,%edi + andl %r12d,%ebx + movl %eax,60(%rsp) + addl %edi,%ebp + xorl %esi,%ebx + roll $30,%r12d + addl %ebx,%ebp + leal 1518500249(%rax,%rsi,1),%edi + movl 0(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 8(%rsp),%eax + xorl %edx,%ebx + roll $5,%esi + xorl 32(%rsp),%eax + andl %r11d,%ebx + addl %esi,%edi + xorl 52(%rsp),%eax + xorl %edx,%ebx + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,0(%rsp) + leal 1518500249(%rax,%rdx,1),%esi + movl 4(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 12(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edx + xorl 36(%rsp),%eax + andl %ebp,%ebx + addl %edx,%esi + xorl 56(%rsp),%eax + xorl %r12d,%ebx + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,4(%rsp) + leal 1518500249(%rax,%r12,1),%edx + movl 8(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 16(%rsp),%eax + xorl %r11d,%ebx + roll $5,%r12d + xorl 40(%rsp),%eax + andl %edi,%ebx + addl %r12d,%edx + xorl 60(%rsp),%eax + xorl %r11d,%ebx + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,8(%rsp) + leal 1518500249(%rax,%r11,1),%r12d + movl 12(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 20(%rsp),%eax + xorl %ebp,%ebx + roll $5,%r11d + xorl 44(%rsp),%eax + andl %esi,%ebx + addl %r11d,%r12d + xorl 0(%rsp),%eax + xorl %ebp,%ebx + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,12(%rsp) + leal 1518500249(%rax,%rbp,1),%r11d + movl 16(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 24(%rsp),%eax + xorl %edi,%ebx + roll $5,%ebp + xorl 48(%rsp),%eax + andl %edx,%ebx + addl %ebp,%r11d + xorl 4(%rsp),%eax + xorl %edi,%ebx + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,16(%rsp) + leal 1859775393(%rax,%rdi,1),%ebp + movl 20(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 28(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 52(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 8(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,20(%rsp) + leal 1859775393(%rax,%rsi,1),%edi + movl 24(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 32(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 56(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 12(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,24(%rsp) + leal 1859775393(%rax,%rdx,1),%esi + movl 28(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 36(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 60(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 16(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,28(%rsp) + leal 1859775393(%rax,%r12,1),%edx + movl 32(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 40(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 0(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 20(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,32(%rsp) + leal 1859775393(%rax,%r11,1),%r12d + movl 36(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 44(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 4(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 24(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,36(%rsp) + leal 1859775393(%rax,%rbp,1),%r11d + movl 40(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 48(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 8(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 28(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,40(%rsp) + leal 1859775393(%rax,%rdi,1),%ebp + movl 44(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 52(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 12(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 32(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,44(%rsp) + leal 1859775393(%rax,%rsi,1),%edi + movl 48(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 56(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 16(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 36(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,48(%rsp) + leal 1859775393(%rax,%rdx,1),%esi + movl 52(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 60(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 20(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 40(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,52(%rsp) + leal 1859775393(%rax,%r12,1),%edx + movl 56(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 0(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 24(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 44(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,56(%rsp) + leal 1859775393(%rax,%r11,1),%r12d + movl 60(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 4(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 28(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 48(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,60(%rsp) + leal 1859775393(%rax,%rbp,1),%r11d + movl 0(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 8(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 32(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 52(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,0(%rsp) + leal 1859775393(%rax,%rdi,1),%ebp + movl 4(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 12(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 36(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 56(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,4(%rsp) + leal 1859775393(%rax,%rsi,1),%edi + movl 8(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 16(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 40(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 60(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,8(%rsp) + leal 1859775393(%rax,%rdx,1),%esi + movl 12(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 20(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 44(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 0(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,12(%rsp) + leal 1859775393(%rax,%r12,1),%edx + movl 16(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 24(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 48(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 4(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,16(%rsp) + leal 1859775393(%rax,%r11,1),%r12d + movl 20(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 28(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 52(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 8(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,20(%rsp) + leal 1859775393(%rax,%rbp,1),%r11d + movl 24(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 32(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 56(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 12(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,24(%rsp) + leal 1859775393(%rax,%rdi,1),%ebp + movl 28(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 36(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 60(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 16(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,28(%rsp) + leal 1859775393(%rax,%rsi,1),%edi + movl 32(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 40(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 0(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 20(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,32(%rsp) + leal -1894007588(%rax,%rdx,1),%esi + movl 36(%rsp),%eax + movl %ebp,%ebx + movl %ebp,%ecx + xorl 44(%rsp),%eax + movl %edi,%edx + andl %r11d,%ebx + xorl 4(%rsp),%eax + orl %r11d,%ecx + roll $5,%edx + xorl 24(%rsp),%eax + andl %r12d,%ecx + addl %edx,%esi + roll $1,%eax + orl %ecx,%ebx + roll $30,%ebp + movl %eax,36(%rsp) + addl %ebx,%esi + leal -1894007588(%rax,%r12,1),%edx + movl 40(%rsp),%eax + movl %edi,%ebx + movl %edi,%ecx + xorl 48(%rsp),%eax + movl %esi,%r12d + andl %ebp,%ebx + xorl 8(%rsp),%eax + orl %ebp,%ecx + roll $5,%r12d + xorl 28(%rsp),%eax + andl %r11d,%ecx + addl %r12d,%edx + roll $1,%eax + orl %ecx,%ebx + roll $30,%edi + movl %eax,40(%rsp) + addl %ebx,%edx + leal -1894007588(%rax,%r11,1),%r12d + movl 44(%rsp),%eax + movl %esi,%ebx + movl %esi,%ecx + xorl 52(%rsp),%eax + movl %edx,%r11d + andl %edi,%ebx + xorl 12(%rsp),%eax + orl %edi,%ecx + roll $5,%r11d + xorl 32(%rsp),%eax + andl %ebp,%ecx + addl %r11d,%r12d + roll $1,%eax + orl %ecx,%ebx + roll $30,%esi + movl %eax,44(%rsp) + addl %ebx,%r12d + leal -1894007588(%rax,%rbp,1),%r11d + movl 48(%rsp),%eax + movl %edx,%ebx + movl %edx,%ecx + xorl 56(%rsp),%eax + movl %r12d,%ebp + andl %esi,%ebx + xorl 16(%rsp),%eax + orl %esi,%ecx + roll $5,%ebp + xorl 36(%rsp),%eax + andl %edi,%ecx + addl %ebp,%r11d + roll $1,%eax + orl %ecx,%ebx + roll $30,%edx + movl %eax,48(%rsp) + addl %ebx,%r11d + leal -1894007588(%rax,%rdi,1),%ebp + movl 52(%rsp),%eax + movl %r12d,%ebx + movl %r12d,%ecx + xorl 60(%rsp),%eax + movl %r11d,%edi + andl %edx,%ebx + xorl 20(%rsp),%eax + orl %edx,%ecx + roll $5,%edi + xorl 40(%rsp),%eax + andl %esi,%ecx + addl %edi,%ebp + roll $1,%eax + orl %ecx,%ebx + roll $30,%r12d + movl %eax,52(%rsp) + addl %ebx,%ebp + leal -1894007588(%rax,%rsi,1),%edi + movl 56(%rsp),%eax + movl %r11d,%ebx + movl %r11d,%ecx + xorl 0(%rsp),%eax + movl %ebp,%esi + andl %r12d,%ebx + xorl 24(%rsp),%eax + orl %r12d,%ecx + roll $5,%esi + xorl 44(%rsp),%eax + andl %edx,%ecx + addl %esi,%edi + roll $1,%eax + orl %ecx,%ebx + roll $30,%r11d + movl %eax,56(%rsp) + addl %ebx,%edi + leal -1894007588(%rax,%rdx,1),%esi + movl 60(%rsp),%eax + movl %ebp,%ebx + movl %ebp,%ecx + xorl 4(%rsp),%eax + movl %edi,%edx + andl %r11d,%ebx + xorl 28(%rsp),%eax + orl %r11d,%ecx + roll $5,%edx + xorl 48(%rsp),%eax + andl %r12d,%ecx + addl %edx,%esi + roll $1,%eax + orl %ecx,%ebx + roll $30,%ebp + movl %eax,60(%rsp) + addl %ebx,%esi + leal -1894007588(%rax,%r12,1),%edx + movl 0(%rsp),%eax + movl %edi,%ebx + movl %edi,%ecx + xorl 8(%rsp),%eax + movl %esi,%r12d + andl %ebp,%ebx + xorl 32(%rsp),%eax + orl %ebp,%ecx + roll $5,%r12d + xorl 52(%rsp),%eax + andl %r11d,%ecx + addl %r12d,%edx + roll $1,%eax + orl %ecx,%ebx + roll $30,%edi + movl %eax,0(%rsp) + addl %ebx,%edx + leal -1894007588(%rax,%r11,1),%r12d + movl 4(%rsp),%eax + movl %esi,%ebx + movl %esi,%ecx + xorl 12(%rsp),%eax + movl %edx,%r11d + andl %edi,%ebx + xorl 36(%rsp),%eax + orl %edi,%ecx + roll $5,%r11d + xorl 56(%rsp),%eax + andl %ebp,%ecx + addl %r11d,%r12d + roll $1,%eax + orl %ecx,%ebx + roll $30,%esi + movl %eax,4(%rsp) + addl %ebx,%r12d + leal -1894007588(%rax,%rbp,1),%r11d + movl 8(%rsp),%eax + movl %edx,%ebx + movl %edx,%ecx + xorl 16(%rsp),%eax + movl %r12d,%ebp + andl %esi,%ebx + xorl 40(%rsp),%eax + orl %esi,%ecx + roll $5,%ebp + xorl 60(%rsp),%eax + andl %edi,%ecx + addl %ebp,%r11d + roll $1,%eax + orl %ecx,%ebx + roll $30,%edx + movl %eax,8(%rsp) + addl %ebx,%r11d + leal -1894007588(%rax,%rdi,1),%ebp + movl 12(%rsp),%eax + movl %r12d,%ebx + movl %r12d,%ecx + xorl 20(%rsp),%eax + movl %r11d,%edi + andl %edx,%ebx + xorl 44(%rsp),%eax + orl %edx,%ecx + roll $5,%edi + xorl 0(%rsp),%eax + andl %esi,%ecx + addl %edi,%ebp + roll $1,%eax + orl %ecx,%ebx + roll $30,%r12d + movl %eax,12(%rsp) + addl %ebx,%ebp + leal -1894007588(%rax,%rsi,1),%edi + movl 16(%rsp),%eax + movl %r11d,%ebx + movl %r11d,%ecx + xorl 24(%rsp),%eax + movl %ebp,%esi + andl %r12d,%ebx + xorl 48(%rsp),%eax + orl %r12d,%ecx + roll $5,%esi + xorl 4(%rsp),%eax + andl %edx,%ecx + addl %esi,%edi + roll $1,%eax + orl %ecx,%ebx + roll $30,%r11d + movl %eax,16(%rsp) + addl %ebx,%edi + leal -1894007588(%rax,%rdx,1),%esi + movl 20(%rsp),%eax + movl %ebp,%ebx + movl %ebp,%ecx + xorl 28(%rsp),%eax + movl %edi,%edx + andl %r11d,%ebx + xorl 52(%rsp),%eax + orl %r11d,%ecx + roll $5,%edx + xorl 8(%rsp),%eax + andl %r12d,%ecx + addl %edx,%esi + roll $1,%eax + orl %ecx,%ebx + roll $30,%ebp + movl %eax,20(%rsp) + addl %ebx,%esi + leal -1894007588(%rax,%r12,1),%edx + movl 24(%rsp),%eax + movl %edi,%ebx + movl %edi,%ecx + xorl 32(%rsp),%eax + movl %esi,%r12d + andl %ebp,%ebx + xorl 56(%rsp),%eax + orl %ebp,%ecx + roll $5,%r12d + xorl 12(%rsp),%eax + andl %r11d,%ecx + addl %r12d,%edx + roll $1,%eax + orl %ecx,%ebx + roll $30,%edi + movl %eax,24(%rsp) + addl %ebx,%edx + leal -1894007588(%rax,%r11,1),%r12d + movl 28(%rsp),%eax + movl %esi,%ebx + movl %esi,%ecx + xorl 36(%rsp),%eax + movl %edx,%r11d + andl %edi,%ebx + xorl 60(%rsp),%eax + orl %edi,%ecx + roll $5,%r11d + xorl 16(%rsp),%eax + andl %ebp,%ecx + addl %r11d,%r12d + roll $1,%eax + orl %ecx,%ebx + roll $30,%esi + movl %eax,28(%rsp) + addl %ebx,%r12d + leal -1894007588(%rax,%rbp,1),%r11d + movl 32(%rsp),%eax + movl %edx,%ebx + movl %edx,%ecx + xorl 40(%rsp),%eax + movl %r12d,%ebp + andl %esi,%ebx + xorl 0(%rsp),%eax + orl %esi,%ecx + roll $5,%ebp + xorl 20(%rsp),%eax + andl %edi,%ecx + addl %ebp,%r11d + roll $1,%eax + orl %ecx,%ebx + roll $30,%edx + movl %eax,32(%rsp) + addl %ebx,%r11d + leal -1894007588(%rax,%rdi,1),%ebp + movl 36(%rsp),%eax + movl %r12d,%ebx + movl %r12d,%ecx + xorl 44(%rsp),%eax + movl %r11d,%edi + andl %edx,%ebx + xorl 4(%rsp),%eax + orl %edx,%ecx + roll $5,%edi + xorl 24(%rsp),%eax + andl %esi,%ecx + addl %edi,%ebp + roll $1,%eax + orl %ecx,%ebx + roll $30,%r12d + movl %eax,36(%rsp) + addl %ebx,%ebp + leal -1894007588(%rax,%rsi,1),%edi + movl 40(%rsp),%eax + movl %r11d,%ebx + movl %r11d,%ecx + xorl 48(%rsp),%eax + movl %ebp,%esi + andl %r12d,%ebx + xorl 8(%rsp),%eax + orl %r12d,%ecx + roll $5,%esi + xorl 28(%rsp),%eax + andl %edx,%ecx + addl %esi,%edi + roll $1,%eax + orl %ecx,%ebx + roll $30,%r11d + movl %eax,40(%rsp) + addl %ebx,%edi + leal -1894007588(%rax,%rdx,1),%esi + movl 44(%rsp),%eax + movl %ebp,%ebx + movl %ebp,%ecx + xorl 52(%rsp),%eax + movl %edi,%edx + andl %r11d,%ebx + xorl 12(%rsp),%eax + orl %r11d,%ecx + roll $5,%edx + xorl 32(%rsp),%eax + andl %r12d,%ecx + addl %edx,%esi + roll $1,%eax + orl %ecx,%ebx + roll $30,%ebp + movl %eax,44(%rsp) + addl %ebx,%esi + leal -1894007588(%rax,%r12,1),%edx + movl 48(%rsp),%eax + movl %edi,%ebx + movl %edi,%ecx + xorl 56(%rsp),%eax + movl %esi,%r12d + andl %ebp,%ebx + xorl 16(%rsp),%eax + orl %ebp,%ecx + roll $5,%r12d + xorl 36(%rsp),%eax + andl %r11d,%ecx + addl %r12d,%edx + roll $1,%eax + orl %ecx,%ebx + roll $30,%edi + movl %eax,48(%rsp) + addl %ebx,%edx + leal -899497514(%rax,%r11,1),%r12d + movl 52(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 60(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 20(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 40(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,52(%rsp) + leal -899497514(%rax,%rbp,1),%r11d + movl 56(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 0(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 24(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 44(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,56(%rsp) + leal -899497514(%rax,%rdi,1),%ebp + movl 60(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 4(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 28(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 48(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,60(%rsp) + leal -899497514(%rax,%rsi,1),%edi + movl 0(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 8(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 32(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 52(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,0(%rsp) + leal -899497514(%rax,%rdx,1),%esi + movl 4(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 12(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 36(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 56(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,4(%rsp) + leal -899497514(%rax,%r12,1),%edx + movl 8(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 16(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 40(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 60(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,8(%rsp) + leal -899497514(%rax,%r11,1),%r12d + movl 12(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 20(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 44(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 0(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,12(%rsp) + leal -899497514(%rax,%rbp,1),%r11d + movl 16(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 24(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 48(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 4(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,16(%rsp) + leal -899497514(%rax,%rdi,1),%ebp + movl 20(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 28(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 52(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 8(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,20(%rsp) + leal -899497514(%rax,%rsi,1),%edi + movl 24(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 32(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 56(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 12(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,24(%rsp) + leal -899497514(%rax,%rdx,1),%esi + movl 28(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 36(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 60(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 16(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + movl %eax,28(%rsp) + leal -899497514(%rax,%r12,1),%edx + movl 32(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 40(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 0(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 20(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + movl %eax,32(%rsp) + leal -899497514(%rax,%r11,1),%r12d + movl 36(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 44(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 4(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 24(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + movl %eax,36(%rsp) + leal -899497514(%rax,%rbp,1),%r11d + movl 40(%rsp),%eax + movl %esi,%ebx + movl %r12d,%ebp + xorl 48(%rsp),%eax + xorl %edx,%ebx + roll $5,%ebp + xorl 8(%rsp),%eax + xorl %edi,%ebx + addl %ebp,%r11d + xorl 28(%rsp),%eax + roll $30,%edx + addl %ebx,%r11d + roll $1,%eax + movl %eax,40(%rsp) + leal -899497514(%rax,%rdi,1),%ebp + movl 44(%rsp),%eax + movl %edx,%ebx + movl %r11d,%edi + xorl 52(%rsp),%eax + xorl %r12d,%ebx + roll $5,%edi + xorl 12(%rsp),%eax + xorl %esi,%ebx + addl %edi,%ebp + xorl 32(%rsp),%eax + roll $30,%r12d + addl %ebx,%ebp + roll $1,%eax + movl %eax,44(%rsp) + leal -899497514(%rax,%rsi,1),%edi + movl 48(%rsp),%eax + movl %r12d,%ebx + movl %ebp,%esi + xorl 56(%rsp),%eax + xorl %r11d,%ebx + roll $5,%esi + xorl 16(%rsp),%eax + xorl %edx,%ebx + addl %esi,%edi + xorl 36(%rsp),%eax + roll $30,%r11d + addl %ebx,%edi + roll $1,%eax + movl %eax,48(%rsp) + leal -899497514(%rax,%rdx,1),%esi + movl 52(%rsp),%eax + movl %r11d,%ebx + movl %edi,%edx + xorl 60(%rsp),%eax + xorl %ebp,%ebx + roll $5,%edx + xorl 20(%rsp),%eax + xorl %r12d,%ebx + addl %edx,%esi + xorl 40(%rsp),%eax + roll $30,%ebp + addl %ebx,%esi + roll $1,%eax + leal -899497514(%rax,%r12,1),%edx + movl 56(%rsp),%eax + movl %ebp,%ebx + movl %esi,%r12d + xorl 0(%rsp),%eax + xorl %edi,%ebx + roll $5,%r12d + xorl 24(%rsp),%eax + xorl %r11d,%ebx + addl %r12d,%edx + xorl 44(%rsp),%eax + roll $30,%edi + addl %ebx,%edx + roll $1,%eax + leal -899497514(%rax,%r11,1),%r12d + movl 60(%rsp),%eax + movl %edi,%ebx + movl %edx,%r11d + xorl 4(%rsp),%eax + xorl %esi,%ebx + roll $5,%r11d + xorl 28(%rsp),%eax + xorl %ebp,%ebx + addl %r11d,%r12d + xorl 48(%rsp),%eax + roll $30,%esi + addl %ebx,%r12d + roll $1,%eax + leal -899497514(%rax,%rbp,1),%r11d + movl %esi,%ebx + movl %r12d,%ebp + xorl %edx,%ebx + roll $5,%ebp + xorl %edi,%ebx + addl %ebp,%r11d + roll $30,%edx + addl %ebx,%r11d + addl 0(%r8),%r11d + addl 4(%r8),%r12d + addl 8(%r8),%edx + addl 12(%r8),%esi + addl 16(%r8),%edi + movl %r11d,0(%r8) + movl %r12d,4(%r8) + movl %edx,8(%r8) + movl %esi,12(%r8) + movl %edi,16(%r8) + + xchgl %r11d,%edx + xchgl %r12d,%esi + xchgl %r11d,%edi + xchgl %r12d,%ebp + + leaq 64(%r9),%r9 + subq $1,%r10 + jnz .Lloop + movq 64(%rsp),%rsi + movq (%rsi),%r12 + movq 8(%rsi),%rbp + movq 16(%rsi),%rbx + leaq 24(%rsi),%rsp +.Lepilogue: + .byte 0xf3,0xc3 +.size wit_sha1_block_data_order,.-wit_sha1_block_data_order +.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 +.align 16 diff --git a/project/src/crypto/sha1_one.c b/project/src/crypto/sha1_one.c new file mode 100644 index 0000000..a47b78b --- /dev/null +++ b/project/src/crypto/sha1_one.c @@ -0,0 +1,74 @@ +/* crypto/sha/sha1_one.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * 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). + * + * 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)" + * 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)" + * + * 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 +#include +#include "wiimm-sha.h" + +unsigned char *WIIMM_SHA1(const unsigned char *d, size_t n, unsigned char *md) +{ + WIIMM_SHA_CTX c; + static unsigned char m[SHA_DIGEST_LENGTH]; + + if (md == NULL) md=m; + if (!WIIMM_SHA1_Init(&c)) + return NULL; + WIIMM_SHA1_Update(&c,d,n); + WIIMM_SHA1_Final(md,&c); + return(md); +} diff --git a/project/src/crypto/sha1dgst.c b/project/src/crypto/sha1dgst.c new file mode 100644 index 0000000..27561c3 --- /dev/null +++ b/project/src/crypto/sha1dgst.c @@ -0,0 +1,64 @@ +/* crypto/sha/sha1dgst.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * 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). + * + * 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)" + * 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)" + * + * 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.] + */ + +#undef SHA_0 +#define SHA_1 + +#include "ssl-asm.h" +#include "sha_locl.h" + diff --git a/project/src/crypto/sha_locl.h b/project/src/crypto/sha_locl.h new file mode 100644 index 0000000..875af80 --- /dev/null +++ b/project/src/crypto/sha_locl.h @@ -0,0 +1,435 @@ +/* crypto/sha/sha_locl.h */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * 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). + * + * 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)" + * 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)" + * + * 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 +#include +#include "wiimm-sha.h" + +#define DATA_ORDER_IS_BIG_ENDIAN + +#define HASH_LONG SHA_LONG +#define HASH_CTX WIIMM_SHA_CTX +#define HASH_CBLOCK SHA_CBLOCK +#define HASH_MAKE_STRING(c,s) do { \ + unsigned long ll; \ + ll=(c)->h0; HOST_l2c(ll,(s)); \ + ll=(c)->h1; HOST_l2c(ll,(s)); \ + ll=(c)->h2; HOST_l2c(ll,(s)); \ + ll=(c)->h3; HOST_l2c(ll,(s)); \ + ll=(c)->h4; HOST_l2c(ll,(s)); \ + } while (0) + +#if defined(SHA_0) + +# define HASH_UPDATE SHA_Update +# define HASH_TRANSFORM SHA_Transform +# define HASH_FINAL SHA_Final +# define HASH_INIT SHA_Init +# define HASH_BLOCK_DATA_ORDER sha_block_data_order +# define Xupdate(a,ix,ia,ib,ic,id) (ix=(a)=(ia^ib^ic^id)) + +static void sha_block_data_order (WIIMM_SHA_CTX *c, const void *p,size_t num); + +#elif defined(SHA_1) + +# define HASH_UPDATE WIIMM_SHA1_Update +# define HASH_TRANSFORM WIIMM_SHA1_Transform +# define HASH_FINAL WIIMM_SHA1_Final +# define HASH_INIT WIIMM_SHA1_Init +# define HASH_BLOCK_DATA_ORDER wit_sha1_block_data_order +# if defined(__MWERKS__) && defined(__MC68K__) + /* Metrowerks for Motorola fails otherwise:-( */ +# define Xupdate(a,ix,ia,ib,ic,id) do { (a)=(ia^ib^ic^id); \ + ix=(a)=ROTATE((a),1); \ + } while (0) +# else +# define Xupdate(a,ix,ia,ib,ic,id) ( (a)=(ia^ib^ic^id), \ + ix=(a)=ROTATE((a),1) \ + ) +# endif + +#ifndef SHA1_ASM +static +#endif +void wit_sha1_block_data_order (WIIMM_SHA_CTX *c, const void *p,size_t num); + +#else +# error "Either SHA_0 or SHA_1 must be defined." +#endif + +#include "md32_common.h" + +#define INIT_DATA_h0 0x67452301UL +#define INIT_DATA_h1 0xefcdab89UL +#define INIT_DATA_h2 0x98badcfeUL +#define INIT_DATA_h3 0x10325476UL +#define INIT_DATA_h4 0xc3d2e1f0UL + +int HASH_INIT (WIIMM_SHA_CTX *c) + { + memset (c,0,sizeof(*c)); + c->h0=INIT_DATA_h0; + c->h1=INIT_DATA_h1; + c->h2=INIT_DATA_h2; + c->h3=INIT_DATA_h3; + c->h4=INIT_DATA_h4; + return 1; + } + +#define K_00_19 0x5a827999UL +#define K_20_39 0x6ed9eba1UL +#define K_40_59 0x8f1bbcdcUL +#define K_60_79 0xca62c1d6UL + +/* As pointed out by Wei Dai , F() below can be + * simplified to the code in F_00_19. Wei attributes these optimisations + * to Peter Gutmann's SHS code, and he attributes it to Rich Schroeppel. + * #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) + * I've just become aware of another tweak to be made, again from Wei Dai, + * in F_40_59, (x&a)|(y&a) -> (x|y)&a + */ +#define F_00_19(b,c,d) ((((c) ^ (d)) & (b)) ^ (d)) +#define F_20_39(b,c,d) ((b) ^ (c) ^ (d)) +#define F_40_59(b,c,d) (((b) & (c)) | (((b)|(c)) & (d))) +#define F_60_79(b,c,d) F_20_39(b,c,d) + +#ifndef OPENSSL_SMALL_FOOTPRINT + +#define BODY_00_15(i,a,b,c,d,e,f,xi) \ + (f)=xi+(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#define BODY_16_19(i,a,b,c,d,e,f,xi,xa,xb,xc,xd) \ + Xupdate(f,xi,xa,xb,xc,xd); \ + (f)+=(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#define BODY_20_31(i,a,b,c,d,e,f,xi,xa,xb,xc,xd) \ + Xupdate(f,xi,xa,xb,xc,xd); \ + (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#define BODY_32_39(i,a,b,c,d,e,f,xa,xb,xc,xd) \ + Xupdate(f,xa,xa,xb,xc,xd); \ + (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#define BODY_40_59(i,a,b,c,d,e,f,xa,xb,xc,xd) \ + Xupdate(f,xa,xa,xb,xc,xd); \ + (f)+=(e)+K_40_59+ROTATE((a),5)+F_40_59((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#define BODY_60_79(i,a,b,c,d,e,f,xa,xb,xc,xd) \ + Xupdate(f,xa,xa,xb,xc,xd); \ + (f)=xa+(e)+K_60_79+ROTATE((a),5)+F_60_79((b),(c),(d)); \ + (b)=ROTATE((b),30); + +#ifdef X +#undef X +#endif +#ifndef MD32_XARRAY + /* + * Originally X was an array. As it's automatic it's natural + * to expect RISC compiler to accomodate at least part of it in + * the register bank, isn't it? Unfortunately not all compilers + * "find" this expectation reasonable:-( On order to make such + * compilers generate better code I replace X[] with a bunch of + * X0, X1, etc. See the function body below... + * + */ +# define X(i) XX##i +#else + /* + * However! Some compilers (most notably HP C) get overwhelmed by + * that many local variables so that we have to have the way to + * fall down to the original behavior. + */ +# define X(i) XX[i] +#endif + +#if !defined(SHA_1) || !defined(SHA1_ASM) +static void HASH_BLOCK_DATA_ORDER (WIIMM_SHA_CTX *c, const void *p, size_t num) + { + const unsigned char *data=p; + register unsigned MD32_REG_T A,B,C,D,E,T,l; +#ifndef MD32_XARRAY + unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, + XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15; +#else + SHA_LONG XX[16]; +#endif + + A=c->h0; + B=c->h1; + C=c->h2; + D=c->h3; + E=c->h4; + + for(;;) + { + const union { long one; char little; } is_endian = {1}; + + if (!is_endian.little && sizeof(SHA_LONG)==4 && ((size_t)p%4)==0) + { + const SHA_LONG *W=(const SHA_LONG *)data; + + X( 0) = W[0]; X( 1) = W[ 1]; + BODY_00_15( 0,A,B,C,D,E,T,X( 0)); X( 2) = W[ 2]; + BODY_00_15( 1,T,A,B,C,D,E,X( 1)); X( 3) = W[ 3]; + BODY_00_15( 2,E,T,A,B,C,D,X( 2)); X( 4) = W[ 4]; + BODY_00_15( 3,D,E,T,A,B,C,X( 3)); X( 5) = W[ 5]; + BODY_00_15( 4,C,D,E,T,A,B,X( 4)); X( 6) = W[ 6]; + BODY_00_15( 5,B,C,D,E,T,A,X( 5)); X( 7) = W[ 7]; + BODY_00_15( 6,A,B,C,D,E,T,X( 6)); X( 8) = W[ 8]; + BODY_00_15( 7,T,A,B,C,D,E,X( 7)); X( 9) = W[ 9]; + BODY_00_15( 8,E,T,A,B,C,D,X( 8)); X(10) = W[10]; + BODY_00_15( 9,D,E,T,A,B,C,X( 9)); X(11) = W[11]; + BODY_00_15(10,C,D,E,T,A,B,X(10)); X(12) = W[12]; + BODY_00_15(11,B,C,D,E,T,A,X(11)); X(13) = W[13]; + BODY_00_15(12,A,B,C,D,E,T,X(12)); X(14) = W[14]; + BODY_00_15(13,T,A,B,C,D,E,X(13)); X(15) = W[15]; + BODY_00_15(14,E,T,A,B,C,D,X(14)); + BODY_00_15(15,D,E,T,A,B,C,X(15)); + + data += SHA_CBLOCK; + } + else + { + HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l; + BODY_00_15( 0,A,B,C,D,E,T,X( 0)); HOST_c2l(data,l); X( 2)=l; + BODY_00_15( 1,T,A,B,C,D,E,X( 1)); HOST_c2l(data,l); X( 3)=l; + BODY_00_15( 2,E,T,A,B,C,D,X( 2)); HOST_c2l(data,l); X( 4)=l; + BODY_00_15( 3,D,E,T,A,B,C,X( 3)); HOST_c2l(data,l); X( 5)=l; + BODY_00_15( 4,C,D,E,T,A,B,X( 4)); HOST_c2l(data,l); X( 6)=l; + BODY_00_15( 5,B,C,D,E,T,A,X( 5)); HOST_c2l(data,l); X( 7)=l; + BODY_00_15( 6,A,B,C,D,E,T,X( 6)); HOST_c2l(data,l); X( 8)=l; + BODY_00_15( 7,T,A,B,C,D,E,X( 7)); HOST_c2l(data,l); X( 9)=l; + BODY_00_15( 8,E,T,A,B,C,D,X( 8)); HOST_c2l(data,l); X(10)=l; + BODY_00_15( 9,D,E,T,A,B,C,X( 9)); HOST_c2l(data,l); X(11)=l; + BODY_00_15(10,C,D,E,T,A,B,X(10)); HOST_c2l(data,l); X(12)=l; + BODY_00_15(11,B,C,D,E,T,A,X(11)); HOST_c2l(data,l); X(13)=l; + BODY_00_15(12,A,B,C,D,E,T,X(12)); HOST_c2l(data,l); X(14)=l; + BODY_00_15(13,T,A,B,C,D,E,X(13)); HOST_c2l(data,l); X(15)=l; + BODY_00_15(14,E,T,A,B,C,D,X(14)); + BODY_00_15(15,D,E,T,A,B,C,X(15)); + } + + BODY_16_19(16,C,D,E,T,A,B,X( 0),X( 0),X( 2),X( 8),X(13)); + BODY_16_19(17,B,C,D,E,T,A,X( 1),X( 1),X( 3),X( 9),X(14)); + BODY_16_19(18,A,B,C,D,E,T,X( 2),X( 2),X( 4),X(10),X(15)); + BODY_16_19(19,T,A,B,C,D,E,X( 3),X( 3),X( 5),X(11),X( 0)); + + BODY_20_31(20,E,T,A,B,C,D,X( 4),X( 4),X( 6),X(12),X( 1)); + BODY_20_31(21,D,E,T,A,B,C,X( 5),X( 5),X( 7),X(13),X( 2)); + BODY_20_31(22,C,D,E,T,A,B,X( 6),X( 6),X( 8),X(14),X( 3)); + BODY_20_31(23,B,C,D,E,T,A,X( 7),X( 7),X( 9),X(15),X( 4)); + BODY_20_31(24,A,B,C,D,E,T,X( 8),X( 8),X(10),X( 0),X( 5)); + BODY_20_31(25,T,A,B,C,D,E,X( 9),X( 9),X(11),X( 1),X( 6)); + BODY_20_31(26,E,T,A,B,C,D,X(10),X(10),X(12),X( 2),X( 7)); + BODY_20_31(27,D,E,T,A,B,C,X(11),X(11),X(13),X( 3),X( 8)); + BODY_20_31(28,C,D,E,T,A,B,X(12),X(12),X(14),X( 4),X( 9)); + BODY_20_31(29,B,C,D,E,T,A,X(13),X(13),X(15),X( 5),X(10)); + BODY_20_31(30,A,B,C,D,E,T,X(14),X(14),X( 0),X( 6),X(11)); + BODY_20_31(31,T,A,B,C,D,E,X(15),X(15),X( 1),X( 7),X(12)); + + BODY_32_39(32,E,T,A,B,C,D,X( 0),X( 2),X( 8),X(13)); + BODY_32_39(33,D,E,T,A,B,C,X( 1),X( 3),X( 9),X(14)); + BODY_32_39(34,C,D,E,T,A,B,X( 2),X( 4),X(10),X(15)); + BODY_32_39(35,B,C,D,E,T,A,X( 3),X( 5),X(11),X( 0)); + BODY_32_39(36,A,B,C,D,E,T,X( 4),X( 6),X(12),X( 1)); + BODY_32_39(37,T,A,B,C,D,E,X( 5),X( 7),X(13),X( 2)); + BODY_32_39(38,E,T,A,B,C,D,X( 6),X( 8),X(14),X( 3)); + BODY_32_39(39,D,E,T,A,B,C,X( 7),X( 9),X(15),X( 4)); + + BODY_40_59(40,C,D,E,T,A,B,X( 8),X(10),X( 0),X( 5)); + BODY_40_59(41,B,C,D,E,T,A,X( 9),X(11),X( 1),X( 6)); + BODY_40_59(42,A,B,C,D,E,T,X(10),X(12),X( 2),X( 7)); + BODY_40_59(43,T,A,B,C,D,E,X(11),X(13),X( 3),X( 8)); + BODY_40_59(44,E,T,A,B,C,D,X(12),X(14),X( 4),X( 9)); + BODY_40_59(45,D,E,T,A,B,C,X(13),X(15),X( 5),X(10)); + BODY_40_59(46,C,D,E,T,A,B,X(14),X( 0),X( 6),X(11)); + BODY_40_59(47,B,C,D,E,T,A,X(15),X( 1),X( 7),X(12)); + BODY_40_59(48,A,B,C,D,E,T,X( 0),X( 2),X( 8),X(13)); + BODY_40_59(49,T,A,B,C,D,E,X( 1),X( 3),X( 9),X(14)); + BODY_40_59(50,E,T,A,B,C,D,X( 2),X( 4),X(10),X(15)); + BODY_40_59(51,D,E,T,A,B,C,X( 3),X( 5),X(11),X( 0)); + BODY_40_59(52,C,D,E,T,A,B,X( 4),X( 6),X(12),X( 1)); + BODY_40_59(53,B,C,D,E,T,A,X( 5),X( 7),X(13),X( 2)); + BODY_40_59(54,A,B,C,D,E,T,X( 6),X( 8),X(14),X( 3)); + BODY_40_59(55,T,A,B,C,D,E,X( 7),X( 9),X(15),X( 4)); + BODY_40_59(56,E,T,A,B,C,D,X( 8),X(10),X( 0),X( 5)); + BODY_40_59(57,D,E,T,A,B,C,X( 9),X(11),X( 1),X( 6)); + BODY_40_59(58,C,D,E,T,A,B,X(10),X(12),X( 2),X( 7)); + BODY_40_59(59,B,C,D,E,T,A,X(11),X(13),X( 3),X( 8)); + + BODY_60_79(60,A,B,C,D,E,T,X(12),X(14),X( 4),X( 9)); + BODY_60_79(61,T,A,B,C,D,E,X(13),X(15),X( 5),X(10)); + BODY_60_79(62,E,T,A,B,C,D,X(14),X( 0),X( 6),X(11)); + BODY_60_79(63,D,E,T,A,B,C,X(15),X( 1),X( 7),X(12)); + BODY_60_79(64,C,D,E,T,A,B,X( 0),X( 2),X( 8),X(13)); + BODY_60_79(65,B,C,D,E,T,A,X( 1),X( 3),X( 9),X(14)); + BODY_60_79(66,A,B,C,D,E,T,X( 2),X( 4),X(10),X(15)); + BODY_60_79(67,T,A,B,C,D,E,X( 3),X( 5),X(11),X( 0)); + BODY_60_79(68,E,T,A,B,C,D,X( 4),X( 6),X(12),X( 1)); + BODY_60_79(69,D,E,T,A,B,C,X( 5),X( 7),X(13),X( 2)); + BODY_60_79(70,C,D,E,T,A,B,X( 6),X( 8),X(14),X( 3)); + BODY_60_79(71,B,C,D,E,T,A,X( 7),X( 9),X(15),X( 4)); + BODY_60_79(72,A,B,C,D,E,T,X( 8),X(10),X( 0),X( 5)); + BODY_60_79(73,T,A,B,C,D,E,X( 9),X(11),X( 1),X( 6)); + BODY_60_79(74,E,T,A,B,C,D,X(10),X(12),X( 2),X( 7)); + BODY_60_79(75,D,E,T,A,B,C,X(11),X(13),X( 3),X( 8)); + BODY_60_79(76,C,D,E,T,A,B,X(12),X(14),X( 4),X( 9)); + BODY_60_79(77,B,C,D,E,T,A,X(13),X(15),X( 5),X(10)); + BODY_60_79(78,A,B,C,D,E,T,X(14),X( 0),X( 6),X(11)); + BODY_60_79(79,T,A,B,C,D,E,X(15),X( 1),X( 7),X(12)); + + c->h0=(c->h0+E)&0xffffffffL; + c->h1=(c->h1+T)&0xffffffffL; + c->h2=(c->h2+A)&0xffffffffL; + c->h3=(c->h3+B)&0xffffffffL; + c->h4=(c->h4+C)&0xffffffffL; + + if (--num == 0) break; + + A=c->h0; + B=c->h1; + C=c->h2; + D=c->h3; + E=c->h4; + + } + } +#endif + +#else /* OPENSSL_SMALL_FOOTPRINT */ + +#define BODY_00_15(xi) do { \ + T=E+K_00_19+F_00_19(B,C,D); \ + E=D, D=C, C=ROTATE(B,30), B=A; \ + A=ROTATE(A,5)+T+xi; } while(0) + +#define BODY_16_19(xa,xb,xc,xd) do { \ + Xupdate(T,xa,xa,xb,xc,xd); \ + T+=E+K_00_19+F_00_19(B,C,D); \ + E=D, D=C, C=ROTATE(B,30), B=A; \ + A=ROTATE(A,5)+T; } while(0) + +#define BODY_20_39(xa,xb,xc,xd) do { \ + Xupdate(T,xa,xa,xb,xc,xd); \ + T+=E+K_20_39+F_20_39(B,C,D); \ + E=D, D=C, C=ROTATE(B,30), B=A; \ + A=ROTATE(A,5)+T; } while(0) + +#define BODY_40_59(xa,xb,xc,xd) do { \ + Xupdate(T,xa,xa,xb,xc,xd); \ + T+=E+K_40_59+F_40_59(B,C,D); \ + E=D, D=C, C=ROTATE(B,30), B=A; \ + A=ROTATE(A,5)+T; } while(0) + +#define BODY_60_79(xa,xb,xc,xd) do { \ + Xupdate(T,xa,xa,xb,xc,xd); \ + T=E+K_60_79+F_60_79(B,C,D); \ + E=D, D=C, C=ROTATE(B,30), B=A; \ + A=ROTATE(A,5)+T+xa; } while(0) + +#if !defined(SHA_1) || !defined(SHA1_ASM) +static void HASH_BLOCK_DATA_ORDER (WIIMM_SHA_CTX *c, const void *p, size_t num) + { + const unsigned char *data=p; + register unsigned MD32_REG_T A,B,C,D,E,T,l; + int i; + SHA_LONG X[16]; + + A=c->h0; + B=c->h1; + C=c->h2; + D=c->h3; + E=c->h4; + + for(;;) + { + for (i=0;i<16;i++) + { HOST_c2l(data,l); X[i]=l; BODY_00_15(X[i]); } + for (i=0;i<4;i++) + { BODY_16_19(X[i], X[i+2], X[i+8], X[(i+13)&15]); } + for (;i<24;i++) + { BODY_20_39(X[i&15], X[(i+2)&15], X[(i+8)&15],X[(i+13)&15]); } + for (i=0;i<20;i++) + { BODY_40_59(X[(i+8)&15],X[(i+10)&15],X[i&15], X[(i+5)&15]); } + for (i=4;i<24;i++) + { BODY_60_79(X[(i+8)&15],X[(i+10)&15],X[i&15], X[(i+5)&15]); } + + c->h0=(c->h0+A)&0xffffffffL; + c->h1=(c->h1+B)&0xffffffffL; + c->h2=(c->h2+C)&0xffffffffL; + c->h3=(c->h3+D)&0xffffffffL; + c->h4=(c->h4+E)&0xffffffffL; + + if (--num == 0) break; + + A=c->h0; + B=c->h1; + C=c->h2; + D=c->h3; + E=c->h4; + + } + } +#endif + +#endif diff --git a/project/src/crypto/ssl-asm.S b/project/src/crypto/ssl-asm.S new file mode 100644 index 0000000..0205a32 --- /dev/null +++ b/project/src/crypto/ssl-asm.S @@ -0,0 +1,39 @@ + +/*************************************************************************** + * __ __ _ ___________ * + * \ \ / /| |____ ____| * + * \ \ / / | | | | * + * \ \ /\ / / | | | | * + * \ \/ \/ / | | | | * + * \ /\ / | | | | * + * \/ \/ |_| |_| * + * * + * Wiimms ISO Tools * + * http://wit.wiimm.de/ * + * * + *************************************************************************** + * * + * This file is part of the WIT project. * + * Visit http://wit.wiimm.de/ for project details and sources. * + * * + * Copyright (c) 2011-2020 by Dirk Clemens * + * * + *************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * + * * + ***************************************************************************/ + +#define WIIMM_INCLUDE_SSL_ASM +#include "ssl-asm.h" + diff --git a/project/src/crypto/ssl-asm.h b/project/src/crypto/ssl-asm.h new file mode 100644 index 0000000..aef71db --- /dev/null +++ b/project/src/crypto/ssl-asm.h @@ -0,0 +1,56 @@ + +/*************************************************************************** + * _______ _______ _______ * + * | ___ |____ | ___ | * + * | | |_| / /| | |_| * + * | |_____ / / | |_____ * + * |_____ | / / |_____ | * + * _ | | / / _ | | * + * | |___| |/ /____| |___| | * + * |_______|_______|_______| * + * * + * Wiimms SZS Tools * + * https://szs.wiimm.de/ * + * * + *************************************************************************** + * * + * This file is part of the SZS project. * + * Visit https://szs.wiimm.de/ for project details and sources. * + * * + * Copyright (c) 2011-2020 by Dirk Clemens * + * * + *************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt * + * * + ***************************************************************************/ + +#ifdef __CYGWIN__ + #define SHA1_ASM + #ifdef WIIMM_INCLUDE_SSL_ASM + #include "sha1-586-cygwin.s" + #endif +#elif defined(__linux__) + #if defined(__i386__) + #define SHA1_ASM + #ifdef WIIMM_INCLUDE_SSL_ASM + #include "sha1-586-elf.s" + #endif + #elif defined(__x86_64__) + #define SHA1_ASM + #ifdef WIIMM_INCLUDE_SSL_ASM + #include "sha1-x86_64.s" + #endif + #endif +#endif + diff --git a/project/src/crypto/wiimm-sha.h b/project/src/crypto/wiimm-sha.h new file mode 100644 index 0000000..b548057 --- /dev/null +++ b/project/src/crypto/wiimm-sha.h @@ -0,0 +1,204 @@ +/* crypto/sha/sha.h */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * 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). + * + * 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)" + * 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)" + * + * 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.] + */ + +#ifndef WIIMM_HEADER_SHA_H +#define WIIMM_HEADER_SHA_H + +#define OPENSSL_NO_SHA0 +#define OPENSSL_NO_SHA256 +#define OPENSSL_NO_SHA512 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1)) +#error SHA is disabled. +#endif + +#if defined(OPENSSL_FIPS) +#define FIPS_SHA_SIZE_T size_t +#endif + +/* + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then ! + * ! SHA_LONG_LOG2 has to be defined along. ! + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + */ + +#if defined(__LP32__) +#define SHA_LONG unsigned long +#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#define SHA_LONG unsigned long +#define SHA_LONG_LOG2 3 +#else +#define SHA_LONG unsigned int +#endif + +#define SHA_LBLOCK 16 +#define SHA_CBLOCK (SHA_LBLOCK*4) /* SHA treats input data as a + * contiguous array of 32 bit + * wide big-endian values. */ +#define SHA_LAST_BLOCK (SHA_CBLOCK-8) +#define SHA_DIGEST_LENGTH 20 + +typedef struct WIIMM_SHAstate_st + { + SHA_LONG h0,h1,h2,h3,h4; + SHA_LONG Nl,Nh; + SHA_LONG data[SHA_LBLOCK]; + unsigned int num; + } WIIMM_SHA_CTX; + +#ifndef OPENSSL_NO_SHA0 +int SHA_Init(WIIMM_SHA_CTX *c); +int SHA_Update(WIIMM_SHA_CTX *c, const void *data, size_t len); +int SHA_Final(unsigned char *md, WIIMM_SHA_CTX *c); +unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md); +void SHA_Transform(WIIMM_SHA_CTX *c, const unsigned char *data); +#endif + +#ifndef OPENSSL_NO_SHA1 +int WIIMM_SHA1_Init(WIIMM_SHA_CTX *c); +int WIIMM_SHA1_Update(WIIMM_SHA_CTX *c, const void *data, size_t len); +int WIIMM_SHA1_Final(unsigned char *md, WIIMM_SHA_CTX *c); +unsigned char *WIIMM_SHA1(const unsigned char *d, size_t n, unsigned char *md); +void WIIMM_SHA1_Transform(WIIMM_SHA_CTX *c, const unsigned char *data); +#endif + +#define SHA256_CBLOCK (SHA_LBLOCK*4) /* SHA-256 treats input data as a + * contiguous array of 32 bit + * wide big-endian values. */ +#define SHA224_DIGEST_LENGTH 28 +#define SHA256_DIGEST_LENGTH 32 + +typedef struct WIIMM_SHA256state_st + { + SHA_LONG h[8]; + SHA_LONG Nl,Nh; + SHA_LONG data[SHA_LBLOCK]; + unsigned int num,md_len; + } WIIMM_SHA256_CTX; + +#ifndef OPENSSL_NO_SHA256 +int SHA224_Init(WIIMM_SHA256_CTX *c); +int SHA224_Update(WIIMM_SHA256_CTX *c, const void *data, size_t len); +int SHA224_Final(unsigned char *md, WIIMM_SHA256_CTX *c); +unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md); +int SHA256_Init(WIIMM_SHA256_CTX *c); +int SHA256_Update(WIIMM_SHA256_CTX *c, const void *data, size_t len); +int SHA256_Final(unsigned char *md, WIIMM_SHA256_CTX *c); +unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md); +void SHA256_Transform(WIIMM_SHA256_CTX *c, const unsigned char *data); +#endif + +#define SHA384_DIGEST_LENGTH 48 +#define SHA512_DIGEST_LENGTH 64 + +#ifndef OPENSSL_NO_SHA512 +/* + * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 + * being exactly 64-bit wide. See Implementation Notes in sha512.c + * for further details. + */ +#define SHA512_CBLOCK (SHA_LBLOCK*8) /* SHA-512 treats input data as a + * contiguous array of 64 bit + * wide big-endian values. */ +#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) +#define SHA_LONG64 unsigned __int64 +#define U64(C) C##UI64 +#elif defined(__arch64__) +#define SHA_LONG64 unsigned long +#define U64(C) C##UL +#else +#define SHA_LONG64 unsigned long long +#define U64(C) C##ULL +#endif + +typedef struct SHA512state_st + { + SHA_LONG64 h[8]; + SHA_LONG64 Nl,Nh; + union { + SHA_LONG64 d[SHA_LBLOCK]; + unsigned char p[SHA512_CBLOCK]; + } u; + unsigned int num,md_len; + } SHA512_CTX; +#endif + +#ifndef OPENSSL_NO_SHA512 +int SHA384_Init(SHA512_CTX *c); +int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); +int SHA384_Final(unsigned char *md, SHA512_CTX *c); +unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md); +int SHA512_Init(SHA512_CTX *c); +int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); +int SHA512_Final(unsigned char *md, SHA512_CTX *c); +unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md); +void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); +#endif + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.3.1