summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/sha
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/sha')
-rw-r--r--src/lib/libcrypto/sha/Makefile.ssl42
-rw-r--r--src/lib/libcrypto/sha/Makefile.uni2
-rw-r--r--src/lib/libcrypto/sha/asm/sha1-586.pl4
-rw-r--r--src/lib/libcrypto/sha/asm/sx86unix.cpp1948
-rw-r--r--src/lib/libcrypto/sha/sha.c19
-rw-r--r--src/lib/libcrypto/sha/sha.h58
-rw-r--r--src/lib/libcrypto/sha/sha1.c18
-rw-r--r--src/lib/libcrypto/sha/sha1_one.c9
-rw-r--r--src/lib/libcrypto/sha/sha1dgst.c244
-rw-r--r--src/lib/libcrypto/sha/sha1s.cpp2
-rw-r--r--src/lib/libcrypto/sha/sha1test.c35
-rw-r--r--src/lib/libcrypto/sha/sha_dgst.c250
-rw-r--r--src/lib/libcrypto/sha/sha_locl.h78
-rw-r--r--src/lib/libcrypto/sha/sha_one.c9
-rw-r--r--src/lib/libcrypto/sha/sha_sgst.c246
-rw-r--r--src/lib/libcrypto/sha/shatest.c35
16 files changed, 475 insertions, 2524 deletions
diff --git a/src/lib/libcrypto/sha/Makefile.ssl b/src/lib/libcrypto/sha/Makefile.ssl
index eeb545d140..d01245ce37 100644
--- a/src/lib/libcrypto/sha/Makefile.ssl
+++ b/src/lib/libcrypto/sha/Makefile.ssl
@@ -7,9 +7,11 @@ TOP= ../..
7CC= cc 7CC= cc
8INCLUDES= 8INCLUDES=
9CFLAG=-g 9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
10INSTALLTOP=/usr/local/ssl 12INSTALLTOP=/usr/local/ssl
11MAKE= make -f Makefile.ssl 13MAKE= make -f Makefile.ssl
12MAKEDEPEND= makedepend -f Makefile.ssl 14MAKEDEPEND= $(TOP)/util/domd $(TOP)
13MAKEFILE= Makefile.ssl 15MAKEFILE= Makefile.ssl
14AR= ar r 16AR= ar r
15 17
@@ -39,7 +41,7 @@ all: lib
39 41
40lib: $(LIBOBJ) 42lib: $(LIBOBJ)
41 $(AR) $(LIB) $(LIBOBJ) 43 $(AR) $(LIB) $(LIBOBJ)
42 sh $(TOP)/util/ranlib.sh $(LIB) 44 $(RANLIB) $(LIB)
43 @touch lib 45 @touch lib
44 46
45# elf 47# elf
@@ -58,26 +60,25 @@ asm/sx86-out.o: asm/sx86unix.cpp
58 60
59# bsdi 61# bsdi
60asm/sx86bsdi.o: asm/sx86unix.cpp 62asm/sx86bsdi.o: asm/sx86unix.cpp
61 $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o 63 $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
62 64
63asm/sx86unix.cpp: 65asm/sx86unix.cpp:
64 (cd asm; perl sha1-586.pl cpp >sx86unix.cpp) 66 (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
65 67
66files: 68files:
67 perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO 69 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68 70
69links: 71links:
70 /bin/rm -f Makefile 72 @$(TOP)/util/point.sh Makefile.ssl Makefile
71 $(TOP)/util/point.sh Makefile.ssl Makefile ; 73 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72 $(TOP)/util/mklink.sh ../../include $(EXHEADER) 74 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73 $(TOP)/util/mklink.sh ../../test $(TEST) 75 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74 $(TOP)/util/mklink.sh ../../apps $(APPS)
75 76
76install: 77install:
77 @for i in $(EXHEADER) ; \ 78 @for i in $(EXHEADER) ; \
78 do \ 79 do \
79 (cp $$i $(INSTALLTOP)/include/$$i; \ 80 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
80 chmod 644 $(INSTALLTOP)/include/$$i ); \ 81 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81 done; 82 done;
82 83
83tags: 84tags:
@@ -89,15 +90,22 @@ lint:
89 lint -DLINT $(INCLUDES) $(SRC)>fluff 90 lint -DLINT $(INCLUDES) $(SRC)>fluff
90 91
91depend: 92depend:
92 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) 93 $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
93 94
94dclean: 95dclean:
95 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 96 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
96 mv -f Makefile.new $(MAKEFILE) 97 mv -f Makefile.new $(MAKEFILE)
97 98
98clean: 99clean:
99 /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o 100 rm -f asm/sx86unix.cpp *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
100
101errors:
102 101
103# DO NOT DELETE THIS LINE -- make depend depends on it. 102# DO NOT DELETE THIS LINE -- make depend depends on it.
103
104sha1_one.o: ../../include/openssl/sha.h
105sha1dgst.o: ../../include/openssl/opensslconf.h
106sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
107sha1dgst.o: sha_locl.h
108sha_dgst.o: ../../include/openssl/opensslconf.h
109sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
110sha_dgst.o: sha_locl.h
111sha_one.o: ../../include/openssl/sha.h
diff --git a/src/lib/libcrypto/sha/Makefile.uni b/src/lib/libcrypto/sha/Makefile.uni
index f3236755b2..b7ec5caa4e 100644
--- a/src/lib/libcrypto/sha/Makefile.uni
+++ b/src/lib/libcrypto/sha/Makefile.uni
@@ -49,7 +49,7 @@ all: $(LIB) $(TEST) $(APPS)
49 49
50$(LIB): $(LIBOBJ) 50$(LIB): $(LIBOBJ)
51 $(AR) $(LIB) $(LIBOBJ) 51 $(AR) $(LIB) $(LIBOBJ)
52 sh $(TOP)/ranlib.sh $(LIB) 52 $(RANLIB) $(LIB)
53 53
54# elf 54# elf
55asm/sx86-elf.o: asm/sx86unix.cpp 55asm/sx86-elf.o: asm/sx86unix.cpp
diff --git a/src/lib/libcrypto/sha/asm/sha1-586.pl b/src/lib/libcrypto/sha/asm/sha1-586.pl
index d6d998f8ee..04e42ab09f 100644
--- a/src/lib/libcrypto/sha/asm/sha1-586.pl
+++ b/src/lib/libcrypto/sha/asm/sha1-586.pl
@@ -1,11 +1,11 @@
1#!/usr/bin/perl 1#!/usr/local/bin/perl
2 2
3$normal=0; 3$normal=0;
4 4
5push(@INC,"perlasm","../../perlasm"); 5push(@INC,"perlasm","../../perlasm");
6require "x86asm.pl"; 6require "x86asm.pl";
7 7
8&asm_init($ARGV[0],"sha1-586.pl"); 8&asm_init($ARGV[0],"sha1-586.pl",$ARGV[$#ARGV] eq "386");
9 9
10$A="eax"; 10$A="eax";
11$B="ebx"; 11$B="ebx";
diff --git a/src/lib/libcrypto/sha/asm/sx86unix.cpp b/src/lib/libcrypto/sha/asm/sx86unix.cpp
deleted file mode 100644
index 8366664a39..0000000000
--- a/src/lib/libcrypto/sha/asm/sx86unix.cpp
+++ /dev/null
@@ -1,1948 +0,0 @@
1/* Run the C pre-processor over this file with one of the following defined
2 * ELF - elf object files,
3 * OUT - a.out object files,
4 * BSDI - BSDI style a.out object files
5 * SOL - Solaris style elf
6 */
7
8#define TYPE(a,b) .type a,b
9#define SIZE(a,b) .size a,b
10
11#if defined(OUT) || defined(BSDI)
12#define sha1_block_x86 _sha1_block_x86
13
14#endif
15
16#ifdef OUT
17#define OK 1
18#define ALIGN 4
19#endif
20
21#ifdef BSDI
22#define OK 1
23#define ALIGN 4
24#undef SIZE
25#undef TYPE
26#define SIZE(a,b)
27#define TYPE(a,b)
28#endif
29
30#if defined(ELF) || defined(SOL)
31#define OK 1
32#define ALIGN 16
33#endif
34
35#ifndef OK
36You need to define one of
37ELF - elf systems - linux-elf, NetBSD and DG-UX
38OUT - a.out systems - linux-a.out and FreeBSD
39SOL - solaris systems, which are elf with strange comment lines
40BSDI - a.out with a very primative version of as.
41#endif
42
43/* Let the Assembler begin :-) */
44 /* Don't even think of reading this code */
45 /* It was automatically generated by sha1-586.pl */
46 /* Which is a perl program used to generate the x86 assember for */
47 /* any of elf, a.out, BSDI,Win32, or Solaris */
48 /* eric <eay@cryptsoft.com> */
49
50 .file "sha1-586.s"
51 .version "01.01"
52gcc2_compiled.:
53.text
54 .align ALIGN
55.globl sha1_block_x86
56 TYPE(sha1_block_x86,@function)
57sha1_block_x86:
58 pushl %esi
59 pushl %ebp
60 movl 20(%esp), %eax
61 movl 16(%esp), %esi
62 addl %esi, %eax
63 movl 12(%esp), %ebp
64 pushl %ebx
65 subl $64, %eax
66 pushl %edi
67 movl 4(%ebp), %ebx
68 subl $72, %esp
69 movl 12(%ebp), %edx
70 movl 16(%ebp), %edi
71 movl 8(%ebp), %ecx
72 movl %eax, 68(%esp)
73 /* First we need to setup the X array */
74 movl (%esi), %eax
75.L000start:
76 /* First, load the words onto the stack in network byte order */
77.byte 15
78.byte 200 /* bswapl %eax */
79 movl %eax, (%esp)
80 movl 4(%esi), %eax
81.byte 15
82.byte 200 /* bswapl %eax */
83 movl %eax, 4(%esp)
84 movl 8(%esi), %eax
85.byte 15
86.byte 200 /* bswapl %eax */
87 movl %eax, 8(%esp)
88 movl 12(%esi), %eax
89.byte 15
90.byte 200 /* bswapl %eax */
91 movl %eax, 12(%esp)
92 movl 16(%esi), %eax
93.byte 15
94.byte 200 /* bswapl %eax */
95 movl %eax, 16(%esp)
96 movl 20(%esi), %eax
97.byte 15
98.byte 200 /* bswapl %eax */
99 movl %eax, 20(%esp)
100 movl 24(%esi), %eax
101.byte 15
102.byte 200 /* bswapl %eax */
103 movl %eax, 24(%esp)
104 movl 28(%esi), %eax
105.byte 15
106.byte 200 /* bswapl %eax */
107 movl %eax, 28(%esp)
108 movl 32(%esi), %eax
109.byte 15
110.byte 200 /* bswapl %eax */
111 movl %eax, 32(%esp)
112 movl 36(%esi), %eax
113.byte 15
114.byte 200 /* bswapl %eax */
115 movl %eax, 36(%esp)
116 movl 40(%esi), %eax
117.byte 15
118.byte 200 /* bswapl %eax */
119 movl %eax, 40(%esp)
120 movl 44(%esi), %eax
121.byte 15
122.byte 200 /* bswapl %eax */
123 movl %eax, 44(%esp)
124 movl 48(%esi), %eax
125.byte 15
126.byte 200 /* bswapl %eax */
127 movl %eax, 48(%esp)
128 movl 52(%esi), %eax
129.byte 15
130.byte 200 /* bswapl %eax */
131 movl %eax, 52(%esp)
132 movl 56(%esi), %eax
133.byte 15
134.byte 200 /* bswapl %eax */
135 movl %eax, 56(%esp)
136 movl 60(%esi), %eax
137.byte 15
138.byte 200 /* bswapl %eax */
139 movl %eax, 60(%esp)
140 /* We now have the X array on the stack */
141 /* starting at sp-4 */
142 movl %esi, 64(%esp)
143
144 /* Start processing */
145 movl (%ebp), %eax
146 /* 00_15 0 */
147 movl %ecx, %esi
148 movl %eax, %ebp
149 xorl %edx, %esi
150 roll $5, %ebp
151 andl %ebx, %esi
152 addl %edi, %ebp
153.byte 209
154.byte 203 /* rorl $1 %ebx */
155 movl (%esp), %edi
156.byte 209
157.byte 203 /* rorl $1 %ebx */
158 xorl %edx, %esi
159 leal 1518500249(%ebp,%edi,1),%ebp
160 movl %ebx, %edi
161 addl %ebp, %esi
162 xorl %ecx, %edi
163 movl %esi, %ebp
164 andl %eax, %edi
165 roll $5, %ebp
166 addl %edx, %ebp
167 movl 4(%esp), %edx
168.byte 209
169.byte 200 /* rorl $1 %eax */
170 xorl %ecx, %edi
171.byte 209
172.byte 200 /* rorl $1 %eax */
173 leal 1518500249(%ebp,%edx,1),%ebp
174 addl %ebp, %edi
175 /* 00_15 2 */
176 movl %eax, %edx
177 movl %edi, %ebp
178 xorl %ebx, %edx
179 roll $5, %ebp
180 andl %esi, %edx
181 addl %ecx, %ebp
182.byte 209
183.byte 206 /* rorl $1 %esi */
184 movl 8(%esp), %ecx
185.byte 209
186.byte 206 /* rorl $1 %esi */
187 xorl %ebx, %edx
188 leal 1518500249(%ebp,%ecx,1),%ebp
189 movl %esi, %ecx
190 addl %ebp, %edx
191 xorl %eax, %ecx
192 movl %edx, %ebp
193 andl %edi, %ecx
194 roll $5, %ebp
195 addl %ebx, %ebp
196 movl 12(%esp), %ebx
197.byte 209
198.byte 207 /* rorl $1 %edi */
199 xorl %eax, %ecx
200.byte 209
201.byte 207 /* rorl $1 %edi */
202 leal 1518500249(%ebp,%ebx,1),%ebp
203 addl %ebp, %ecx
204 /* 00_15 4 */
205 movl %edi, %ebx
206 movl %ecx, %ebp
207 xorl %esi, %ebx
208 roll $5, %ebp
209 andl %edx, %ebx
210 addl %eax, %ebp
211.byte 209
212.byte 202 /* rorl $1 %edx */
213 movl 16(%esp), %eax
214.byte 209
215.byte 202 /* rorl $1 %edx */
216 xorl %esi, %ebx
217 leal 1518500249(%ebp,%eax,1),%ebp
218 movl %edx, %eax
219 addl %ebp, %ebx
220 xorl %edi, %eax
221 movl %ebx, %ebp
222 andl %ecx, %eax
223 roll $5, %ebp
224 addl %esi, %ebp
225 movl 20(%esp), %esi
226.byte 209
227.byte 201 /* rorl $1 %ecx */
228 xorl %edi, %eax
229.byte 209
230.byte 201 /* rorl $1 %ecx */
231 leal 1518500249(%ebp,%esi,1),%ebp
232 addl %ebp, %eax
233 /* 00_15 6 */
234 movl %ecx, %esi
235 movl %eax, %ebp
236 xorl %edx, %esi
237 roll $5, %ebp
238 andl %ebx, %esi
239 addl %edi, %ebp
240.byte 209
241.byte 203 /* rorl $1 %ebx */
242 movl 24(%esp), %edi
243.byte 209
244.byte 203 /* rorl $1 %ebx */
245 xorl %edx, %esi
246 leal 1518500249(%ebp,%edi,1),%ebp
247 movl %ebx, %edi
248 addl %ebp, %esi
249 xorl %ecx, %edi
250 movl %esi, %ebp
251 andl %eax, %edi
252 roll $5, %ebp
253 addl %edx, %ebp
254 movl 28(%esp), %edx
255.byte 209
256.byte 200 /* rorl $1 %eax */
257 xorl %ecx, %edi
258.byte 209
259.byte 200 /* rorl $1 %eax */
260 leal 1518500249(%ebp,%edx,1),%ebp
261 addl %ebp, %edi
262 /* 00_15 8 */
263 movl %eax, %edx
264 movl %edi, %ebp
265 xorl %ebx, %edx
266 roll $5, %ebp
267 andl %esi, %edx
268 addl %ecx, %ebp
269.byte 209
270.byte 206 /* rorl $1 %esi */
271 movl 32(%esp), %ecx
272.byte 209
273.byte 206 /* rorl $1 %esi */
274 xorl %ebx, %edx
275 leal 1518500249(%ebp,%ecx,1),%ebp
276 movl %esi, %ecx
277 addl %ebp, %edx
278 xorl %eax, %ecx
279 movl %edx, %ebp
280 andl %edi, %ecx
281 roll $5, %ebp
282 addl %ebx, %ebp
283 movl 36(%esp), %ebx
284.byte 209
285.byte 207 /* rorl $1 %edi */
286 xorl %eax, %ecx
287.byte 209
288.byte 207 /* rorl $1 %edi */
289 leal 1518500249(%ebp,%ebx,1),%ebp
290 addl %ebp, %ecx
291 /* 00_15 10 */
292 movl %edi, %ebx
293 movl %ecx, %ebp
294 xorl %esi, %ebx
295 roll $5, %ebp
296 andl %edx, %ebx
297 addl %eax, %ebp
298.byte 209
299.byte 202 /* rorl $1 %edx */
300 movl 40(%esp), %eax
301.byte 209
302.byte 202 /* rorl $1 %edx */
303 xorl %esi, %ebx
304 leal 1518500249(%ebp,%eax,1),%ebp
305 movl %edx, %eax
306 addl %ebp, %ebx
307 xorl %edi, %eax
308 movl %ebx, %ebp
309 andl %ecx, %eax
310 roll $5, %ebp
311 addl %esi, %ebp
312 movl 44(%esp), %esi
313.byte 209
314.byte 201 /* rorl $1 %ecx */
315 xorl %edi, %eax
316.byte 209
317.byte 201 /* rorl $1 %ecx */
318 leal 1518500249(%ebp,%esi,1),%ebp
319 addl %ebp, %eax
320 /* 00_15 12 */
321 movl %ecx, %esi
322 movl %eax, %ebp
323 xorl %edx, %esi
324 roll $5, %ebp
325 andl %ebx, %esi
326 addl %edi, %ebp
327.byte 209
328.byte 203 /* rorl $1 %ebx */
329 movl 48(%esp), %edi
330.byte 209
331.byte 203 /* rorl $1 %ebx */
332 xorl %edx, %esi
333 leal 1518500249(%ebp,%edi,1),%ebp
334 movl %ebx, %edi
335 addl %ebp, %esi
336 xorl %ecx, %edi
337 movl %esi, %ebp
338 andl %eax, %edi
339 roll $5, %ebp
340 addl %edx, %ebp
341 movl 52(%esp), %edx
342.byte 209
343.byte 200 /* rorl $1 %eax */
344 xorl %ecx, %edi
345.byte 209
346.byte 200 /* rorl $1 %eax */
347 leal 1518500249(%ebp,%edx,1),%ebp
348 addl %ebp, %edi
349 /* 00_15 14 */
350 movl %eax, %edx
351 movl %edi, %ebp
352 xorl %ebx, %edx
353 roll $5, %ebp
354 andl %esi, %edx
355 addl %ecx, %ebp
356.byte 209
357.byte 206 /* rorl $1 %esi */
358 movl 56(%esp), %ecx
359.byte 209
360.byte 206 /* rorl $1 %esi */
361 xorl %ebx, %edx
362 leal 1518500249(%ebp,%ecx,1),%ebp
363 movl %esi, %ecx
364 addl %ebp, %edx
365 xorl %eax, %ecx
366 movl %edx, %ebp
367 andl %edi, %ecx
368 roll $5, %ebp
369 addl %ebx, %ebp
370 movl 60(%esp), %ebx
371.byte 209
372.byte 207 /* rorl $1 %edi */
373 xorl %eax, %ecx
374.byte 209
375.byte 207 /* rorl $1 %edi */
376 leal 1518500249(%ebp,%ebx,1),%ebp
377 addl %ebp, %ecx
378 /* 16_19 16 */
379 nop
380 movl (%esp), %ebp
381 movl 8(%esp), %ebx
382 xorl %ebp, %ebx
383 movl 32(%esp), %ebp
384 xorl %ebp, %ebx
385 movl 52(%esp), %ebp
386 xorl %ebp, %ebx
387 movl %edi, %ebp
388.byte 209
389.byte 195 /* roll $1 %ebx */
390 xorl %esi, %ebp
391 movl %ebx, (%esp)
392 andl %edx, %ebp
393 leal 1518500249(%ebx,%eax,1),%ebx
394 xorl %esi, %ebp
395 movl %ecx, %eax
396 addl %ebp, %ebx
397 roll $5, %eax
398.byte 209
399.byte 202 /* rorl $1 %edx */
400 addl %eax, %ebx
401 movl 4(%esp), %eax
402 movl 12(%esp), %ebp
403 xorl %ebp, %eax
404 movl 36(%esp), %ebp
405 xorl %ebp, %eax
406 movl 56(%esp), %ebp
407.byte 209
408.byte 202 /* rorl $1 %edx */
409 xorl %ebp, %eax
410.byte 209
411.byte 192 /* roll $1 %eax */
412 movl %edx, %ebp
413 xorl %edi, %ebp
414 movl %eax, 4(%esp)
415 andl %ecx, %ebp
416 leal 1518500249(%eax,%esi,1),%eax
417 xorl %edi, %ebp
418 movl %ebx, %esi
419 roll $5, %esi
420.byte 209
421.byte 201 /* rorl $1 %ecx */
422 addl %esi, %eax
423.byte 209
424.byte 201 /* rorl $1 %ecx */
425 addl %ebp, %eax
426 /* 16_19 18 */
427 movl 8(%esp), %ebp
428 movl 16(%esp), %esi
429 xorl %ebp, %esi
430 movl 40(%esp), %ebp
431 xorl %ebp, %esi
432 movl 60(%esp), %ebp
433 xorl %ebp, %esi
434 movl %ecx, %ebp
435.byte 209
436.byte 198 /* roll $1 %esi */
437 xorl %edx, %ebp
438 movl %esi, 8(%esp)
439 andl %ebx, %ebp
440 leal 1518500249(%esi,%edi,1),%esi
441 xorl %edx, %ebp
442 movl %eax, %edi
443 addl %ebp, %esi
444 roll $5, %edi
445.byte 209
446.byte 203 /* rorl $1 %ebx */
447 addl %edi, %esi
448 movl 12(%esp), %edi
449 movl 20(%esp), %ebp
450 xorl %ebp, %edi
451 movl 44(%esp), %ebp
452 xorl %ebp, %edi
453 movl (%esp), %ebp
454.byte 209
455.byte 203 /* rorl $1 %ebx */
456 xorl %ebp, %edi
457.byte 209
458.byte 199 /* roll $1 %edi */
459 movl %ebx, %ebp
460 xorl %ecx, %ebp
461 movl %edi, 12(%esp)
462 andl %eax, %ebp
463 leal 1518500249(%edi,%edx,1),%edi
464 xorl %ecx, %ebp
465 movl %esi, %edx
466 roll $5, %edx
467.byte 209
468.byte 200 /* rorl $1 %eax */
469 addl %edx, %edi
470.byte 209
471.byte 200 /* rorl $1 %eax */
472 addl %ebp, %edi
473 /* 20_39 20 */
474 movl 16(%esp), %edx
475 movl 24(%esp), %ebp
476 xorl %ebp, %edx
477 movl 48(%esp), %ebp
478 xorl %ebp, %edx
479 movl 4(%esp), %ebp
480 xorl %ebp, %edx
481 movl %esi, %ebp
482.byte 209
483.byte 194 /* roll $1 %edx */
484 xorl %eax, %ebp
485 movl %edx, 16(%esp)
486 xorl %ebx, %ebp
487 leal 1859775393(%edx,%ecx,1),%edx
488 movl %edi, %ecx
489 roll $5, %ecx
490.byte 209
491.byte 206 /* rorl $1 %esi */
492 addl %ebp, %ecx
493.byte 209
494.byte 206 /* rorl $1 %esi */
495 addl %ecx, %edx
496 /* 20_39 21 */
497 movl 20(%esp), %ecx
498 movl 28(%esp), %ebp
499 xorl %ebp, %ecx
500 movl 52(%esp), %ebp
501 xorl %ebp, %ecx
502 movl 8(%esp), %ebp
503 xorl %ebp, %ecx
504 movl %edi, %ebp
505.byte 209
506.byte 193 /* roll $1 %ecx */
507 xorl %esi, %ebp
508 movl %ecx, 20(%esp)
509 xorl %eax, %ebp
510 leal 1859775393(%ecx,%ebx,1),%ecx
511 movl %edx, %ebx
512 roll $5, %ebx
513.byte 209
514.byte 207 /* rorl $1 %edi */
515 addl %ebp, %ebx
516.byte 209
517.byte 207 /* rorl $1 %edi */
518 addl %ebx, %ecx
519 /* 20_39 22 */
520 movl 24(%esp), %ebx
521 movl 32(%esp), %ebp
522 xorl %ebp, %ebx
523 movl 56(%esp), %ebp
524 xorl %ebp, %ebx
525 movl 12(%esp), %ebp
526 xorl %ebp, %ebx
527 movl %edx, %ebp
528.byte 209
529.byte 195 /* roll $1 %ebx */
530 xorl %edi, %ebp
531 movl %ebx, 24(%esp)
532 xorl %esi, %ebp
533 leal 1859775393(%ebx,%eax,1),%ebx
534 movl %ecx, %eax
535 roll $5, %eax
536.byte 209
537.byte 202 /* rorl $1 %edx */
538 addl %ebp, %eax
539.byte 209
540.byte 202 /* rorl $1 %edx */
541 addl %eax, %ebx
542 /* 20_39 23 */
543 movl 28(%esp), %eax
544 movl 36(%esp), %ebp
545 xorl %ebp, %eax
546 movl 60(%esp), %ebp
547 xorl %ebp, %eax
548 movl 16(%esp), %ebp
549 xorl %ebp, %eax
550 movl %ecx, %ebp
551.byte 209
552.byte 192 /* roll $1 %eax */
553 xorl %edx, %ebp
554 movl %eax, 28(%esp)
555 xorl %edi, %ebp
556 leal 1859775393(%eax,%esi,1),%eax
557 movl %ebx, %esi
558 roll $5, %esi
559.byte 209
560.byte 201 /* rorl $1 %ecx */
561 addl %ebp, %esi
562.byte 209
563.byte 201 /* rorl $1 %ecx */
564 addl %esi, %eax
565 /* 20_39 24 */
566 movl 32(%esp), %esi
567 movl 40(%esp), %ebp
568 xorl %ebp, %esi
569 movl (%esp), %ebp
570 xorl %ebp, %esi
571 movl 20(%esp), %ebp
572 xorl %ebp, %esi
573 movl %ebx, %ebp
574.byte 209
575.byte 198 /* roll $1 %esi */
576 xorl %ecx, %ebp
577 movl %esi, 32(%esp)
578 xorl %edx, %ebp
579 leal 1859775393(%esi,%edi,1),%esi
580 movl %eax, %edi
581 roll $5, %edi
582.byte 209
583.byte 203 /* rorl $1 %ebx */
584 addl %ebp, %edi
585.byte 209
586.byte 203 /* rorl $1 %ebx */
587 addl %edi, %esi
588 /* 20_39 25 */
589 movl 36(%esp), %edi
590 movl 44(%esp), %ebp
591 xorl %ebp, %edi
592 movl 4(%esp), %ebp
593 xorl %ebp, %edi
594 movl 24(%esp), %ebp
595 xorl %ebp, %edi
596 movl %eax, %ebp
597.byte 209
598.byte 199 /* roll $1 %edi */
599 xorl %ebx, %ebp
600 movl %edi, 36(%esp)
601 xorl %ecx, %ebp
602 leal 1859775393(%edi,%edx,1),%edi
603 movl %esi, %edx
604 roll $5, %edx
605.byte 209
606.byte 200 /* rorl $1 %eax */
607 addl %ebp, %edx
608.byte 209
609.byte 200 /* rorl $1 %eax */
610 addl %edx, %edi
611 /* 20_39 26 */
612 movl 40(%esp), %edx
613 movl 48(%esp), %ebp
614 xorl %ebp, %edx
615 movl 8(%esp), %ebp
616 xorl %ebp, %edx
617 movl 28(%esp), %ebp
618 xorl %ebp, %edx
619 movl %esi, %ebp
620.byte 209
621.byte 194 /* roll $1 %edx */
622 xorl %eax, %ebp
623 movl %edx, 40(%esp)
624 xorl %ebx, %ebp
625 leal 1859775393(%edx,%ecx,1),%edx
626 movl %edi, %ecx
627 roll $5, %ecx
628.byte 209
629.byte 206 /* rorl $1 %esi */
630 addl %ebp, %ecx
631.byte 209
632.byte 206 /* rorl $1 %esi */
633 addl %ecx, %edx
634 /* 20_39 27 */
635 movl 44(%esp), %ecx
636 movl 52(%esp), %ebp
637 xorl %ebp, %ecx
638 movl 12(%esp), %ebp
639 xorl %ebp, %ecx
640 movl 32(%esp), %ebp
641 xorl %ebp, %ecx
642 movl %edi, %ebp
643.byte 209
644.byte 193 /* roll $1 %ecx */
645 xorl %esi, %ebp
646 movl %ecx, 44(%esp)
647 xorl %eax, %ebp
648 leal 1859775393(%ecx,%ebx,1),%ecx
649 movl %edx, %ebx
650 roll $5, %ebx
651.byte 209
652.byte 207 /* rorl $1 %edi */
653 addl %ebp, %ebx
654.byte 209
655.byte 207 /* rorl $1 %edi */
656 addl %ebx, %ecx
657 /* 20_39 28 */
658 movl 48(%esp), %ebx
659 movl 56(%esp), %ebp
660 xorl %ebp, %ebx
661 movl 16(%esp), %ebp
662 xorl %ebp, %ebx
663 movl 36(%esp), %ebp
664 xorl %ebp, %ebx
665 movl %edx, %ebp
666.byte 209
667.byte 195 /* roll $1 %ebx */
668 xorl %edi, %ebp
669 movl %ebx, 48(%esp)
670 xorl %esi, %ebp
671 leal 1859775393(%ebx,%eax,1),%ebx
672 movl %ecx, %eax
673 roll $5, %eax
674.byte 209
675.byte 202 /* rorl $1 %edx */
676 addl %ebp, %eax
677.byte 209
678.byte 202 /* rorl $1 %edx */
679 addl %eax, %ebx
680 /* 20_39 29 */
681 movl 52(%esp), %eax
682 movl 60(%esp), %ebp
683 xorl %ebp, %eax
684 movl 20(%esp), %ebp
685 xorl %ebp, %eax
686 movl 40(%esp), %ebp
687 xorl %ebp, %eax
688 movl %ecx, %ebp
689.byte 209
690.byte 192 /* roll $1 %eax */
691 xorl %edx, %ebp
692 movl %eax, 52(%esp)
693 xorl %edi, %ebp
694 leal 1859775393(%eax,%esi,1),%eax
695 movl %ebx, %esi
696 roll $5, %esi
697.byte 209
698.byte 201 /* rorl $1 %ecx */
699 addl %ebp, %esi
700.byte 209
701.byte 201 /* rorl $1 %ecx */
702 addl %esi, %eax
703 /* 20_39 30 */
704 movl 56(%esp), %esi
705 movl (%esp), %ebp
706 xorl %ebp, %esi
707 movl 24(%esp), %ebp
708 xorl %ebp, %esi
709 movl 44(%esp), %ebp
710 xorl %ebp, %esi
711 movl %ebx, %ebp
712.byte 209
713.byte 198 /* roll $1 %esi */
714 xorl %ecx, %ebp
715 movl %esi, 56(%esp)
716 xorl %edx, %ebp
717 leal 1859775393(%esi,%edi,1),%esi
718 movl %eax, %edi
719 roll $5, %edi
720.byte 209
721.byte 203 /* rorl $1 %ebx */
722 addl %ebp, %edi
723.byte 209
724.byte 203 /* rorl $1 %ebx */
725 addl %edi, %esi
726 /* 20_39 31 */
727 movl 60(%esp), %edi
728 movl 4(%esp), %ebp
729 xorl %ebp, %edi
730 movl 28(%esp), %ebp
731 xorl %ebp, %edi
732 movl 48(%esp), %ebp
733 xorl %ebp, %edi
734 movl %eax, %ebp
735.byte 209
736.byte 199 /* roll $1 %edi */
737 xorl %ebx, %ebp
738 movl %edi, 60(%esp)
739 xorl %ecx, %ebp
740 leal 1859775393(%edi,%edx,1),%edi
741 movl %esi, %edx
742 roll $5, %edx
743.byte 209
744.byte 200 /* rorl $1 %eax */
745 addl %ebp, %edx
746.byte 209
747.byte 200 /* rorl $1 %eax */
748 addl %edx, %edi
749 /* 20_39 32 */
750 movl (%esp), %edx
751 movl 8(%esp), %ebp
752 xorl %ebp, %edx
753 movl 32(%esp), %ebp
754 xorl %ebp, %edx
755 movl 52(%esp), %ebp
756 xorl %ebp, %edx
757 movl %esi, %ebp
758.byte 209
759.byte 194 /* roll $1 %edx */
760 xorl %eax, %ebp
761 movl %edx, (%esp)
762 xorl %ebx, %ebp
763 leal 1859775393(%edx,%ecx,1),%edx
764 movl %edi, %ecx
765 roll $5, %ecx
766.byte 209
767.byte 206 /* rorl $1 %esi */
768 addl %ebp, %ecx
769.byte 209
770.byte 206 /* rorl $1 %esi */
771 addl %ecx, %edx
772 /* 20_39 33 */
773 movl 4(%esp), %ecx
774 movl 12(%esp), %ebp
775 xorl %ebp, %ecx
776 movl 36(%esp), %ebp
777 xorl %ebp, %ecx
778 movl 56(%esp), %ebp
779 xorl %ebp, %ecx
780 movl %edi, %ebp
781.byte 209
782.byte 193 /* roll $1 %ecx */
783 xorl %esi, %ebp
784 movl %ecx, 4(%esp)
785 xorl %eax, %ebp
786 leal 1859775393(%ecx,%ebx,1),%ecx
787 movl %edx, %ebx
788 roll $5, %ebx
789.byte 209
790.byte 207 /* rorl $1 %edi */
791 addl %ebp, %ebx
792.byte 209
793.byte 207 /* rorl $1 %edi */
794 addl %ebx, %ecx
795 /* 20_39 34 */
796 movl 8(%esp), %ebx
797 movl 16(%esp), %ebp
798 xorl %ebp, %ebx
799 movl 40(%esp), %ebp
800 xorl %ebp, %ebx
801 movl 60(%esp), %ebp
802 xorl %ebp, %ebx
803 movl %edx, %ebp
804.byte 209
805.byte 195 /* roll $1 %ebx */
806 xorl %edi, %ebp
807 movl %ebx, 8(%esp)
808 xorl %esi, %ebp
809 leal 1859775393(%ebx,%eax,1),%ebx
810 movl %ecx, %eax
811 roll $5, %eax
812.byte 209
813.byte 202 /* rorl $1 %edx */
814 addl %ebp, %eax
815.byte 209
816.byte 202 /* rorl $1 %edx */
817 addl %eax, %ebx
818 /* 20_39 35 */
819 movl 12(%esp), %eax
820 movl 20(%esp), %ebp
821 xorl %ebp, %eax
822 movl 44(%esp), %ebp
823 xorl %ebp, %eax
824 movl (%esp), %ebp
825 xorl %ebp, %eax
826 movl %ecx, %ebp
827.byte 209
828.byte 192 /* roll $1 %eax */
829 xorl %edx, %ebp
830 movl %eax, 12(%esp)
831 xorl %edi, %ebp
832 leal 1859775393(%eax,%esi,1),%eax
833 movl %ebx, %esi
834 roll $5, %esi
835.byte 209
836.byte 201 /* rorl $1 %ecx */
837 addl %ebp, %esi
838.byte 209
839.byte 201 /* rorl $1 %ecx */
840 addl %esi, %eax
841 /* 20_39 36 */
842 movl 16(%esp), %esi
843 movl 24(%esp), %ebp
844 xorl %ebp, %esi
845 movl 48(%esp), %ebp
846 xorl %ebp, %esi
847 movl 4(%esp), %ebp
848 xorl %ebp, %esi
849 movl %ebx, %ebp
850.byte 209
851.byte 198 /* roll $1 %esi */
852 xorl %ecx, %ebp
853 movl %esi, 16(%esp)
854 xorl %edx, %ebp
855 leal 1859775393(%esi,%edi,1),%esi
856 movl %eax, %edi
857 roll $5, %edi
858.byte 209
859.byte 203 /* rorl $1 %ebx */
860 addl %ebp, %edi
861.byte 209
862.byte 203 /* rorl $1 %ebx */
863 addl %edi, %esi
864 /* 20_39 37 */
865 movl 20(%esp), %edi
866 movl 28(%esp), %ebp
867 xorl %ebp, %edi
868 movl 52(%esp), %ebp
869 xorl %ebp, %edi
870 movl 8(%esp), %ebp
871 xorl %ebp, %edi
872 movl %eax, %ebp
873.byte 209
874.byte 199 /* roll $1 %edi */
875 xorl %ebx, %ebp
876 movl %edi, 20(%esp)
877 xorl %ecx, %ebp
878 leal 1859775393(%edi,%edx,1),%edi
879 movl %esi, %edx
880 roll $5, %edx
881.byte 209
882.byte 200 /* rorl $1 %eax */
883 addl %ebp, %edx
884.byte 209
885.byte 200 /* rorl $1 %eax */
886 addl %edx, %edi
887 /* 20_39 38 */
888 movl 24(%esp), %edx
889 movl 32(%esp), %ebp
890 xorl %ebp, %edx
891 movl 56(%esp), %ebp
892 xorl %ebp, %edx
893 movl 12(%esp), %ebp
894 xorl %ebp, %edx
895 movl %esi, %ebp
896.byte 209
897.byte 194 /* roll $1 %edx */
898 xorl %eax, %ebp
899 movl %edx, 24(%esp)
900 xorl %ebx, %ebp
901 leal 1859775393(%edx,%ecx,1),%edx
902 movl %edi, %ecx
903 roll $5, %ecx
904.byte 209
905.byte 206 /* rorl $1 %esi */
906 addl %ebp, %ecx
907.byte 209
908.byte 206 /* rorl $1 %esi */
909 addl %ecx, %edx
910 /* 20_39 39 */
911 movl 28(%esp), %ecx
912 movl 36(%esp), %ebp
913 xorl %ebp, %ecx
914 movl 60(%esp), %ebp
915 xorl %ebp, %ecx
916 movl 16(%esp), %ebp
917 xorl %ebp, %ecx
918 movl %edi, %ebp
919.byte 209
920.byte 193 /* roll $1 %ecx */
921 xorl %esi, %ebp
922 movl %ecx, 28(%esp)
923 xorl %eax, %ebp
924 leal 1859775393(%ecx,%ebx,1),%ecx
925 movl %edx, %ebx
926 roll $5, %ebx
927.byte 209
928.byte 207 /* rorl $1 %edi */
929 addl %ebp, %ebx
930.byte 209
931.byte 207 /* rorl $1 %edi */
932 addl %ebx, %ecx
933 /* 40_59 40 */
934 movl 32(%esp), %ebx
935 movl 40(%esp), %ebp
936 xorl %ebp, %ebx
937 movl (%esp), %ebp
938 xorl %ebp, %ebx
939 movl 20(%esp), %ebp
940 xorl %ebp, %ebx
941 movl %edx, %ebp
942.byte 209
943.byte 195 /* roll $1 %ebx */
944 orl %edi, %ebp
945 movl %ebx, 32(%esp)
946 andl %esi, %ebp
947 leal 2400959708(%ebx,%eax,1),%ebx
948 movl %edx, %eax
949.byte 209
950.byte 202 /* rorl $1 %edx */
951 andl %edi, %eax
952 orl %eax, %ebp
953 movl %ecx, %eax
954 roll $5, %eax
955 addl %eax, %ebp
956 movl 36(%esp), %eax
957 addl %ebp, %ebx
958 movl 44(%esp), %ebp
959 xorl %ebp, %eax
960 movl 4(%esp), %ebp
961 xorl %ebp, %eax
962 movl 24(%esp), %ebp
963.byte 209
964.byte 202 /* rorl $1 %edx */
965 xorl %ebp, %eax
966.byte 209
967.byte 192 /* roll $1 %eax */
968 movl %ecx, %ebp
969 movl %eax, 36(%esp)
970 orl %edx, %ebp
971 leal 2400959708(%eax,%esi,1),%eax
972 movl %ecx, %esi
973 andl %edi, %ebp
974 andl %edx, %esi
975 orl %esi, %ebp
976 movl %ebx, %esi
977 roll $5, %esi
978.byte 209
979.byte 201 /* rorl $1 %ecx */
980 addl %esi, %ebp
981.byte 209
982.byte 201 /* rorl $1 %ecx */
983 addl %ebp, %eax
984 /* 40_59 41 */
985 /* 40_59 42 */
986 movl 40(%esp), %esi
987 movl 48(%esp), %ebp
988 xorl %ebp, %esi
989 movl 8(%esp), %ebp
990 xorl %ebp, %esi
991 movl 28(%esp), %ebp
992 xorl %ebp, %esi
993 movl %ebx, %ebp
994.byte 209
995.byte 198 /* roll $1 %esi */
996 orl %ecx, %ebp
997 movl %esi, 40(%esp)
998 andl %edx, %ebp
999 leal 2400959708(%esi,%edi,1),%esi
1000 movl %ebx, %edi
1001.byte 209
1002.byte 203 /* rorl $1 %ebx */
1003 andl %ecx, %edi
1004 orl %edi, %ebp
1005 movl %eax, %edi
1006 roll $5, %edi
1007 addl %edi, %ebp
1008 movl 44(%esp), %edi
1009 addl %ebp, %esi
1010 movl 52(%esp), %ebp
1011 xorl %ebp, %edi
1012 movl 12(%esp), %ebp
1013 xorl %ebp, %edi
1014 movl 32(%esp), %ebp
1015.byte 209
1016.byte 203 /* rorl $1 %ebx */
1017 xorl %ebp, %edi
1018.byte 209
1019.byte 199 /* roll $1 %edi */
1020 movl %eax, %ebp
1021 movl %edi, 44(%esp)
1022 orl %ebx, %ebp
1023 leal 2400959708(%edi,%edx,1),%edi
1024 movl %eax, %edx
1025 andl %ecx, %ebp
1026 andl %ebx, %edx
1027 orl %edx, %ebp
1028 movl %esi, %edx
1029 roll $5, %edx
1030.byte 209
1031.byte 200 /* rorl $1 %eax */
1032 addl %edx, %ebp
1033.byte 209
1034.byte 200 /* rorl $1 %eax */
1035 addl %ebp, %edi
1036 /* 40_59 43 */
1037 /* 40_59 44 */
1038 movl 48(%esp), %edx
1039 movl 56(%esp), %ebp
1040 xorl %ebp, %edx
1041 movl 16(%esp), %ebp
1042 xorl %ebp, %edx
1043 movl 36(%esp), %ebp
1044 xorl %ebp, %edx
1045 movl %esi, %ebp
1046.byte 209
1047.byte 194 /* roll $1 %edx */
1048 orl %eax, %ebp
1049 movl %edx, 48(%esp)
1050 andl %ebx, %ebp
1051 leal 2400959708(%edx,%ecx,1),%edx
1052 movl %esi, %ecx
1053.byte 209
1054.byte 206 /* rorl $1 %esi */
1055 andl %eax, %ecx
1056 orl %ecx, %ebp
1057 movl %edi, %ecx
1058 roll $5, %ecx
1059 addl %ecx, %ebp
1060 movl 52(%esp), %ecx
1061 addl %ebp, %edx
1062 movl 60(%esp), %ebp
1063 xorl %ebp, %ecx
1064 movl 20(%esp), %ebp
1065 xorl %ebp, %ecx
1066 movl 40(%esp), %ebp
1067.byte 209
1068.byte 206 /* rorl $1 %esi */
1069 xorl %ebp, %ecx
1070.byte 209
1071.byte 193 /* roll $1 %ecx */
1072 movl %edi, %ebp
1073 movl %ecx, 52(%esp)
1074 orl %esi, %ebp
1075 leal 2400959708(%ecx,%ebx,1),%ecx
1076 movl %edi, %ebx
1077 andl %eax, %ebp
1078 andl %esi, %ebx
1079 orl %ebx, %ebp
1080 movl %edx, %ebx
1081 roll $5, %ebx
1082.byte 209
1083.byte 207 /* rorl $1 %edi */
1084 addl %ebx, %ebp
1085.byte 209
1086.byte 207 /* rorl $1 %edi */
1087 addl %ebp, %ecx
1088 /* 40_59 45 */
1089 /* 40_59 46 */
1090 movl 56(%esp), %ebx
1091 movl (%esp), %ebp
1092 xorl %ebp, %ebx
1093 movl 24(%esp), %ebp
1094 xorl %ebp, %ebx
1095 movl 44(%esp), %ebp
1096 xorl %ebp, %ebx
1097 movl %edx, %ebp
1098.byte 209
1099.byte 195 /* roll $1 %ebx */
1100 orl %edi, %ebp
1101 movl %ebx, 56(%esp)
1102 andl %esi, %ebp
1103 leal 2400959708(%ebx,%eax,1),%ebx
1104 movl %edx, %eax
1105.byte 209
1106.byte 202 /* rorl $1 %edx */
1107 andl %edi, %eax
1108 orl %eax, %ebp
1109 movl %ecx, %eax
1110 roll $5, %eax
1111 addl %eax, %ebp
1112 movl 60(%esp), %eax
1113 addl %ebp, %ebx
1114 movl 4(%esp), %ebp
1115 xorl %ebp, %eax
1116 movl 28(%esp), %ebp
1117 xorl %ebp, %eax
1118 movl 48(%esp), %ebp
1119.byte 209
1120.byte 202 /* rorl $1 %edx */
1121 xorl %ebp, %eax
1122.byte 209
1123.byte 192 /* roll $1 %eax */
1124 movl %ecx, %ebp
1125 movl %eax, 60(%esp)
1126 orl %edx, %ebp
1127 leal 2400959708(%eax,%esi,1),%eax
1128 movl %ecx, %esi
1129 andl %edi, %ebp
1130 andl %edx, %esi
1131 orl %esi, %ebp
1132 movl %ebx, %esi
1133 roll $5, %esi
1134.byte 209
1135.byte 201 /* rorl $1 %ecx */
1136 addl %esi, %ebp
1137.byte 209
1138.byte 201 /* rorl $1 %ecx */
1139 addl %ebp, %eax
1140 /* 40_59 47 */
1141 /* 40_59 48 */
1142 movl (%esp), %esi
1143 movl 8(%esp), %ebp
1144 xorl %ebp, %esi
1145 movl 32(%esp), %ebp
1146 xorl %ebp, %esi
1147 movl 52(%esp), %ebp
1148 xorl %ebp, %esi
1149 movl %ebx, %ebp
1150.byte 209
1151.byte 198 /* roll $1 %esi */
1152 orl %ecx, %ebp
1153 movl %esi, (%esp)
1154 andl %edx, %ebp
1155 leal 2400959708(%esi,%edi,1),%esi
1156 movl %ebx, %edi
1157.byte 209
1158.byte 203 /* rorl $1 %ebx */
1159 andl %ecx, %edi
1160 orl %edi, %ebp
1161 movl %eax, %edi
1162 roll $5, %edi
1163 addl %edi, %ebp
1164 movl 4(%esp), %edi
1165 addl %ebp, %esi
1166 movl 12(%esp), %ebp
1167 xorl %ebp, %edi
1168 movl 36(%esp), %ebp
1169 xorl %ebp, %edi
1170 movl 56(%esp), %ebp
1171.byte 209
1172.byte 203 /* rorl $1 %ebx */
1173 xorl %ebp, %edi
1174.byte 209
1175.byte 199 /* roll $1 %edi */
1176 movl %eax, %ebp
1177 movl %edi, 4(%esp)
1178 orl %ebx, %ebp
1179 leal 2400959708(%edi,%edx,1),%edi
1180 movl %eax, %edx
1181 andl %ecx, %ebp
1182 andl %ebx, %edx
1183 orl %edx, %ebp
1184 movl %esi, %edx
1185 roll $5, %edx
1186.byte 209
1187.byte 200 /* rorl $1 %eax */
1188 addl %edx, %ebp
1189.byte 209
1190.byte 200 /* rorl $1 %eax */
1191 addl %ebp, %edi
1192 /* 40_59 49 */
1193 /* 40_59 50 */
1194 movl 8(%esp), %edx
1195 movl 16(%esp), %ebp
1196 xorl %ebp, %edx
1197 movl 40(%esp), %ebp
1198 xorl %ebp, %edx
1199 movl 60(%esp), %ebp
1200 xorl %ebp, %edx
1201 movl %esi, %ebp
1202.byte 209
1203.byte 194 /* roll $1 %edx */
1204 orl %eax, %ebp
1205 movl %edx, 8(%esp)
1206 andl %ebx, %ebp
1207 leal 2400959708(%edx,%ecx,1),%edx
1208 movl %esi, %ecx
1209.byte 209
1210.byte 206 /* rorl $1 %esi */
1211 andl %eax, %ecx
1212 orl %ecx, %ebp
1213 movl %edi, %ecx
1214 roll $5, %ecx
1215 addl %ecx, %ebp
1216 movl 12(%esp), %ecx
1217 addl %ebp, %edx
1218 movl 20(%esp), %ebp
1219 xorl %ebp, %ecx
1220 movl 44(%esp), %ebp
1221 xorl %ebp, %ecx
1222 movl (%esp), %ebp
1223.byte 209
1224.byte 206 /* rorl $1 %esi */
1225 xorl %ebp, %ecx
1226.byte 209
1227.byte 193 /* roll $1 %ecx */
1228 movl %edi, %ebp
1229 movl %ecx, 12(%esp)
1230 orl %esi, %ebp
1231 leal 2400959708(%ecx,%ebx,1),%ecx
1232 movl %edi, %ebx
1233 andl %eax, %ebp
1234 andl %esi, %ebx
1235 orl %ebx, %ebp
1236 movl %edx, %ebx
1237 roll $5, %ebx
1238.byte 209
1239.byte 207 /* rorl $1 %edi */
1240 addl %ebx, %ebp
1241.byte 209
1242.byte 207 /* rorl $1 %edi */
1243 addl %ebp, %ecx
1244 /* 40_59 51 */
1245 /* 40_59 52 */
1246 movl 16(%esp), %ebx
1247 movl 24(%esp), %ebp
1248 xorl %ebp, %ebx
1249 movl 48(%esp), %ebp
1250 xorl %ebp, %ebx
1251 movl 4(%esp), %ebp
1252 xorl %ebp, %ebx
1253 movl %edx, %ebp
1254.byte 209
1255.byte 195 /* roll $1 %ebx */
1256 orl %edi, %ebp
1257 movl %ebx, 16(%esp)
1258 andl %esi, %ebp
1259 leal 2400959708(%ebx,%eax,1),%ebx
1260 movl %edx, %eax
1261.byte 209
1262.byte 202 /* rorl $1 %edx */
1263 andl %edi, %eax
1264 orl %eax, %ebp
1265 movl %ecx, %eax
1266 roll $5, %eax
1267 addl %eax, %ebp
1268 movl 20(%esp), %eax
1269 addl %ebp, %ebx
1270 movl 28(%esp), %ebp
1271 xorl %ebp, %eax
1272 movl 52(%esp), %ebp
1273 xorl %ebp, %eax
1274 movl 8(%esp), %ebp
1275.byte 209
1276.byte 202 /* rorl $1 %edx */
1277 xorl %ebp, %eax
1278.byte 209
1279.byte 192 /* roll $1 %eax */
1280 movl %ecx, %ebp
1281 movl %eax, 20(%esp)
1282 orl %edx, %ebp
1283 leal 2400959708(%eax,%esi,1),%eax
1284 movl %ecx, %esi
1285 andl %edi, %ebp
1286 andl %edx, %esi
1287 orl %esi, %ebp
1288 movl %ebx, %esi
1289 roll $5, %esi
1290.byte 209
1291.byte 201 /* rorl $1 %ecx */
1292 addl %esi, %ebp
1293.byte 209
1294.byte 201 /* rorl $1 %ecx */
1295 addl %ebp, %eax
1296 /* 40_59 53 */
1297 /* 40_59 54 */
1298 movl 24(%esp), %esi
1299 movl 32(%esp), %ebp
1300 xorl %ebp, %esi
1301 movl 56(%esp), %ebp
1302 xorl %ebp, %esi
1303 movl 12(%esp), %ebp
1304 xorl %ebp, %esi
1305 movl %ebx, %ebp
1306.byte 209
1307.byte 198 /* roll $1 %esi */
1308 orl %ecx, %ebp
1309 movl %esi, 24(%esp)
1310 andl %edx, %ebp
1311 leal 2400959708(%esi,%edi,1),%esi
1312 movl %ebx, %edi
1313.byte 209
1314.byte 203 /* rorl $1 %ebx */
1315 andl %ecx, %edi
1316 orl %edi, %ebp
1317 movl %eax, %edi
1318 roll $5, %edi
1319 addl %edi, %ebp
1320 movl 28(%esp), %edi
1321 addl %ebp, %esi
1322 movl 36(%esp), %ebp
1323 xorl %ebp, %edi
1324 movl 60(%esp), %ebp
1325 xorl %ebp, %edi
1326 movl 16(%esp), %ebp
1327.byte 209
1328.byte 203 /* rorl $1 %ebx */
1329 xorl %ebp, %edi
1330.byte 209
1331.byte 199 /* roll $1 %edi */
1332 movl %eax, %ebp
1333 movl %edi, 28(%esp)
1334 orl %ebx, %ebp
1335 leal 2400959708(%edi,%edx,1),%edi
1336 movl %eax, %edx
1337 andl %ecx, %ebp
1338 andl %ebx, %edx
1339 orl %edx, %ebp
1340 movl %esi, %edx
1341 roll $5, %edx
1342.byte 209
1343.byte 200 /* rorl $1 %eax */
1344 addl %edx, %ebp
1345.byte 209
1346.byte 200 /* rorl $1 %eax */
1347 addl %ebp, %edi
1348 /* 40_59 55 */
1349 /* 40_59 56 */
1350 movl 32(%esp), %edx
1351 movl 40(%esp), %ebp
1352 xorl %ebp, %edx
1353 movl (%esp), %ebp
1354 xorl %ebp, %edx
1355 movl 20(%esp), %ebp
1356 xorl %ebp, %edx
1357 movl %esi, %ebp
1358.byte 209
1359.byte 194 /* roll $1 %edx */
1360 orl %eax, %ebp
1361 movl %edx, 32(%esp)
1362 andl %ebx, %ebp
1363 leal 2400959708(%edx,%ecx,1),%edx
1364 movl %esi, %ecx
1365.byte 209
1366.byte 206 /* rorl $1 %esi */
1367 andl %eax, %ecx
1368 orl %ecx, %ebp
1369 movl %edi, %ecx
1370 roll $5, %ecx
1371 addl %ecx, %ebp
1372 movl 36(%esp), %ecx
1373 addl %ebp, %edx
1374 movl 44(%esp), %ebp
1375 xorl %ebp, %ecx
1376 movl 4(%esp), %ebp
1377 xorl %ebp, %ecx
1378 movl 24(%esp), %ebp
1379.byte 209
1380.byte 206 /* rorl $1 %esi */
1381 xorl %ebp, %ecx
1382.byte 209
1383.byte 193 /* roll $1 %ecx */
1384 movl %edi, %ebp
1385 movl %ecx, 36(%esp)
1386 orl %esi, %ebp
1387 leal 2400959708(%ecx,%ebx,1),%ecx
1388 movl %edi, %ebx
1389 andl %eax, %ebp
1390 andl %esi, %ebx
1391 orl %ebx, %ebp
1392 movl %edx, %ebx
1393 roll $5, %ebx
1394.byte 209
1395.byte 207 /* rorl $1 %edi */
1396 addl %ebx, %ebp
1397.byte 209
1398.byte 207 /* rorl $1 %edi */
1399 addl %ebp, %ecx
1400 /* 40_59 57 */
1401 /* 40_59 58 */
1402 movl 40(%esp), %ebx
1403 movl 48(%esp), %ebp
1404 xorl %ebp, %ebx
1405 movl 8(%esp), %ebp
1406 xorl %ebp, %ebx
1407 movl 28(%esp), %ebp
1408 xorl %ebp, %ebx
1409 movl %edx, %ebp
1410.byte 209
1411.byte 195 /* roll $1 %ebx */
1412 orl %edi, %ebp
1413 movl %ebx, 40(%esp)
1414 andl %esi, %ebp
1415 leal 2400959708(%ebx,%eax,1),%ebx
1416 movl %edx, %eax
1417.byte 209
1418.byte 202 /* rorl $1 %edx */
1419 andl %edi, %eax
1420 orl %eax, %ebp
1421 movl %ecx, %eax
1422 roll $5, %eax
1423 addl %eax, %ebp
1424 movl 44(%esp), %eax
1425 addl %ebp, %ebx
1426 movl 52(%esp), %ebp
1427 xorl %ebp, %eax
1428 movl 12(%esp), %ebp
1429 xorl %ebp, %eax
1430 movl 32(%esp), %ebp
1431.byte 209
1432.byte 202 /* rorl $1 %edx */
1433 xorl %ebp, %eax
1434.byte 209
1435.byte 192 /* roll $1 %eax */
1436 movl %ecx, %ebp
1437 movl %eax, 44(%esp)
1438 orl %edx, %ebp
1439 leal 2400959708(%eax,%esi,1),%eax
1440 movl %ecx, %esi
1441 andl %edi, %ebp
1442 andl %edx, %esi
1443 orl %esi, %ebp
1444 movl %ebx, %esi
1445 roll $5, %esi
1446.byte 209
1447.byte 201 /* rorl $1 %ecx */
1448 addl %esi, %ebp
1449.byte 209
1450.byte 201 /* rorl $1 %ecx */
1451 addl %ebp, %eax
1452 /* 40_59 59 */
1453 /* 20_39 60 */
1454 movl 48(%esp), %esi
1455 movl 56(%esp), %ebp
1456 xorl %ebp, %esi
1457 movl 16(%esp), %ebp
1458 xorl %ebp, %esi
1459 movl 36(%esp), %ebp
1460 xorl %ebp, %esi
1461 movl %ebx, %ebp
1462.byte 209
1463.byte 198 /* roll $1 %esi */
1464 xorl %ecx, %ebp
1465 movl %esi, 48(%esp)
1466 xorl %edx, %ebp
1467 leal 3395469782(%esi,%edi,1),%esi
1468 movl %eax, %edi
1469 roll $5, %edi
1470.byte 209
1471.byte 203 /* rorl $1 %ebx */
1472 addl %ebp, %edi
1473.byte 209
1474.byte 203 /* rorl $1 %ebx */
1475 addl %edi, %esi
1476 /* 20_39 61 */
1477 movl 52(%esp), %edi
1478 movl 60(%esp), %ebp
1479 xorl %ebp, %edi
1480 movl 20(%esp), %ebp
1481 xorl %ebp, %edi
1482 movl 40(%esp), %ebp
1483 xorl %ebp, %edi
1484 movl %eax, %ebp
1485.byte 209
1486.byte 199 /* roll $1 %edi */
1487 xorl %ebx, %ebp
1488 movl %edi, 52(%esp)
1489 xorl %ecx, %ebp
1490 leal 3395469782(%edi,%edx,1),%edi
1491 movl %esi, %edx
1492 roll $5, %edx
1493.byte 209
1494.byte 200 /* rorl $1 %eax */
1495 addl %ebp, %edx
1496.byte 209
1497.byte 200 /* rorl $1 %eax */
1498 addl %edx, %edi
1499 /* 20_39 62 */
1500 movl 56(%esp), %edx
1501 movl (%esp), %ebp
1502 xorl %ebp, %edx
1503 movl 24(%esp), %ebp
1504 xorl %ebp, %edx
1505 movl 44(%esp), %ebp
1506 xorl %ebp, %edx
1507 movl %esi, %ebp
1508.byte 209
1509.byte 194 /* roll $1 %edx */
1510 xorl %eax, %ebp
1511 movl %edx, 56(%esp)
1512 xorl %ebx, %ebp
1513 leal 3395469782(%edx,%ecx,1),%edx
1514 movl %edi, %ecx
1515 roll $5, %ecx
1516.byte 209
1517.byte 206 /* rorl $1 %esi */
1518 addl %ebp, %ecx
1519.byte 209
1520.byte 206 /* rorl $1 %esi */
1521 addl %ecx, %edx
1522 /* 20_39 63 */
1523 movl 60(%esp), %ecx
1524 movl 4(%esp), %ebp
1525 xorl %ebp, %ecx
1526 movl 28(%esp), %ebp
1527 xorl %ebp, %ecx
1528 movl 48(%esp), %ebp
1529 xorl %ebp, %ecx
1530 movl %edi, %ebp
1531.byte 209
1532.byte 193 /* roll $1 %ecx */
1533 xorl %esi, %ebp
1534 movl %ecx, 60(%esp)
1535 xorl %eax, %ebp
1536 leal 3395469782(%ecx,%ebx,1),%ecx
1537 movl %edx, %ebx
1538 roll $5, %ebx
1539.byte 209
1540.byte 207 /* rorl $1 %edi */
1541 addl %ebp, %ebx
1542.byte 209
1543.byte 207 /* rorl $1 %edi */
1544 addl %ebx, %ecx
1545 /* 20_39 64 */
1546 movl (%esp), %ebx
1547 movl 8(%esp), %ebp
1548 xorl %ebp, %ebx
1549 movl 32(%esp), %ebp
1550 xorl %ebp, %ebx
1551 movl 52(%esp), %ebp
1552 xorl %ebp, %ebx
1553 movl %edx, %ebp
1554.byte 209
1555.byte 195 /* roll $1 %ebx */
1556 xorl %edi, %ebp
1557 movl %ebx, (%esp)
1558 xorl %esi, %ebp
1559 leal 3395469782(%ebx,%eax,1),%ebx
1560 movl %ecx, %eax
1561 roll $5, %eax
1562.byte 209
1563.byte 202 /* rorl $1 %edx */
1564 addl %ebp, %eax
1565.byte 209
1566.byte 202 /* rorl $1 %edx */
1567 addl %eax, %ebx
1568 /* 20_39 65 */
1569 movl 4(%esp), %eax
1570 movl 12(%esp), %ebp
1571 xorl %ebp, %eax
1572 movl 36(%esp), %ebp
1573 xorl %ebp, %eax
1574 movl 56(%esp), %ebp
1575 xorl %ebp, %eax
1576 movl %ecx, %ebp
1577.byte 209
1578.byte 192 /* roll $1 %eax */
1579 xorl %edx, %ebp
1580 movl %eax, 4(%esp)
1581 xorl %edi, %ebp
1582 leal 3395469782(%eax,%esi,1),%eax
1583 movl %ebx, %esi
1584 roll $5, %esi
1585.byte 209
1586.byte 201 /* rorl $1 %ecx */
1587 addl %ebp, %esi
1588.byte 209
1589.byte 201 /* rorl $1 %ecx */
1590 addl %esi, %eax
1591 /* 20_39 66 */
1592 movl 8(%esp), %esi
1593 movl 16(%esp), %ebp
1594 xorl %ebp, %esi
1595 movl 40(%esp), %ebp
1596 xorl %ebp, %esi
1597 movl 60(%esp), %ebp
1598 xorl %ebp, %esi
1599 movl %ebx, %ebp
1600.byte 209
1601.byte 198 /* roll $1 %esi */
1602 xorl %ecx, %ebp
1603 movl %esi, 8(%esp)
1604 xorl %edx, %ebp
1605 leal 3395469782(%esi,%edi,1),%esi
1606 movl %eax, %edi
1607 roll $5, %edi
1608.byte 209
1609.byte 203 /* rorl $1 %ebx */
1610 addl %ebp, %edi
1611.byte 209
1612.byte 203 /* rorl $1 %ebx */
1613 addl %edi, %esi
1614 /* 20_39 67 */
1615 movl 12(%esp), %edi
1616 movl 20(%esp), %ebp
1617 xorl %ebp, %edi
1618 movl 44(%esp), %ebp
1619 xorl %ebp, %edi
1620 movl (%esp), %ebp
1621 xorl %ebp, %edi
1622 movl %eax, %ebp
1623.byte 209
1624.byte 199 /* roll $1 %edi */
1625 xorl %ebx, %ebp
1626 movl %edi, 12(%esp)
1627 xorl %ecx, %ebp
1628 leal 3395469782(%edi,%edx,1),%edi
1629 movl %esi, %edx
1630 roll $5, %edx
1631.byte 209
1632.byte 200 /* rorl $1 %eax */
1633 addl %ebp, %edx
1634.byte 209
1635.byte 200 /* rorl $1 %eax */
1636 addl %edx, %edi
1637 /* 20_39 68 */
1638 movl 16(%esp), %edx
1639 movl 24(%esp), %ebp
1640 xorl %ebp, %edx
1641 movl 48(%esp), %ebp
1642 xorl %ebp, %edx
1643 movl 4(%esp), %ebp
1644 xorl %ebp, %edx
1645 movl %esi, %ebp
1646.byte 209
1647.byte 194 /* roll $1 %edx */
1648 xorl %eax, %ebp
1649 movl %edx, 16(%esp)
1650 xorl %ebx, %ebp
1651 leal 3395469782(%edx,%ecx,1),%edx
1652 movl %edi, %ecx
1653 roll $5, %ecx
1654.byte 209
1655.byte 206 /* rorl $1 %esi */
1656 addl %ebp, %ecx
1657.byte 209
1658.byte 206 /* rorl $1 %esi */
1659 addl %ecx, %edx
1660 /* 20_39 69 */
1661 movl 20(%esp), %ecx
1662 movl 28(%esp), %ebp
1663 xorl %ebp, %ecx
1664 movl 52(%esp), %ebp
1665 xorl %ebp, %ecx
1666 movl 8(%esp), %ebp
1667 xorl %ebp, %ecx
1668 movl %edi, %ebp
1669.byte 209
1670.byte 193 /* roll $1 %ecx */
1671 xorl %esi, %ebp
1672 movl %ecx, 20(%esp)
1673 xorl %eax, %ebp
1674 leal 3395469782(%ecx,%ebx,1),%ecx
1675 movl %edx, %ebx
1676 roll $5, %ebx
1677.byte 209
1678.byte 207 /* rorl $1 %edi */
1679 addl %ebp, %ebx
1680.byte 209
1681.byte 207 /* rorl $1 %edi */
1682 addl %ebx, %ecx
1683 /* 20_39 70 */
1684 movl 24(%esp), %ebx
1685 movl 32(%esp), %ebp
1686 xorl %ebp, %ebx
1687 movl 56(%esp), %ebp
1688 xorl %ebp, %ebx
1689 movl 12(%esp), %ebp
1690 xorl %ebp, %ebx
1691 movl %edx, %ebp
1692.byte 209
1693.byte 195 /* roll $1 %ebx */
1694 xorl %edi, %ebp
1695 movl %ebx, 24(%esp)
1696 xorl %esi, %ebp
1697 leal 3395469782(%ebx,%eax,1),%ebx
1698 movl %ecx, %eax
1699 roll $5, %eax
1700.byte 209
1701.byte 202 /* rorl $1 %edx */
1702 addl %ebp, %eax
1703.byte 209
1704.byte 202 /* rorl $1 %edx */
1705 addl %eax, %ebx
1706 /* 20_39 71 */
1707 movl 28(%esp), %eax
1708 movl 36(%esp), %ebp
1709 xorl %ebp, %eax
1710 movl 60(%esp), %ebp
1711 xorl %ebp, %eax
1712 movl 16(%esp), %ebp
1713 xorl %ebp, %eax
1714 movl %ecx, %ebp
1715.byte 209
1716.byte 192 /* roll $1 %eax */
1717 xorl %edx, %ebp
1718 movl %eax, 28(%esp)
1719 xorl %edi, %ebp
1720 leal 3395469782(%eax,%esi,1),%eax
1721 movl %ebx, %esi
1722 roll $5, %esi
1723.byte 209
1724.byte 201 /* rorl $1 %ecx */
1725 addl %ebp, %esi
1726.byte 209
1727.byte 201 /* rorl $1 %ecx */
1728 addl %esi, %eax
1729 /* 20_39 72 */
1730 movl 32(%esp), %esi
1731 movl 40(%esp), %ebp
1732 xorl %ebp, %esi
1733 movl (%esp), %ebp
1734 xorl %ebp, %esi
1735 movl 20(%esp), %ebp
1736 xorl %ebp, %esi
1737 movl %ebx, %ebp
1738.byte 209
1739.byte 198 /* roll $1 %esi */
1740 xorl %ecx, %ebp
1741 movl %esi, 32(%esp)
1742 xorl %edx, %ebp
1743 leal 3395469782(%esi,%edi,1),%esi
1744 movl %eax, %edi
1745 roll $5, %edi
1746.byte 209
1747.byte 203 /* rorl $1 %ebx */
1748 addl %ebp, %edi
1749.byte 209
1750.byte 203 /* rorl $1 %ebx */
1751 addl %edi, %esi
1752 /* 20_39 73 */
1753 movl 36(%esp), %edi
1754 movl 44(%esp), %ebp
1755 xorl %ebp, %edi
1756 movl 4(%esp), %ebp
1757 xorl %ebp, %edi
1758 movl 24(%esp), %ebp
1759 xorl %ebp, %edi
1760 movl %eax, %ebp
1761.byte 209
1762.byte 199 /* roll $1 %edi */
1763 xorl %ebx, %ebp
1764 movl %edi, 36(%esp)
1765 xorl %ecx, %ebp
1766 leal 3395469782(%edi,%edx,1),%edi
1767 movl %esi, %edx
1768 roll $5, %edx
1769.byte 209
1770.byte 200 /* rorl $1 %eax */
1771 addl %ebp, %edx
1772.byte 209
1773.byte 200 /* rorl $1 %eax */
1774 addl %edx, %edi
1775 /* 20_39 74 */
1776 movl 40(%esp), %edx
1777 movl 48(%esp), %ebp
1778 xorl %ebp, %edx
1779 movl 8(%esp), %ebp
1780 xorl %ebp, %edx
1781 movl 28(%esp), %ebp
1782 xorl %ebp, %edx
1783 movl %esi, %ebp
1784.byte 209
1785.byte 194 /* roll $1 %edx */
1786 xorl %eax, %ebp
1787 movl %edx, 40(%esp)
1788 xorl %ebx, %ebp
1789 leal 3395469782(%edx,%ecx,1),%edx
1790 movl %edi, %ecx
1791 roll $5, %ecx
1792.byte 209
1793.byte 206 /* rorl $1 %esi */
1794 addl %ebp, %ecx
1795.byte 209
1796.byte 206 /* rorl $1 %esi */
1797 addl %ecx, %edx
1798 /* 20_39 75 */
1799 movl 44(%esp), %ecx
1800 movl 52(%esp), %ebp
1801 xorl %ebp, %ecx
1802 movl 12(%esp), %ebp
1803 xorl %ebp, %ecx
1804 movl 32(%esp), %ebp
1805 xorl %ebp, %ecx
1806 movl %edi, %ebp
1807.byte 209
1808.byte 193 /* roll $1 %ecx */
1809 xorl %esi, %ebp
1810 movl %ecx, 44(%esp)
1811 xorl %eax, %ebp
1812 leal 3395469782(%ecx,%ebx,1),%ecx
1813 movl %edx, %ebx
1814 roll $5, %ebx
1815.byte 209
1816.byte 207 /* rorl $1 %edi */
1817 addl %ebp, %ebx
1818.byte 209
1819.byte 207 /* rorl $1 %edi */
1820 addl %ebx, %ecx
1821 /* 20_39 76 */
1822 movl 48(%esp), %ebx
1823 movl 56(%esp), %ebp
1824 xorl %ebp, %ebx
1825 movl 16(%esp), %ebp
1826 xorl %ebp, %ebx
1827 movl 36(%esp), %ebp
1828 xorl %ebp, %ebx
1829 movl %edx, %ebp
1830.byte 209
1831.byte 195 /* roll $1 %ebx */
1832 xorl %edi, %ebp
1833 movl %ebx, 48(%esp)
1834 xorl %esi, %ebp
1835 leal 3395469782(%ebx,%eax,1),%ebx
1836 movl %ecx, %eax
1837 roll $5, %eax
1838.byte 209
1839.byte 202 /* rorl $1 %edx */
1840 addl %ebp, %eax
1841.byte 209
1842.byte 202 /* rorl $1 %edx */
1843 addl %eax, %ebx
1844 /* 20_39 77 */
1845 movl 52(%esp), %eax
1846 movl 60(%esp), %ebp
1847 xorl %ebp, %eax
1848 movl 20(%esp), %ebp
1849 xorl %ebp, %eax
1850 movl 40(%esp), %ebp
1851 xorl %ebp, %eax
1852 movl %ecx, %ebp
1853.byte 209
1854.byte 192 /* roll $1 %eax */
1855 xorl %edx, %ebp
1856 movl %eax, 52(%esp)
1857 xorl %edi, %ebp
1858 leal 3395469782(%eax,%esi,1),%eax
1859 movl %ebx, %esi
1860 roll $5, %esi
1861.byte 209
1862.byte 201 /* rorl $1 %ecx */
1863 addl %ebp, %esi
1864.byte 209
1865.byte 201 /* rorl $1 %ecx */
1866 addl %esi, %eax
1867 /* 20_39 78 */
1868 movl 56(%esp), %esi
1869 movl (%esp), %ebp
1870 xorl %ebp, %esi
1871 movl 24(%esp), %ebp
1872 xorl %ebp, %esi
1873 movl 44(%esp), %ebp
1874 xorl %ebp, %esi
1875 movl %ebx, %ebp
1876.byte 209
1877.byte 198 /* roll $1 %esi */
1878 xorl %ecx, %ebp
1879 movl %esi, 56(%esp)
1880 xorl %edx, %ebp
1881 leal 3395469782(%esi,%edi,1),%esi
1882 movl %eax, %edi
1883 roll $5, %edi
1884.byte 209
1885.byte 203 /* rorl $1 %ebx */
1886 addl %ebp, %edi
1887.byte 209
1888.byte 203 /* rorl $1 %ebx */
1889 addl %edi, %esi
1890 /* 20_39 79 */
1891 movl 60(%esp), %edi
1892 movl 4(%esp), %ebp
1893 xorl %ebp, %edi
1894 movl 28(%esp), %ebp
1895 xorl %ebp, %edi
1896 movl 48(%esp), %ebp
1897 xorl %ebp, %edi
1898 movl %eax, %ebp
1899.byte 209
1900.byte 199 /* roll $1 %edi */
1901 xorl %ebx, %ebp
1902 movl %edi, 60(%esp)
1903 xorl %ecx, %ebp
1904 leal 3395469782(%edi,%edx,1),%edi
1905 movl %esi, %edx
1906 roll $5, %edx
1907 addl %ebp, %edx
1908 movl 92(%esp), %ebp
1909.byte 209
1910.byte 200 /* rorl $1 %eax */
1911 addl %edx, %edi
1912.byte 209
1913.byte 200 /* rorl $1 %eax */
1914 /* End processing */
1915
1916 movl 12(%ebp), %edx
1917 addl %ebx, %edx
1918 movl 4(%ebp), %ebx
1919 addl %esi, %ebx
1920 movl %eax, %esi
1921 movl (%ebp), %eax
1922 movl %edx, 12(%ebp)
1923 addl %edi, %eax
1924 movl 16(%ebp), %edi
1925 addl %ecx, %edi
1926 movl 8(%ebp), %ecx
1927 addl %esi, %ecx
1928 movl %eax, (%ebp)
1929 movl 64(%esp), %esi
1930 movl %ecx, 8(%ebp)
1931 addl $64, %esi
1932 movl 68(%esp), %eax
1933 movl %edi, 16(%ebp)
1934 cmpl %esi, %eax
1935 movl %ebx, 4(%ebp)
1936 jl .L001end
1937 movl (%esi), %eax
1938 jmp .L000start
1939.L001end:
1940 addl $72, %esp
1941 popl %edi
1942 popl %ebx
1943 popl %ebp
1944 popl %esi
1945 ret
1946.sha1_block_x86_end:
1947 SIZE(sha1_block_x86,.sha1_block_x86_end-sha1_block_x86)
1948.ident "desasm.pl"
diff --git a/src/lib/libcrypto/sha/sha.c b/src/lib/libcrypto/sha/sha.c
index 713fec3610..42126551d1 100644
--- a/src/lib/libcrypto/sha/sha.c
+++ b/src/lib/libcrypto/sha/sha.c
@@ -58,23 +58,14 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include "sha.h" 61#include <openssl/sha.h>
62 62
63#define BUFSIZE 1024*16 63#define BUFSIZE 1024*16
64 64
65#ifndef NOPROTO
66void do_fp(FILE *f); 65void do_fp(FILE *f);
67void pt(unsigned char *md); 66void pt(unsigned char *md);
68int read(int, void *, unsigned int); 67int read(int, void *, unsigned int);
69#else 68int main(int argc, char **argv)
70void do_fp();
71void pt();
72int read();
73#endif
74
75int main(argc, argv)
76int argc;
77char **argv;
78 { 69 {
79 int i,err=0; 70 int i,err=0;
80 FILE *IN; 71 FILE *IN;
@@ -102,8 +93,7 @@ char **argv;
102 exit(err); 93 exit(err);
103 } 94 }
104 95
105void do_fp(f) 96void do_fp(FILE *f)
106FILE *f;
107 { 97 {
108 SHA_CTX c; 98 SHA_CTX c;
109 unsigned char md[SHA_DIGEST_LENGTH]; 99 unsigned char md[SHA_DIGEST_LENGTH];
@@ -123,8 +113,7 @@ FILE *f;
123 pt(md); 113 pt(md);
124 } 114 }
125 115
126void pt(md) 116void pt(unsigned char *md)
127unsigned char *md;
128 { 117 {
129 int i; 118 int i;
130 119
diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h
index 4cf0ea0225..cd6960ee1a 100644
--- a/src/lib/libcrypto/sha/sha.h
+++ b/src/lib/libcrypto/sha/sha.h
@@ -63,45 +63,55 @@
63extern "C" { 63extern "C" {
64#endif 64#endif
65 65
66#define SHA_CBLOCK 64 66#ifdef NO_SHA
67#error SHA is disabled.
68#endif
69
70/*
71 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72 * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
73 * ! SHA_LONG_LOG2 has to be defined along. !
74 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75 */
76
77#if defined(WIN16) || defined(__LP32__)
78#define SHA_LONG unsigned long
79#elif defined(_CRAY) || defined(__ILP64__)
80#define SHA_LONG unsigned long
81#define SHA_LONG_LOG2 3
82#else
83#define SHA_LONG unsigned int
84#endif
85
67#define SHA_LBLOCK 16 86#define SHA_LBLOCK 16
68#define SHA_BLOCK 16 87#define SHA_CBLOCK (SHA_LBLOCK*4) /* SHA treats input data as a
69#define SHA_LAST_BLOCK 56 88 * contiguous array of 32 bit
70#define SHA_LENGTH_BLOCK 8 89 * wide big-endian values. */
90#define SHA_LAST_BLOCK (SHA_CBLOCK-8)
71#define SHA_DIGEST_LENGTH 20 91#define SHA_DIGEST_LENGTH 20
72 92
73typedef struct SHAstate_st 93typedef struct SHAstate_st
74 { 94 {
75 unsigned long h0,h1,h2,h3,h4; 95 SHA_LONG h0,h1,h2,h3,h4;
76 unsigned long Nl,Nh; 96 SHA_LONG Nl,Nh;
77 unsigned long data[SHA_LBLOCK]; 97 SHA_LONG data[SHA_LBLOCK];
78 int num; 98 int num;
79 } SHA_CTX; 99 } SHA_CTX;
80 100
81#ifndef NOPROTO 101#ifndef NO_SHA0
82void SHA_Init(SHA_CTX *c); 102void SHA_Init(SHA_CTX *c);
83void SHA_Update(SHA_CTX *c, unsigned char *data, unsigned long len); 103void SHA_Update(SHA_CTX *c, const unsigned char *data, unsigned long len);
84void SHA_Final(unsigned char *md, SHA_CTX *c); 104void SHA_Final(unsigned char *md, SHA_CTX *c);
85unsigned char *SHA(unsigned char *d, unsigned long n,unsigned char *md); 105unsigned char *SHA(const unsigned char *d, unsigned long n,unsigned char *md);
86void SHA_Transform(SHA_CTX *c, unsigned char *data); 106void SHA_Transform(SHA_CTX *c, unsigned char *data);
107#endif
108#ifndef NO_SHA1
87void SHA1_Init(SHA_CTX *c); 109void SHA1_Init(SHA_CTX *c);
88void SHA1_Update(SHA_CTX *c, unsigned char *data, unsigned long len); 110void SHA1_Update(SHA_CTX *c, const unsigned char *data, unsigned long len);
89void SHA1_Final(unsigned char *md, SHA_CTX *c); 111void SHA1_Final(unsigned char *md, SHA_CTX *c);
90unsigned char *SHA1(unsigned char *d, unsigned long n,unsigned char *md); 112unsigned char *SHA1(const unsigned char *d, unsigned long n,unsigned char *md);
91void SHA1_Transform(SHA_CTX *c, unsigned char *data); 113void SHA1_Transform(SHA_CTX *c, unsigned char *data);
92#else
93void SHA_Init();
94void SHA_Update();
95void SHA_Final();
96unsigned char *SHA();
97void SHA_Transform();
98void SHA1_Init();
99void SHA1_Update();
100void SHA1_Final();
101unsigned char *SHA1();
102void SHA1_Transform();
103#endif 114#endif
104
105#ifdef __cplusplus 115#ifdef __cplusplus
106} 116}
107#endif 117#endif
diff --git a/src/lib/libcrypto/sha/sha1.c b/src/lib/libcrypto/sha/sha1.c
index a4739ac9fd..d350c88ee4 100644
--- a/src/lib/libcrypto/sha/sha1.c
+++ b/src/lib/libcrypto/sha/sha1.c
@@ -58,23 +58,17 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include "sha.h" 61#include <openssl/sha.h>
62 62
63#define BUFSIZE 1024*16 63#define BUFSIZE 1024*16
64 64
65#ifndef NOPROTO
66void do_fp(FILE *f); 65void do_fp(FILE *f);
67void pt(unsigned char *md); 66void pt(unsigned char *md);
67#ifndef _OSD_POSIX
68int read(int, void *, unsigned int); 68int read(int, void *, unsigned int);
69#else
70void do_fp();
71void pt();
72int read();
73#endif 69#endif
74 70
75int main(argc, argv) 71int main(int argc, char **argv)
76int argc;
77char **argv;
78 { 72 {
79 int i,err=0; 73 int i,err=0;
80 FILE *IN; 74 FILE *IN;
@@ -102,8 +96,7 @@ char **argv;
102 exit(err); 96 exit(err);
103 } 97 }
104 98
105void do_fp(f) 99void do_fp(FILE *f)
106FILE *f;
107 { 100 {
108 SHA_CTX c; 101 SHA_CTX c;
109 unsigned char md[SHA_DIGEST_LENGTH]; 102 unsigned char md[SHA_DIGEST_LENGTH];
@@ -123,8 +116,7 @@ FILE *f;
123 pt(md); 116 pt(md);
124 } 117 }
125 118
126void pt(md) 119void pt(unsigned char *md)
127unsigned char *md;
128 { 120 {
129 int i; 121 int i;
130 122
diff --git a/src/lib/libcrypto/sha/sha1_one.c b/src/lib/libcrypto/sha/sha1_one.c
index fe5770d601..861752eaa7 100644
--- a/src/lib/libcrypto/sha/sha1_one.c
+++ b/src/lib/libcrypto/sha/sha1_one.c
@@ -58,12 +58,10 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include "sha.h" 61#include <openssl/sha.h>
62 62
63unsigned char *SHA1(d, n, md) 63#ifndef NO_SHA1
64unsigned char *d; 64unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md)
65unsigned long n;
66unsigned char *md;
67 { 65 {
68 SHA_CTX c; 66 SHA_CTX c;
69 static unsigned char m[SHA_DIGEST_LENGTH]; 67 static unsigned char m[SHA_DIGEST_LENGTH];
@@ -75,3 +73,4 @@ unsigned char *md;
75 memset(&c,0,sizeof(c)); 73 memset(&c,0,sizeof(c));
76 return(md); 74 return(md);
77 } 75 }
76#endif
diff --git a/src/lib/libcrypto/sha/sha1dgst.c b/src/lib/libcrypto/sha/sha1dgst.c
index 2b0ae1f0d4..66e885dd76 100644
--- a/src/lib/libcrypto/sha/sha1dgst.c
+++ b/src/lib/libcrypto/sha/sha1dgst.c
@@ -60,43 +60,35 @@
60#include <string.h> 60#include <string.h>
61#undef SHA_0 61#undef SHA_0
62#define SHA_1 62#define SHA_1
63#include "sha.h" 63#include <openssl/sha.h>
64#include "sha_locl.h" 64#include "sha_locl.h"
65#include <openssl/opensslv.h>
65 66
66char *SHA1_version="SHA1 part of SSLeay 0.9.0b 29-Jun-1998"; 67#ifndef NO_SHA1
68char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
67 69
68/* Implemented from SHA-1 document - The Secure Hash Algorithm 70/* Implemented from SHA-1 document - The Secure Hash Algorithm
69 */ 71 */
70 72
71#define INIT_DATA_h0 (unsigned long)0x67452301L 73#define INIT_DATA_h0 0x67452301UL
72#define INIT_DATA_h1 (unsigned long)0xefcdab89L 74#define INIT_DATA_h1 0xefcdab89UL
73#define INIT_DATA_h2 (unsigned long)0x98badcfeL 75#define INIT_DATA_h2 0x98badcfeUL
74#define INIT_DATA_h3 (unsigned long)0x10325476L 76#define INIT_DATA_h3 0x10325476UL
75#define INIT_DATA_h4 (unsigned long)0xc3d2e1f0L 77#define INIT_DATA_h4 0xc3d2e1f0UL
76 78
77#define K_00_19 0x5a827999L 79#define K_00_19 0x5a827999UL
78#define K_20_39 0x6ed9eba1L 80#define K_20_39 0x6ed9eba1UL
79#define K_40_59 0x8f1bbcdcL 81#define K_40_59 0x8f1bbcdcUL
80#define K_60_79 0xca62c1d6L 82#define K_60_79 0xca62c1d6UL
81 83
82#ifndef NOPROTO 84#ifdef SHA1_ASM
83# ifdef SHA1_ASM 85 void sha1_block_x86(SHA_CTX *c, register SHA_LONG *p, int num);
84 void sha1_block_x86(SHA_CTX *c, register unsigned long *p, int num); 86# define sha1_block(c,p,n) sha1_block_x86((c),(p),(n)*SHA_CBLOCK)
85# define sha1_block sha1_block_x86
86# else
87 void sha1_block(SHA_CTX *c, register unsigned long *p, int num);
88# endif
89#else 87#else
90# ifdef SHA1_ASM 88 static void sha1_block(SHA_CTX *c, register SHA_LONG *p, int num);
91 void sha1_block_x86();
92# define sha1_block sha1_block_x86
93# else
94 void sha1_block();
95# endif
96#endif 89#endif
97 90
98 91#if !defined(B_ENDIAN) && defined(SHA1_ASM)
99#if defined(L_ENDIAN) && defined(SHA1_ASM)
100# define M_c2nl c2l 92# define M_c2nl c2l
101# define M_p_c2nl p_c2l 93# define M_p_c2nl p_c2l
102# define M_c2nl_p c2l_p 94# define M_c2nl_p c2l_p
@@ -110,8 +102,7 @@ char *SHA1_version="SHA1 part of SSLeay 0.9.0b 29-Jun-1998";
110# define M_nl2c nl2c 102# define M_nl2c nl2c
111#endif 103#endif
112 104
113void SHA1_Init(c) 105void SHA1_Init(SHA_CTX *c)
114SHA_CTX *c;
115 { 106 {
116 c->h0=INIT_DATA_h0; 107 c->h0=INIT_DATA_h0;
117 c->h1=INIT_DATA_h1; 108 c->h1=INIT_DATA_h1;
@@ -123,14 +114,12 @@ SHA_CTX *c;
123 c->num=0; 114 c->num=0;
124 } 115 }
125 116
126void SHA1_Update(c, data, len) 117void SHA1_Update(SHA_CTX *c, register const unsigned char *data,
127SHA_CTX *c; 118 unsigned long len)
128register unsigned char *data;
129unsigned long len;
130 { 119 {
131 register ULONG *p; 120 register SHA_LONG *p;
132 int ew,ec,sw,sc; 121 int ew,ec,sw,sc;
133 ULONG l; 122 SHA_LONG l;
134 123
135 if (len == 0) return; 124 if (len == 0) return;
136 125
@@ -158,7 +147,7 @@ unsigned long len;
158 } 147 }
159 len-=(SHA_CBLOCK-c->num); 148 len-=(SHA_CBLOCK-c->num);
160 149
161 sha1_block(c,p,64); 150 sha1_block(c,p,1);
162 c->num=0; 151 c->num=0;
163 /* drop through and do the rest */ 152 /* drop through and do the rest */
164 } 153 }
@@ -195,15 +184,15 @@ unsigned long len;
195 * copies it to a local array. I should be able to do this for 184 * copies it to a local array. I should be able to do this for
196 * the C version as well.... 185 * the C version as well....
197 */ 186 */
198#if 1 187#if SHA_LONG_LOG2==2
199#if defined(B_ENDIAN) || defined(SHA1_ASM) 188#if defined(B_ENDIAN) || defined(SHA1_ASM)
200 if ((((unsigned int)data)%sizeof(ULONG)) == 0) 189 if ((((unsigned long)data)%sizeof(SHA_LONG)) == 0)
201 { 190 {
202 sw=len/SHA_CBLOCK; 191 sw=len/SHA_CBLOCK;
203 if (sw) 192 if (sw)
204 { 193 {
194 sha1_block(c,(SHA_LONG *)data,sw);
205 sw*=SHA_CBLOCK; 195 sw*=SHA_CBLOCK;
206 sha1_block(c,(ULONG *)data,sw);
207 data+=sw; 196 data+=sw;
208 len-=sw; 197 len-=sw;
209 } 198 }
@@ -215,35 +204,61 @@ unsigned long len;
215 p=c->data; 204 p=c->data;
216 while (len >= SHA_CBLOCK) 205 while (len >= SHA_CBLOCK)
217 { 206 {
218#if defined(B_ENDIAN) || defined(L_ENDIAN) 207#if SHA_LONG_LOG2==2
219 if (p != (unsigned long *)data) 208#if defined(B_ENDIAN) || defined(SHA1_ASM)
209#define SHA_NO_TAIL_CODE
210 /*
211 * Basically we get here only when data happens
212 * to be unaligned.
213 */
214 if (p != (SHA_LONG *)data)
220 memcpy(p,data,SHA_CBLOCK); 215 memcpy(p,data,SHA_CBLOCK);
221 data+=SHA_CBLOCK; 216 data+=SHA_CBLOCK;
222# ifdef L_ENDIAN 217 sha1_block(c,p=c->data,1);
223# ifndef SHA1_ASM /* Will not happen */ 218 len-=SHA_CBLOCK;
224 for (sw=(SHA_LBLOCK/4); sw; sw--) 219#elif defined(L_ENDIAN)
220#define BE_COPY(dst,src,i) { \
221 l = ((SHA_LONG *)src)[i]; \
222 Endian_Reverse32(l); \
223 dst[i] = l; \
224 }
225 if ((((unsigned long)data)%sizeof(SHA_LONG)) == 0)
225 { 226 {
226 Endian_Reverse32(p[0]); 227 for (sw=(SHA_LBLOCK/4); sw; sw--)
227 Endian_Reverse32(p[1]); 228 {
228 Endian_Reverse32(p[2]); 229 BE_COPY(p,data,0);
229 Endian_Reverse32(p[3]); 230 BE_COPY(p,data,1);
230 p+=4; 231 BE_COPY(p,data,2);
232 BE_COPY(p,data,3);
233 p+=4;
234 data += 4*sizeof(SHA_LONG);
235 }
236 sha1_block(c,p=c->data,1);
237 len-=SHA_CBLOCK;
238 continue;
231 } 239 }
240#endif
241#endif
242#ifndef SHA_NO_TAIL_CODE
243 /*
244 * In addition to "sizeof(SHA_LONG)!= 4" case the
245 * following code covers unaligned access cases on
246 * little-endian machines.
247 * <appro@fy.chalmers.se>
248 */
232 p=c->data; 249 p=c->data;
233# endif 250 for (sw=(SHA_LBLOCK/4); sw; sw--)
234# endif
235#else
236 for (sw=(SHA_BLOCK/4); sw; sw--)
237 { 251 {
238 M_c2nl(data,l); *(p++)=l; 252 M_c2nl(data,l); p[0]=l;
239 M_c2nl(data,l); *(p++)=l; 253 M_c2nl(data,l); p[1]=l;
240 M_c2nl(data,l); *(p++)=l; 254 M_c2nl(data,l); p[2]=l;
241 M_c2nl(data,l); *(p++)=l; 255 M_c2nl(data,l); p[3]=l;
256 p+=4;
242 } 257 }
243 p=c->data; 258 p=c->data;
244#endif 259 sha1_block(c,p,1);
245 sha1_block(c,p,64);
246 len-=SHA_CBLOCK; 260 len-=SHA_CBLOCK;
261#endif
247 } 262 }
248 ec=(int)len; 263 ec=(int)len;
249 c->num=ec; 264 c->num=ec;
@@ -256,52 +271,61 @@ unsigned long len;
256 p[sw]=l; 271 p[sw]=l;
257 } 272 }
258 273
259void SHA1_Transform(c,b) 274void SHA1_Transform(SHA_CTX *c, unsigned char *b)
260SHA_CTX *c;
261unsigned char *b;
262 { 275 {
263 ULONG p[16]; 276 SHA_LONG p[SHA_LBLOCK];
264#ifndef B_ENDIAN
265 ULONG *q;
266 int i;
267#endif
268 277
269#if defined(B_ENDIAN) || defined(L_ENDIAN) 278#if SHA_LONG_LOG2==2
270 memcpy(p,b,64); 279#if defined(B_ENDIAN) || defined(SHA1_ASM)
271#ifdef L_ENDIAN 280 memcpy(p,b,SHA_CBLOCK);
272 q=p; 281 sha1_block(c,p,1);
273 for (i=(SHA_LBLOCK/4); i; i--) 282 return;
283#elif defined(L_ENDIAN)
284 if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
274 { 285 {
275 Endian_Reverse32(q[0]); 286 SHA_LONG *q;
276 Endian_Reverse32(q[1]); 287 int i;
277 Endian_Reverse32(q[2]); 288
278 Endian_Reverse32(q[3]); 289 q=p;
279 q+=4; 290 for (i=(SHA_LBLOCK/4); i; i--)
291 {
292 unsigned long l;
293 BE_COPY(q,b,0); /* BE_COPY was defined above */
294 BE_COPY(q,b,1);
295 BE_COPY(q,b,2);
296 BE_COPY(q,b,3);
297 q+=4;
298 b+=4*sizeof(SHA_LONG);
299 }
300 sha1_block(c,p,1);
301 return;
280 } 302 }
281#endif 303#endif
282#else 304#endif
283 q=p; 305#ifndef SHA_NO_TAIL_CODE /* defined above, see comment */
284 for (i=(SHA_LBLOCK/4); i; i--)
285 { 306 {
286 ULONG l; 307 SHA_LONG *q;
287 c2nl(b,l); *(q++)=l; 308 int i;
288 c2nl(b,l); *(q++)=l; 309
289 c2nl(b,l); *(q++)=l; 310 q=p;
290 c2nl(b,l); *(q++)=l; 311 for (i=(SHA_LBLOCK/4); i; i--)
291 } 312 {
313 SHA_LONG l;
314 c2nl(b,l); *(q++)=l;
315 c2nl(b,l); *(q++)=l;
316 c2nl(b,l); *(q++)=l;
317 c2nl(b,l); *(q++)=l;
318 }
319 sha1_block(c,p,1);
320 }
292#endif 321#endif
293 sha1_block(c,p,64);
294 } 322 }
295 323
296#ifndef SHA1_ASM 324#ifndef SHA1_ASM
297 325static void sha1_block(SHA_CTX *c, register SHA_LONG *W, int num)
298void sha1_block(c, W, num)
299SHA_CTX *c;
300register unsigned long *W;
301int num;
302 { 326 {
303 register ULONG A,B,C,D,E,T; 327 register SHA_LONG A,B,C,D,E,T;
304 ULONG X[16]; 328 SHA_LONG X[SHA_LBLOCK];
305 329
306 A=c->h0; 330 A=c->h0;
307 B=c->h1; 331 B=c->h1;
@@ -401,8 +425,7 @@ int num;
401 c->h3=(c->h3+B)&0xffffffffL; 425 c->h3=(c->h3+B)&0xffffffffL;
402 c->h4=(c->h4+C)&0xffffffffL; 426 c->h4=(c->h4+C)&0xffffffffL;
403 427
404 num-=64; 428 if (--num <= 0) break;
405 if (num <= 0) break;
406 429
407 A=c->h0; 430 A=c->h0;
408 B=c->h1; 431 B=c->h1;
@@ -410,18 +433,21 @@ int num;
410 D=c->h3; 433 D=c->h3;
411 E=c->h4; 434 E=c->h4;
412 435
413 W+=16; 436 W+=SHA_LBLOCK; /* Note! This can happen only when sizeof(SHA_LONG)
437 * is 4. Whenever it's not the actual case this
438 * function is never called with num larger than 1
439 * and we never advance down here.
440 * <appro@fy.chalmers.se>
441 */
414 } 442 }
415 } 443 }
416#endif 444#endif
417 445
418void SHA1_Final(md, c) 446void SHA1_Final(unsigned char *md, SHA_CTX *c)
419unsigned char *md;
420SHA_CTX *c;
421 { 447 {
422 register int i,j; 448 register int i,j;
423 register ULONG l; 449 register SHA_LONG l;
424 register ULONG *p; 450 register SHA_LONG *p;
425 static unsigned char end[4]={0x80,0x00,0x00,0x00}; 451 static unsigned char end[4]={0x80,0x00,0x00,0x00};
426 unsigned char *cp=end; 452 unsigned char *cp=end;
427 453
@@ -441,18 +467,20 @@ SHA_CTX *c;
441 { 467 {
442 for (; i<SHA_LBLOCK; i++) 468 for (; i<SHA_LBLOCK; i++)
443 p[i]=0; 469 p[i]=0;
444 sha1_block(c,p,64); 470 sha1_block(c,p,1);
445 i=0; 471 i=0;
446 } 472 }
447 for (; i<(SHA_LBLOCK-2); i++) 473 for (; i<(SHA_LBLOCK-2); i++)
448 p[i]=0; 474 p[i]=0;
449 p[SHA_LBLOCK-2]=c->Nh; 475 p[SHA_LBLOCK-2]=c->Nh;
450 p[SHA_LBLOCK-1]=c->Nl; 476 p[SHA_LBLOCK-1]=c->Nl;
451#if defined(L_ENDIAN) && defined(SHA1_ASM) 477#if SHA_LONG_LOG2==2
478#if !defined(B_ENDIAN) && defined(SHA1_ASM)
452 Endian_Reverse32(p[SHA_LBLOCK-2]); 479 Endian_Reverse32(p[SHA_LBLOCK-2]);
453 Endian_Reverse32(p[SHA_LBLOCK-1]); 480 Endian_Reverse32(p[SHA_LBLOCK-1]);
454#endif 481#endif
455 sha1_block(c,p,64); 482#endif
483 sha1_block(c,p,1);
456 cp=md; 484 cp=md;
457 l=c->h0; nl2c(l,cp); 485 l=c->h0; nl2c(l,cp);
458 l=c->h1; nl2c(l,cp); 486 l=c->h1; nl2c(l,cp);
@@ -460,9 +488,11 @@ SHA_CTX *c;
460 l=c->h3; nl2c(l,cp); 488 l=c->h3; nl2c(l,cp);
461 l=c->h4; nl2c(l,cp); 489 l=c->h4; nl2c(l,cp);
462 490
463 /* clear stuff, sha1_block may be leaving some stuff on the stack
464 * but I'm not worried :-) */
465 c->num=0; 491 c->num=0;
466/* memset((char *)&c,0,sizeof(c));*/ 492 /* sha_block may be leaving some stuff on the stack
493 * but I'm not worried :-)
494 memset((void *)c,0,sizeof(SHA_CTX));
495 */
467 } 496 }
497#endif
468 498
diff --git a/src/lib/libcrypto/sha/sha1s.cpp b/src/lib/libcrypto/sha/sha1s.cpp
index 0163377de6..3103e1871b 100644
--- a/src/lib/libcrypto/sha/sha1s.cpp
+++ b/src/lib/libcrypto/sha/sha1s.cpp
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc)
32 32
33#include <stdio.h> 33#include <stdio.h>
34#include <stdlib.h> 34#include <stdlib.h>
35#include "sha.h" 35#include <openssl/sha.h>
36 36
37extern "C" { 37extern "C" {
38void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num); 38void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num);
diff --git a/src/lib/libcrypto/sha/sha1test.c b/src/lib/libcrypto/sha/sha1test.c
index 3c62a218b4..9400ad2a61 100644
--- a/src/lib/libcrypto/sha/sha1test.c
+++ b/src/lib/libcrypto/sha/sha1test.c
@@ -59,7 +59,19 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <stdlib.h> 61#include <stdlib.h>
62#include "sha.h" 62
63#ifdef NO_SHA
64int main(int argc, char *argv[])
65{
66 printf("No SHA support\n");
67 return(0);
68}
69#else
70#include <openssl/sha.h>
71
72#ifdef CHARSET_EBCDIC
73#include <openssl/ebcdic.h>
74#endif
63 75
64#undef SHA_0 /* FIPS 180 */ 76#undef SHA_0 /* FIPS 180 */
65#define SHA_1 /* FIPS 180-1 */ 77#define SHA_1 /* FIPS 180-1 */
@@ -87,15 +99,8 @@ char *bigret=
87 "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; 99 "34aa973cd4c4daa4f61eeb2bdbad27316534016f";
88#endif 100#endif
89 101
90#ifndef NOPROTO
91static char *pt(unsigned char *md); 102static char *pt(unsigned char *md);
92#else 103int main(int argc, char *argv[])
93static char *pt();
94#endif
95
96int main(argc,argv)
97int argc;
98char *argv[];
99 { 104 {
100 int i,err=0; 105 int i,err=0;
101 unsigned char **P,**R; 106 unsigned char **P,**R;
@@ -104,6 +109,11 @@ char *argv[];
104 SHA_CTX c; 109 SHA_CTX c;
105 unsigned char md[SHA_DIGEST_LENGTH]; 110 unsigned char md[SHA_DIGEST_LENGTH];
106 111
112#ifdef CHARSET_EBCDIC
113 ebcdic2ascii(test[0], test[0], strlen(test[0]));
114 ebcdic2ascii(test[1], test[1], strlen(test[1]));
115#endif
116
107 P=(unsigned char **)test; 117 P=(unsigned char **)test;
108 R=(unsigned char **)ret; 118 R=(unsigned char **)ret;
109 i=1; 119 i=1;
@@ -124,6 +134,9 @@ char *argv[];
124 } 134 }
125 135
126 memset(buf,'a',1000); 136 memset(buf,'a',1000);
137#ifdef CHARSET_EBCDIC
138 ebcdic2ascii(buf, buf, 1000);
139#endif /*CHARSET_EBCDIC*/
127 SHA1_Init(&c); 140 SHA1_Init(&c);
128 for (i=0; i<1000; i++) 141 for (i=0; i<1000; i++)
129 SHA1_Update(&c,buf,1000); 142 SHA1_Update(&c,buf,1000);
@@ -143,8 +156,7 @@ char *argv[];
143 return(0); 156 return(0);
144 } 157 }
145 158
146static char *pt(md) 159static char *pt(unsigned char *md)
147unsigned char *md;
148 { 160 {
149 int i; 161 int i;
150 static char buf[80]; 162 static char buf[80];
@@ -153,3 +165,4 @@ unsigned char *md;
153 sprintf(&(buf[i*2]),"%02x",md[i]); 165 sprintf(&(buf[i*2]),"%02x",md[i]);
154 return(buf); 166 return(buf);
155 } 167 }
168#endif
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c
index 8ed533ea26..4df535360f 100644
--- a/src/lib/libcrypto/sha/sha_dgst.c
+++ b/src/lib/libcrypto/sha/sha_dgst.c
@@ -60,39 +60,44 @@
60#include <string.h> 60#include <string.h>
61#define SHA_0 61#define SHA_0
62#undef SHA_1 62#undef SHA_1
63#include "sha.h" 63#include <openssl/sha.h>
64#include "sha_locl.h" 64#include "sha_locl.h"
65#include <openssl/opensslv.h>
65 66
66char *SHA_version="SHA part of SSLeay 0.9.0b 29-Jun-1998"; 67#ifndef NO_SHA0
68char *SHA_version="SHA" OPENSSL_VERSION_PTEXT;
67 69
68/* Implemented from SHA-0 document - The Secure Hash Algorithm 70/* Implemented from SHA-0 document - The Secure Hash Algorithm
69 */ 71 */
70 72
71#define INIT_DATA_h0 (unsigned long)0x67452301L 73#define INIT_DATA_h0 0x67452301UL
72#define INIT_DATA_h1 (unsigned long)0xefcdab89L 74#define INIT_DATA_h1 0xefcdab89UL
73#define INIT_DATA_h2 (unsigned long)0x98badcfeL 75#define INIT_DATA_h2 0x98badcfeUL
74#define INIT_DATA_h3 (unsigned long)0x10325476L 76#define INIT_DATA_h3 0x10325476UL
75#define INIT_DATA_h4 (unsigned long)0xc3d2e1f0L 77#define INIT_DATA_h4 0xc3d2e1f0UL
76 78
77#define K_00_19 0x5a827999L 79#define K_00_19 0x5a827999UL
78#define K_20_39 0x6ed9eba1L 80#define K_20_39 0x6ed9eba1UL
79#define K_40_59 0x8f1bbcdcL 81#define K_40_59 0x8f1bbcdcUL
80#define K_60_79 0xca62c1d6L 82#define K_60_79 0xca62c1d6UL
81 83
82#ifndef NOPROTO 84static void sha_block(SHA_CTX *c, register SHA_LONG *p, int num);
83 void sha_block(SHA_CTX *c, register unsigned long *p, int num); 85
86#if !defined(B_ENDIAN) && defined(SHA_ASM)
87# define M_c2nl c2l
88# define M_p_c2nl p_c2l
89# define M_c2nl_p c2l_p
90# define M_p_c2nl_p p_c2l_p
91# define M_nl2c l2c
84#else 92#else
85 void sha_block(); 93# define M_c2nl c2nl
94# define M_p_c2nl p_c2nl
95# define M_c2nl_p c2nl_p
96# define M_p_c2nl_p p_c2nl_p
97# define M_nl2c nl2c
86#endif 98#endif
87 99
88#define M_c2nl c2nl 100void SHA_Init(SHA_CTX *c)
89#define M_p_c2nl p_c2nl
90#define M_c2nl_p c2nl_p
91#define M_p_c2nl_p p_c2nl_p
92#define M_nl2c nl2c
93
94void SHA_Init(c)
95SHA_CTX *c;
96 { 101 {
97 c->h0=INIT_DATA_h0; 102 c->h0=INIT_DATA_h0;
98 c->h1=INIT_DATA_h1; 103 c->h1=INIT_DATA_h1;
@@ -104,14 +109,12 @@ SHA_CTX *c;
104 c->num=0; 109 c->num=0;
105 } 110 }
106 111
107void SHA_Update(c, data, len) 112void SHA_Update(SHA_CTX *c, register const unsigned char *data,
108SHA_CTX *c; 113 unsigned long len)
109register unsigned char *data;
110unsigned long len;
111 { 114 {
112 register ULONG *p; 115 register SHA_LONG *p;
113 int ew,ec,sw,sc; 116 int ew,ec,sw,sc;
114 ULONG l; 117 SHA_LONG l;
115 118
116 if (len == 0) return; 119 if (len == 0) return;
117 120
@@ -139,7 +142,7 @@ unsigned long len;
139 } 142 }
140 len-=(SHA_CBLOCK-c->num); 143 len-=(SHA_CBLOCK-c->num);
141 144
142 sha_block(c,p,64); 145 sha_block(c,p,1);
143 c->num=0; 146 c->num=0;
144 /* drop through and do the rest */ 147 /* drop through and do the rest */
145 } 148 }
@@ -176,15 +179,15 @@ unsigned long len;
176 * copies it to a local array. I should be able to do this for 179 * copies it to a local array. I should be able to do this for
177 * the C version as well.... 180 * the C version as well....
178 */ 181 */
179#if 1 182#if SHA_LONG_LOG2==2
180#if defined(B_ENDIAN) || defined(SHA_ASM) 183#if defined(B_ENDIAN) || defined(SHA_ASM)
181 if ((((unsigned int)data)%sizeof(ULONG)) == 0) 184 if ((((unsigned long)data)%sizeof(SHA_LONG)) == 0)
182 { 185 {
183 sw=len/SHA_CBLOCK; 186 sw=len/SHA_CBLOCK;
184 if (sw) 187 if (sw)
185 { 188 {
189 sha_block(c,(SHA_LONG *)data,sw);
186 sw*=SHA_CBLOCK; 190 sw*=SHA_CBLOCK;
187 sha_block(c,(ULONG *)data,sw);
188 data+=sw; 191 data+=sw;
189 len-=sw; 192 len-=sw;
190 } 193 }
@@ -196,35 +199,61 @@ unsigned long len;
196 p=c->data; 199 p=c->data;
197 while (len >= SHA_CBLOCK) 200 while (len >= SHA_CBLOCK)
198 { 201 {
199#if defined(B_ENDIAN) || defined(L_ENDIAN) 202#if SHA_LONG_LOG2==2
200 if (p != (unsigned long *)data) 203#if defined(B_ENDIAN) || defined(SHA_ASM)
204#define SHA_NO_TAIL_CODE
205 /*
206 * Basically we get here only when data happens
207 * to be unaligned.
208 */
209 if (p != (SHA_LONG *)data)
201 memcpy(p,data,SHA_CBLOCK); 210 memcpy(p,data,SHA_CBLOCK);
202 data+=SHA_CBLOCK; 211 data+=SHA_CBLOCK;
203# ifdef L_ENDIAN 212 sha_block(c,p=c->data,1);
204# ifndef SHA_ASM /* Will not happen */ 213 len-=SHA_CBLOCK;
205 for (sw=(SHA_LBLOCK/4); sw; sw--) 214#elif defined(L_ENDIAN)
215#define BE_COPY(dst,src,i) { \
216 l = ((SHA_LONG *)src)[i]; \
217 Endian_Reverse32(l); \
218 dst[i] = l; \
219 }
220 if ((((unsigned long)data)%sizeof(SHA_LONG)) == 0)
206 { 221 {
207 Endian_Reverse32(p[0]); 222 for (sw=(SHA_LBLOCK/4); sw; sw--)
208 Endian_Reverse32(p[1]); 223 {
209 Endian_Reverse32(p[2]); 224 BE_COPY(p,data,0);
210 Endian_Reverse32(p[3]); 225 BE_COPY(p,data,1);
211 p+=4; 226 BE_COPY(p,data,2);
227 BE_COPY(p,data,3);
228 p+=4;
229 data += 4*sizeof(SHA_LONG);
230 }
231 sha_block(c,p=c->data,1);
232 len-=SHA_CBLOCK;
233 continue;
212 } 234 }
235#endif
236#endif
237#ifndef SHA_NO_TAIL_CODE
238 /*
239 * In addition to "sizeof(SHA_LONG)!= 4" case the
240 * following code covers unaligned access cases on
241 * little-endian machines.
242 * <appro@fy.chalmers.se>
243 */
213 p=c->data; 244 p=c->data;
214# endif 245 for (sw=(SHA_LBLOCK/4); sw; sw--)
215# endif
216#else
217 for (sw=(SHA_BLOCK/4); sw; sw--)
218 { 246 {
219 M_c2nl(data,l); *(p++)=l; 247 M_c2nl(data,l); p[0]=l;
220 M_c2nl(data,l); *(p++)=l; 248 M_c2nl(data,l); p[1]=l;
221 M_c2nl(data,l); *(p++)=l; 249 M_c2nl(data,l); p[2]=l;
222 M_c2nl(data,l); *(p++)=l; 250 M_c2nl(data,l); p[3]=l;
251 p+=4;
223 } 252 }
224 p=c->data; 253 p=c->data;
225#endif 254 sha_block(c,p,1);
226 sha_block(c,p,64);
227 len-=SHA_CBLOCK; 255 len-=SHA_CBLOCK;
256#endif
228 } 257 }
229 ec=(int)len; 258 ec=(int)len;
230 c->num=ec; 259 c->num=ec;
@@ -237,50 +266,61 @@ unsigned long len;
237 p[sw]=l; 266 p[sw]=l;
238 } 267 }
239 268
240void SHA_Transform(c,b) 269void SHA_Transform(SHA_CTX *c, unsigned char *b)
241SHA_CTX *c;
242unsigned char *b;
243 { 270 {
244 ULONG p[16]; 271 SHA_LONG p[SHA_LBLOCK];
245#if !defined(B_ENDIAN)
246 ULONG *q;
247 int i;
248#endif
249 272
250#if defined(B_ENDIAN) || defined(L_ENDIAN) 273#if SHA_LONG_LOG2==2
251 memcpy(p,b,64); 274#if defined(B_ENDIAN) || defined(SHA_ASM)
252#ifdef L_ENDIAN 275 memcpy(p,b,SHA_CBLOCK);
253 q=p; 276 sha_block(c,p,1);
254 for (i=(SHA_LBLOCK/4); i; i--) 277 return;
278#elif defined(L_ENDIAN)
279 if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
255 { 280 {
256 Endian_Reverse32(q[0]); 281 SHA_LONG *q;
257 Endian_Reverse32(q[1]); 282 int i;
258 Endian_Reverse32(q[2]); 283
259 Endian_Reverse32(q[3]); 284 q=p;
260 q+=4; 285 for (i=(SHA_LBLOCK/4); i; i--)
286 {
287 unsigned long l;
288 BE_COPY(q,b,0); /* BE_COPY was defined above */
289 BE_COPY(q,b,1);
290 BE_COPY(q,b,2);
291 BE_COPY(q,b,3);
292 q+=4;
293 b+=4*sizeof(SHA_LONG);
294 }
295 sha_block(c,p,1);
296 return;
261 } 297 }
262#endif 298#endif
263#else 299#endif
264 q=p; 300#ifndef SHA_NO_TAIL_CODE /* defined above, see comment */
265 for (i=(SHA_LBLOCK/4); i; i--)
266 { 301 {
267 ULONG l; 302 SHA_LONG *q;
268 c2nl(b,l); *(q++)=l; 303 int i;
269 c2nl(b,l); *(q++)=l; 304
270 c2nl(b,l); *(q++)=l; 305 q=p;
271 c2nl(b,l); *(q++)=l; 306 for (i=(SHA_LBLOCK/4); i; i--)
272 } 307 {
308 SHA_LONG l;
309 c2nl(b,l); *(q++)=l;
310 c2nl(b,l); *(q++)=l;
311 c2nl(b,l); *(q++)=l;
312 c2nl(b,l); *(q++)=l;
313 }
314 sha_block(c,p,1);
315 }
273#endif 316#endif
274 sha_block(c,p,64);
275 } 317 }
276 318
277void sha_block(c, W, num) 319#ifndef SHA_ASM
278SHA_CTX *c; 320static void sha_block(SHA_CTX *c, register SHA_LONG *W, int num)
279register unsigned long *W;
280int num;
281 { 321 {
282 register ULONG A,B,C,D,E,T; 322 register SHA_LONG A,B,C,D,E,T;
283 ULONG X[16]; 323 SHA_LONG X[SHA_LBLOCK];
284 324
285 A=c->h0; 325 A=c->h0;
286 B=c->h1; 326 B=c->h1;
@@ -380,8 +420,7 @@ int num;
380 c->h3=(c->h3+B)&0xffffffffL; 420 c->h3=(c->h3+B)&0xffffffffL;
381 c->h4=(c->h4+C)&0xffffffffL; 421 c->h4=(c->h4+C)&0xffffffffL;
382 422
383 num-=64; 423 if (--num <= 0) break;
384 if (num <= 0) break;
385 424
386 A=c->h0; 425 A=c->h0;
387 B=c->h1; 426 B=c->h1;
@@ -389,17 +428,21 @@ int num;
389 D=c->h3; 428 D=c->h3;
390 E=c->h4; 429 E=c->h4;
391 430
392 W+=16; 431 W+=SHA_LBLOCK; /* Note! This can happen only when sizeof(SHA_LONG)
432 * is 4. Whenever it's not the actual case this
433 * function is never called with num larger than 1
434 * and we never advance down here.
435 * <appro@fy.chalmers.se>
436 */
393 } 437 }
394 } 438 }
439#endif
395 440
396void SHA_Final(md, c) 441void SHA_Final(unsigned char *md, SHA_CTX *c)
397unsigned char *md;
398SHA_CTX *c;
399 { 442 {
400 register int i,j; 443 register int i,j;
401 register ULONG l; 444 register SHA_LONG l;
402 register ULONG *p; 445 register SHA_LONG *p;
403 static unsigned char end[4]={0x80,0x00,0x00,0x00}; 446 static unsigned char end[4]={0x80,0x00,0x00,0x00};
404 unsigned char *cp=end; 447 unsigned char *cp=end;
405 448
@@ -419,14 +462,20 @@ SHA_CTX *c;
419 { 462 {
420 for (; i<SHA_LBLOCK; i++) 463 for (; i<SHA_LBLOCK; i++)
421 p[i]=0; 464 p[i]=0;
422 sha_block(c,p,64); 465 sha_block(c,p,1);
423 i=0; 466 i=0;
424 } 467 }
425 for (; i<(SHA_LBLOCK-2); i++) 468 for (; i<(SHA_LBLOCK-2); i++)
426 p[i]=0; 469 p[i]=0;
427 p[SHA_LBLOCK-2]=c->Nh; 470 p[SHA_LBLOCK-2]=c->Nh;
428 p[SHA_LBLOCK-1]=c->Nl; 471 p[SHA_LBLOCK-1]=c->Nl;
429 sha_block(c,p,64); 472#if SHA_LONG_LOG2==2
473#if !defined(B_ENDIAN) && defined(SHA_ASM)
474 Endian_Reverse32(p[SHA_LBLOCK-2]);
475 Endian_Reverse32(p[SHA_LBLOCK-1]);
476#endif
477#endif
478 sha_block(c,p,1);
430 cp=md; 479 cp=md;
431 l=c->h0; nl2c(l,cp); 480 l=c->h0; nl2c(l,cp);
432 l=c->h1; nl2c(l,cp); 481 l=c->h1; nl2c(l,cp);
@@ -434,9 +483,10 @@ SHA_CTX *c;
434 l=c->h3; nl2c(l,cp); 483 l=c->h3; nl2c(l,cp);
435 l=c->h4; nl2c(l,cp); 484 l=c->h4; nl2c(l,cp);
436 485
437 /* clear stuff, sha_block may be leaving some stuff on the stack
438 * but I'm not worried :-) */
439 c->num=0; 486 c->num=0;
440/* memset((char *)&c,0,sizeof(c));*/ 487 /* sha_block may be leaving some stuff on the stack
488 * but I'm not worried :-)
489 memset((void *)c,0,sizeof(SHA_CTX));
490 */
441 } 491 }
442 492#endif
diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h
index 2814ad15fa..6646a8915b 100644
--- a/src/lib/libcrypto/sha/sha_locl.h
+++ b/src/lib/libcrypto/sha/sha_locl.h
@@ -59,6 +59,8 @@
59#include <stdlib.h> 59#include <stdlib.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#ifdef undef 64#ifdef undef
63/* one or the other needs to be defined */ 65/* one or the other needs to be defined */
64#ifndef SHA_1 /* FIPE 180-1 */ 66#ifndef SHA_1 /* FIPE 180-1 */
@@ -66,14 +68,6 @@
66#endif 68#endif
67#endif 69#endif
68 70
69#define ULONG unsigned long
70#define UCHAR unsigned char
71#define UINT unsigned int
72
73#ifdef NOCONST
74#define const
75#endif
76
77#undef c2nl 71#undef c2nl
78#define c2nl(c,l) (l =(((unsigned long)(*((c)++)))<<24), \ 72#define c2nl(c,l) (l =(((unsigned long)(*((c)++)))<<24), \
79 l|=(((unsigned long)(*((c)++)))<<16), \ 73 l|=(((unsigned long)(*((c)++)))<<16), \
@@ -166,30 +160,79 @@
166 *((c)++)=(unsigned char)(((l)>>16)&0xff), \ 160 *((c)++)=(unsigned char)(((l)>>16)&0xff), \
167 *((c)++)=(unsigned char)(((l)>>24)&0xff)) 161 *((c)++)=(unsigned char)(((l)>>24)&0xff))
168 162
163#ifndef SHA_LONG_LOG2
164#define SHA_LONG_LOG2 2 /* default to 32 bits */
165#endif
166
169#undef ROTATE 167#undef ROTATE
168#undef Endian_Reverse32
170#if defined(WIN32) 169#if defined(WIN32)
171#define ROTATE(a,n) _lrotl(a,n) 170#define ROTATE(a,n) _lrotl(a,n)
172#else 171#elif defined(__GNUC__) && !defined(PEDANTIC)
173#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) 172/* some inline assembler templates by <appro@fy.chalmers.se> */
173#if defined(__i386) && !defined(NO_ASM)
174#define ROTATE(a,n) ({ register unsigned int ret; \
175 asm ("roll %1,%0" \
176 : "=r"(ret) \
177 : "I"(n), "0"(a) \
178 : "cc"); \
179 ret; \
180 })
181#ifndef I386_ONLY
182#define Endian_Reverse32(a) \
183 { register unsigned int ltmp=(a); \
184 asm ("bswapl %0" \
185 : "=r"(ltmp) : "0"(ltmp)); \
186 (a)=ltmp; \
187 }
188#endif
189#elif defined(__powerpc)
190#define ROTATE(a,n) ({ register unsigned int ret; \
191 asm ("rlwinm %0,%1,%2,0,31" \
192 : "=r"(ret) \
193 : "r"(a), "I"(n)); \
194 ret; \
195 })
196/* Endian_Reverse32 is not needed for PowerPC */
197#endif
174#endif 198#endif
175 199
176/* A nice byte order reversal from Wei Dai <weidai@eskimo.com> */ 200/* A nice byte order reversal from Wei Dai <weidai@eskimo.com> */
177#if defined(WIN32) 201#ifdef ROTATE
202#ifndef Endian_Reverse32
178/* 5 instructions with rotate instruction, else 9 */ 203/* 5 instructions with rotate instruction, else 9 */
179#define Endian_Reverse32(a) \ 204#define Endian_Reverse32(a) \
180 { \ 205 { \
181 unsigned long l=(a); \ 206 unsigned long t=(a); \
182 (a)=((ROTATE(l,8)&0x00FF00FF)|(ROTATE(l,24)&0xFF00FF00)); \ 207 (a)=((ROTATE(t,8)&0x00FF00FF)|(ROTATE((t&0x00FF00FF),24))); \
183 } 208 }
209#endif
184#else 210#else
211#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
212#ifndef Endian_Reverse32
185/* 6 instructions with rotate instruction, else 8 */ 213/* 6 instructions with rotate instruction, else 8 */
186#define Endian_Reverse32(a) \ 214#define Endian_Reverse32(a) \
187 { \ 215 { \
188 unsigned long l=(a); \ 216 unsigned long t=(a); \
189 l=(((l&0xFF00FF00)>>8L)|((l&0x00FF00FF)<<8L)); \ 217 t=(((t>>8)&0x00FF00FF)|((t&0x00FF00FF)<<8)); \
190 (a)=ROTATE(l,16L); \ 218 (a)=ROTATE(t,16); \
191 } 219 }
192#endif 220#endif
221/*
222 * Originally the middle line started with l=(((l&0xFF00FF00)>>8)|...
223 * It's rewritten as above for two reasons:
224 * - RISCs aren't good at long constants and have to explicitely
225 * compose 'em with several (well, usually 2) instructions in a
226 * register before performing the actual operation and (as you
227 * already realized:-) having same constant should inspire the
228 * compiler to permanently allocate the only register for it;
229 * - most modern CPUs have two ALUs, but usually only one has
230 * circuitry for shifts:-( this minor tweak inspires compiler
231 * to schedule shift instructions in a better way...
232 *
233 * <appro@fy.chalmers.se>
234 */
235#endif
193 236
194/* As pointed out by Wei Dai <weidai@eskimo.com>, F() below can be 237/* As pointed out by Wei Dai <weidai@eskimo.com>, F() below can be
195 * simplified to the code in F_00_19. Wei attributes these optimisations 238 * simplified to the code in F_00_19. Wei attributes these optimisations
@@ -203,13 +246,12 @@
203#define F_40_59(b,c,d) (((b) & (c)) | (((b)|(c)) & (d))) 246#define F_40_59(b,c,d) (((b) & (c)) | (((b)|(c)) & (d)))
204#define F_60_79(b,c,d) F_20_39(b,c,d) 247#define F_60_79(b,c,d) F_20_39(b,c,d)
205 248
206#ifdef SHA_0
207#undef Xupdate 249#undef Xupdate
250#ifdef SHA_0
208#define Xupdate(a,i,ia,ib,ic,id) X[(i)&0x0f]=(a)=\ 251#define Xupdate(a,i,ia,ib,ic,id) X[(i)&0x0f]=(a)=\
209 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]); 252 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);
210#endif 253#endif
211#ifdef SHA_1 254#ifdef SHA_1
212#undef Xupdate
213#define Xupdate(a,i,ia,ib,ic,id) (a)=\ 255#define Xupdate(a,i,ia,ib,ic,id) (a)=\
214 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);\ 256 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);\
215 X[(i)&0x0f]=(a)=ROTATE((a),1); 257 X[(i)&0x0f]=(a)=ROTATE((a),1);
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c
index 18ab7f61bc..2d955de162 100644
--- a/src/lib/libcrypto/sha/sha_one.c
+++ b/src/lib/libcrypto/sha/sha_one.c
@@ -58,12 +58,10 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include "sha.h" 61#include <openssl/sha.h>
62 62
63unsigned char *SHA(d, n, md) 63#ifndef NO_SHA0
64unsigned char *d; 64unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md)
65unsigned long n;
66unsigned char *md;
67 { 65 {
68 SHA_CTX c; 66 SHA_CTX c;
69 static unsigned char m[SHA_DIGEST_LENGTH]; 67 static unsigned char m[SHA_DIGEST_LENGTH];
@@ -75,3 +73,4 @@ unsigned char *md;
75 memset(&c,0,sizeof(c)); 73 memset(&c,0,sizeof(c));
76 return(md); 74 return(md);
77 } 75 }
76#endif
diff --git a/src/lib/libcrypto/sha/sha_sgst.c b/src/lib/libcrypto/sha/sha_sgst.c
deleted file mode 100644
index 8a16801328..0000000000
--- a/src/lib/libcrypto/sha/sha_sgst.c
+++ /dev/null
@@ -1,246 +0,0 @@
1/* crypto/sha/sha_sgst.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdlib.h>
60#include <string.h>
61
62#ifdef undef
63/* one or the other needs to be defined */
64#ifndef SHA_1 /* FIPE 180-1 */
65#define SHA_0 /* FIPS 180 */
66#endif
67#endif
68
69#define ULONG unsigned long
70#define UCHAR unsigned char
71#define UINT unsigned int
72
73#ifdef NOCONST
74#define const
75#endif
76
77#undef c2nl
78#define c2nl(c,l) (l =(((unsigned long)(*((c)++)))<<24), \
79 l|=(((unsigned long)(*((c)++)))<<16), \
80 l|=(((unsigned long)(*((c)++)))<< 8), \
81 l|=(((unsigned long)(*((c)++))) ))
82
83#undef p_c2nl
84#define p_c2nl(c,l,n) { \
85 switch (n) { \
86 case 0: l =((unsigned long)(*((c)++)))<<24; \
87 case 1: l|=((unsigned long)(*((c)++)))<<16; \
88 case 2: l|=((unsigned long)(*((c)++)))<< 8; \
89 case 3: l|=((unsigned long)(*((c)++))); \
90 } \
91 }
92
93#undef c2nl_p
94/* NOTE the pointer is not incremented at the end of this */
95#define c2nl_p(c,l,n) { \
96 l=0; \
97 (c)+=n; \
98 switch (n) { \
99 case 3: l =((unsigned long)(*(--(c))))<< 8; \
100 case 2: l|=((unsigned long)(*(--(c))))<<16; \
101 case 1: l|=((unsigned long)(*(--(c))))<<24; \
102 } \
103 }
104
105#undef p_c2nl_p
106#define p_c2nl_p(c,l,sc,len) { \
107 switch (sc) \
108 { \
109 case 0: l =((unsigned long)(*((c)++)))<<24; \
110 if (--len == 0) break; \
111 case 1: l|=((unsigned long)(*((c)++)))<<16; \
112 if (--len == 0) break; \
113 case 2: l|=((unsigned long)(*((c)++)))<< 8; \
114 } \
115 }
116
117#undef nl2c
118#define nl2c(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \
119 *((c)++)=(unsigned char)(((l)>>16)&0xff), \
120 *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
121 *((c)++)=(unsigned char)(((l) )&0xff))
122
123#undef c2l
124#define c2l(c,l) (l =(((unsigned long)(*((c)++))) ), \
125 l|=(((unsigned long)(*((c)++)))<< 8), \
126 l|=(((unsigned long)(*((c)++)))<<16), \
127 l|=(((unsigned long)(*((c)++)))<<24))
128
129#undef p_c2l
130#define p_c2l(c,l,n) { \
131 switch (n) { \
132 case 0: l =((unsigned long)(*((c)++))); \
133 case 1: l|=((unsigned long)(*((c)++)))<< 8; \
134 case 2: l|=((unsigned long)(*((c)++)))<<16; \
135 case 3: l|=((unsigned long)(*((c)++)))<<24; \
136 } \
137 }
138
139#undef c2l_p
140/* NOTE the pointer is not incremented at the end of this */
141#define c2l_p(c,l,n) { \
142 l=0; \
143 (c)+=n; \
144 switch (n) { \
145 case 3: l =((unsigned long)(*(--(c))))<<16; \
146 case 2: l|=((unsigned long)(*(--(c))))<< 8; \
147 case 1: l|=((unsigned long)(*(--(c)))); \
148 } \
149 }
150
151#undef p_c2l_p
152#define p_c2l_p(c,l,sc,len) { \
153 switch (sc) \
154 { \
155 case 0: l =((unsigned long)(*((c)++))); \
156 if (--len == 0) break; \
157 case 1: l|=((unsigned long)(*((c)++)))<< 8; \
158 if (--len == 0) break; \
159 case 2: l|=((unsigned long)(*((c)++)))<<16; \
160 } \
161 }
162
163#undef l2c
164#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
165 *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
166 *((c)++)=(unsigned char)(((l)>>16)&0xff), \
167 *((c)++)=(unsigned char)(((l)>>24)&0xff))
168
169#undef ROTATE
170#if defined(WIN32)
171#define ROTATE(a,n) _lrotl(a,n)
172#else
173#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
174#endif
175
176/* A nice byte order reversal from Wei Dai <weidai@eskimo.com> */
177#if defined(WIN32)
178/* 5 instructions with rotate instruction, else 9 */
179#define Endian_Reverse32(a) \
180 { \
181 unsigned long l=(a); \
182 (a)=((ROTATE(l,8)&0x00FF00FF)|(ROTATE(l,24)&0xFF00FF00)); \
183 }
184#else
185/* 6 instructions with rotate instruction, else 8 */
186#define Endian_Reverse32(a) \
187 { \
188 unsigned long l=(a); \
189 l=(((l&0xFF00FF00)>>8L)|((l&0x00FF00FF)<<8L)); \
190 (a)=ROTATE(l,16L); \
191 }
192#endif
193
194/* As pointed out by Wei Dai <weidai@eskimo.com>, F() below can be
195 * simplified to the code in F_00_19. Wei attributes these optimisations
196 * to Peter Gutmann's SHS code, and he attributes it to Rich Schroeppel.
197 * #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z)))
198 * I've just become aware of another tweak to be made, again from Wei Dai,
199 * in F_40_59, (x&a)|(y&a) -> (x|y)&a
200 */
201#define F_00_19(b,c,d) ((((c) ^ (d)) & (b)) ^ (d))
202#define F_20_39(b,c,d) ((b) ^ (c) ^ (d))
203#define F_40_59(b,c,d) (((b) & (c)) | (((b)|(c)) & (d)))
204#define F_60_79(b,c,d) F_20_39(b,c,d)
205
206#ifdef SHA_0
207#undef Xupdate
208#define Xupdate(a,i,ia,ib,ic,id) X[(i)&0x0f]=(a)=\
209 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);
210#endif
211#ifdef SHA_1
212#undef Xupdate
213#define Xupdate(a,i,ia,ib,ic,id) (a)=\
214 (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);\
215 X[(i)&0x0f]=(a)=ROTATE((a),1);
216#endif
217
218#define BODY_00_15(i,a,b,c,d,e,f,xa) \
219 (f)=xa[i]+(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
220 (b)=ROTATE((b),30);
221
222#define BODY_16_19(i,a,b,c,d,e,f,xa,xb,xc,xd) \
223 Xupdate(f,i,xa,xb,xc,xd); \
224 (f)+=(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \
225 (b)=ROTATE((b),30);
226
227#define BODY_20_31(i,a,b,c,d,e,f,xa,xb,xc,xd) \
228 Xupdate(f,i,xa,xb,xc,xd); \
229 (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
230 (b)=ROTATE((b),30);
231
232#define BODY_32_39(i,a,b,c,d,e,f,xa) \
233 Xupdate(f,i,xa,xa,xa,xa); \
234 (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \
235 (b)=ROTATE((b),30);
236
237#define BODY_40_59(i,a,b,c,d,e,f,xa) \
238 Xupdate(f,i,xa,xa,xa,xa); \
239 (f)+=(e)+K_40_59+ROTATE((a),5)+F_40_59((b),(c),(d)); \
240 (b)=ROTATE((b),30);
241
242#define BODY_60_79(i,a,b,c,d,e,f,xa) \
243 Xupdate(f,i,xa,xa,xa,xa); \
244 (f)=X[(i)&0x0f]+(e)+K_60_79+ROTATE((a),5)+F_60_79((b),(c),(d)); \
245 (b)=ROTATE((b),30);
246
diff --git a/src/lib/libcrypto/sha/shatest.c b/src/lib/libcrypto/sha/shatest.c
index 03816e9b39..2b0744d937 100644
--- a/src/lib/libcrypto/sha/shatest.c
+++ b/src/lib/libcrypto/sha/shatest.c
@@ -59,7 +59,19 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <stdlib.h> 61#include <stdlib.h>
62#include "sha.h" 62
63#ifdef NO_SHA
64int main(int argc, char *argv[])
65{
66 printf("No SHA support\n");
67 return(0);
68}
69#else
70#include <openssl/sha.h>
71
72#ifdef CHARSET_EBCDIC
73#include <openssl/ebcdic.h>
74#endif
63 75
64#define SHA_0 /* FIPS 180 */ 76#define SHA_0 /* FIPS 180 */
65#undef SHA_1 /* FIPS 180-1 */ 77#undef SHA_1 /* FIPS 180-1 */
@@ -87,15 +99,8 @@ char *bigret=
87 "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; 99 "34aa973cd4c4daa4f61eeb2bdbad27316534016f";
88#endif 100#endif
89 101
90#ifndef NOPROTO
91static char *pt(unsigned char *md); 102static char *pt(unsigned char *md);
92#else 103int main(int argc, char *argv[])
93static char *pt();
94#endif
95
96int main(argc,argv)
97int argc;
98char *argv[];
99 { 104 {
100 int i,err=0; 105 int i,err=0;
101 unsigned char **P,**R; 106 unsigned char **P,**R;
@@ -104,6 +109,11 @@ char *argv[];
104 SHA_CTX c; 109 SHA_CTX c;
105 unsigned char md[SHA_DIGEST_LENGTH]; 110 unsigned char md[SHA_DIGEST_LENGTH];
106 111
112#ifdef CHARSET_EBCDIC
113 ebcdic2ascii(test[0], test[0], strlen(test[0]));
114 ebcdic2ascii(test[1], test[1], strlen(test[1]));
115#endif
116
107 P=(unsigned char **)test; 117 P=(unsigned char **)test;
108 R=(unsigned char **)ret; 118 R=(unsigned char **)ret;
109 i=1; 119 i=1;
@@ -124,6 +134,9 @@ char *argv[];
124 } 134 }
125 135
126 memset(buf,'a',1000); 136 memset(buf,'a',1000);
137#ifdef CHARSET_EBCDIC
138 ebcdic2ascii(buf, buf, 1000);
139#endif /*CHARSET_EBCDIC*/
127 SHA_Init(&c); 140 SHA_Init(&c);
128 for (i=0; i<1000; i++) 141 for (i=0; i<1000; i++)
129 SHA_Update(&c,buf,1000); 142 SHA_Update(&c,buf,1000);
@@ -143,8 +156,7 @@ char *argv[];
143 return(0); 156 return(0);
144 } 157 }
145 158
146static char *pt(md) 159static char *pt(unsigned char *md)
147unsigned char *md;
148 { 160 {
149 int i; 161 int i;
150 static char buf[80]; 162 static char buf[80];
@@ -153,3 +165,4 @@ unsigned char *md;
153 sprintf(&(buf[i*2]),"%02x",md[i]); 165 sprintf(&(buf[i*2]),"%02x",md[i]);
154 return(buf); 166 return(buf);
155 } 167 }
168#endif