Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: openssl/crypto/des/asm/des-586-mac.S

Issue 2072073002: Delete bundled copy of OpenSSL and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/openssl@master
Patch Set: Delete bundled copy of OpenSSL and replace with README. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « openssl/crypto/des/asm/des-586.pl ('k') | openssl/crypto/des/asm/des_enc.m4 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 .file "des-586.s"
2 .text
3 .globl _DES_SPtrans
4 .align 4
5 __x86_DES_encrypt:
6 pushl %ecx
7 # Round 0
8 movl (%ecx),%eax
9 xorl %ebx,%ebx
10 movl 4(%ecx),%edx
11 xorl %esi,%eax
12 xorl %ecx,%ecx
13 xorl %esi,%edx
14 andl $0xfcfcfcfc,%eax
15 andl $0xcfcfcfcf,%edx
16 movb %al,%bl
17 movb %ah,%cl
18 rorl $4,%edx
19 xorl (%ebp,%ebx,1),%edi
20 movb %dl,%bl
21 xorl 0x200(%ebp,%ecx,1),%edi
22 movb %dh,%cl
23 shrl $16,%eax
24 xorl 0x100(%ebp,%ebx,1),%edi
25 movb %ah,%bl
26 shrl $16,%edx
27 xorl 0x300(%ebp,%ecx,1),%edi
28 movb %dh,%cl
29 andl $0xff,%eax
30 andl $0xff,%edx
31 xorl 0x600(%ebp,%ebx,1),%edi
32 xorl 0x700(%ebp,%ecx,1),%edi
33 movl (%esp),%ecx
34 xorl 0x400(%ebp,%eax,1),%edi
35 xorl 0x500(%ebp,%edx,1),%edi
36 # Round 1
37 movl 8(%ecx),%eax
38 xorl %ebx,%ebx
39 movl 12(%ecx),%edx
40 xorl %edi,%eax
41 xorl %ecx,%ecx
42 xorl %edi,%edx
43 andl $0xfcfcfcfc,%eax
44 andl $0xcfcfcfcf,%edx
45 movb %al,%bl
46 movb %ah,%cl
47 rorl $4,%edx
48 xorl (%ebp,%ebx,1),%esi
49 movb %dl,%bl
50 xorl 0x200(%ebp,%ecx,1),%esi
51 movb %dh,%cl
52 shrl $16,%eax
53 xorl 0x100(%ebp,%ebx,1),%esi
54 movb %ah,%bl
55 shrl $16,%edx
56 xorl 0x300(%ebp,%ecx,1),%esi
57 movb %dh,%cl
58 andl $0xff,%eax
59 andl $0xff,%edx
60 xorl 0x600(%ebp,%ebx,1),%esi
61 xorl 0x700(%ebp,%ecx,1),%esi
62 movl (%esp),%ecx
63 xorl 0x400(%ebp,%eax,1),%esi
64 xorl 0x500(%ebp,%edx,1),%esi
65 # Round 2
66 movl 16(%ecx),%eax
67 xorl %ebx,%ebx
68 movl 20(%ecx),%edx
69 xorl %esi,%eax
70 xorl %ecx,%ecx
71 xorl %esi,%edx
72 andl $0xfcfcfcfc,%eax
73 andl $0xcfcfcfcf,%edx
74 movb %al,%bl
75 movb %ah,%cl
76 rorl $4,%edx
77 xorl (%ebp,%ebx,1),%edi
78 movb %dl,%bl
79 xorl 0x200(%ebp,%ecx,1),%edi
80 movb %dh,%cl
81 shrl $16,%eax
82 xorl 0x100(%ebp,%ebx,1),%edi
83 movb %ah,%bl
84 shrl $16,%edx
85 xorl 0x300(%ebp,%ecx,1),%edi
86 movb %dh,%cl
87 andl $0xff,%eax
88 andl $0xff,%edx
89 xorl 0x600(%ebp,%ebx,1),%edi
90 xorl 0x700(%ebp,%ecx,1),%edi
91 movl (%esp),%ecx
92 xorl 0x400(%ebp,%eax,1),%edi
93 xorl 0x500(%ebp,%edx,1),%edi
94 # Round 3
95 movl 24(%ecx),%eax
96 xorl %ebx,%ebx
97 movl 28(%ecx),%edx
98 xorl %edi,%eax
99 xorl %ecx,%ecx
100 xorl %edi,%edx
101 andl $0xfcfcfcfc,%eax
102 andl $0xcfcfcfcf,%edx
103 movb %al,%bl
104 movb %ah,%cl
105 rorl $4,%edx
106 xorl (%ebp,%ebx,1),%esi
107 movb %dl,%bl
108 xorl 0x200(%ebp,%ecx,1),%esi
109 movb %dh,%cl
110 shrl $16,%eax
111 xorl 0x100(%ebp,%ebx,1),%esi
112 movb %ah,%bl
113 shrl $16,%edx
114 xorl 0x300(%ebp,%ecx,1),%esi
115 movb %dh,%cl
116 andl $0xff,%eax
117 andl $0xff,%edx
118 xorl 0x600(%ebp,%ebx,1),%esi
119 xorl 0x700(%ebp,%ecx,1),%esi
120 movl (%esp),%ecx
121 xorl 0x400(%ebp,%eax,1),%esi
122 xorl 0x500(%ebp,%edx,1),%esi
123 # Round 4
124 movl 32(%ecx),%eax
125 xorl %ebx,%ebx
126 movl 36(%ecx),%edx
127 xorl %esi,%eax
128 xorl %ecx,%ecx
129 xorl %esi,%edx
130 andl $0xfcfcfcfc,%eax
131 andl $0xcfcfcfcf,%edx
132 movb %al,%bl
133 movb %ah,%cl
134 rorl $4,%edx
135 xorl (%ebp,%ebx,1),%edi
136 movb %dl,%bl
137 xorl 0x200(%ebp,%ecx,1),%edi
138 movb %dh,%cl
139 shrl $16,%eax
140 xorl 0x100(%ebp,%ebx,1),%edi
141 movb %ah,%bl
142 shrl $16,%edx
143 xorl 0x300(%ebp,%ecx,1),%edi
144 movb %dh,%cl
145 andl $0xff,%eax
146 andl $0xff,%edx
147 xorl 0x600(%ebp,%ebx,1),%edi
148 xorl 0x700(%ebp,%ecx,1),%edi
149 movl (%esp),%ecx
150 xorl 0x400(%ebp,%eax,1),%edi
151 xorl 0x500(%ebp,%edx,1),%edi
152 # Round 5
153 movl 40(%ecx),%eax
154 xorl %ebx,%ebx
155 movl 44(%ecx),%edx
156 xorl %edi,%eax
157 xorl %ecx,%ecx
158 xorl %edi,%edx
159 andl $0xfcfcfcfc,%eax
160 andl $0xcfcfcfcf,%edx
161 movb %al,%bl
162 movb %ah,%cl
163 rorl $4,%edx
164 xorl (%ebp,%ebx,1),%esi
165 movb %dl,%bl
166 xorl 0x200(%ebp,%ecx,1),%esi
167 movb %dh,%cl
168 shrl $16,%eax
169 xorl 0x100(%ebp,%ebx,1),%esi
170 movb %ah,%bl
171 shrl $16,%edx
172 xorl 0x300(%ebp,%ecx,1),%esi
173 movb %dh,%cl
174 andl $0xff,%eax
175 andl $0xff,%edx
176 xorl 0x600(%ebp,%ebx,1),%esi
177 xorl 0x700(%ebp,%ecx,1),%esi
178 movl (%esp),%ecx
179 xorl 0x400(%ebp,%eax,1),%esi
180 xorl 0x500(%ebp,%edx,1),%esi
181 # Round 6
182 movl 48(%ecx),%eax
183 xorl %ebx,%ebx
184 movl 52(%ecx),%edx
185 xorl %esi,%eax
186 xorl %ecx,%ecx
187 xorl %esi,%edx
188 andl $0xfcfcfcfc,%eax
189 andl $0xcfcfcfcf,%edx
190 movb %al,%bl
191 movb %ah,%cl
192 rorl $4,%edx
193 xorl (%ebp,%ebx,1),%edi
194 movb %dl,%bl
195 xorl 0x200(%ebp,%ecx,1),%edi
196 movb %dh,%cl
197 shrl $16,%eax
198 xorl 0x100(%ebp,%ebx,1),%edi
199 movb %ah,%bl
200 shrl $16,%edx
201 xorl 0x300(%ebp,%ecx,1),%edi
202 movb %dh,%cl
203 andl $0xff,%eax
204 andl $0xff,%edx
205 xorl 0x600(%ebp,%ebx,1),%edi
206 xorl 0x700(%ebp,%ecx,1),%edi
207 movl (%esp),%ecx
208 xorl 0x400(%ebp,%eax,1),%edi
209 xorl 0x500(%ebp,%edx,1),%edi
210 # Round 7
211 movl 56(%ecx),%eax
212 xorl %ebx,%ebx
213 movl 60(%ecx),%edx
214 xorl %edi,%eax
215 xorl %ecx,%ecx
216 xorl %edi,%edx
217 andl $0xfcfcfcfc,%eax
218 andl $0xcfcfcfcf,%edx
219 movb %al,%bl
220 movb %ah,%cl
221 rorl $4,%edx
222 xorl (%ebp,%ebx,1),%esi
223 movb %dl,%bl
224 xorl 0x200(%ebp,%ecx,1),%esi
225 movb %dh,%cl
226 shrl $16,%eax
227 xorl 0x100(%ebp,%ebx,1),%esi
228 movb %ah,%bl
229 shrl $16,%edx
230 xorl 0x300(%ebp,%ecx,1),%esi
231 movb %dh,%cl
232 andl $0xff,%eax
233 andl $0xff,%edx
234 xorl 0x600(%ebp,%ebx,1),%esi
235 xorl 0x700(%ebp,%ecx,1),%esi
236 movl (%esp),%ecx
237 xorl 0x400(%ebp,%eax,1),%esi
238 xorl 0x500(%ebp,%edx,1),%esi
239 # Round 8
240 movl 64(%ecx),%eax
241 xorl %ebx,%ebx
242 movl 68(%ecx),%edx
243 xorl %esi,%eax
244 xorl %ecx,%ecx
245 xorl %esi,%edx
246 andl $0xfcfcfcfc,%eax
247 andl $0xcfcfcfcf,%edx
248 movb %al,%bl
249 movb %ah,%cl
250 rorl $4,%edx
251 xorl (%ebp,%ebx,1),%edi
252 movb %dl,%bl
253 xorl 0x200(%ebp,%ecx,1),%edi
254 movb %dh,%cl
255 shrl $16,%eax
256 xorl 0x100(%ebp,%ebx,1),%edi
257 movb %ah,%bl
258 shrl $16,%edx
259 xorl 0x300(%ebp,%ecx,1),%edi
260 movb %dh,%cl
261 andl $0xff,%eax
262 andl $0xff,%edx
263 xorl 0x600(%ebp,%ebx,1),%edi
264 xorl 0x700(%ebp,%ecx,1),%edi
265 movl (%esp),%ecx
266 xorl 0x400(%ebp,%eax,1),%edi
267 xorl 0x500(%ebp,%edx,1),%edi
268 # Round 9
269 movl 72(%ecx),%eax
270 xorl %ebx,%ebx
271 movl 76(%ecx),%edx
272 xorl %edi,%eax
273 xorl %ecx,%ecx
274 xorl %edi,%edx
275 andl $0xfcfcfcfc,%eax
276 andl $0xcfcfcfcf,%edx
277 movb %al,%bl
278 movb %ah,%cl
279 rorl $4,%edx
280 xorl (%ebp,%ebx,1),%esi
281 movb %dl,%bl
282 xorl 0x200(%ebp,%ecx,1),%esi
283 movb %dh,%cl
284 shrl $16,%eax
285 xorl 0x100(%ebp,%ebx,1),%esi
286 movb %ah,%bl
287 shrl $16,%edx
288 xorl 0x300(%ebp,%ecx,1),%esi
289 movb %dh,%cl
290 andl $0xff,%eax
291 andl $0xff,%edx
292 xorl 0x600(%ebp,%ebx,1),%esi
293 xorl 0x700(%ebp,%ecx,1),%esi
294 movl (%esp),%ecx
295 xorl 0x400(%ebp,%eax,1),%esi
296 xorl 0x500(%ebp,%edx,1),%esi
297 # Round 10
298 movl 80(%ecx),%eax
299 xorl %ebx,%ebx
300 movl 84(%ecx),%edx
301 xorl %esi,%eax
302 xorl %ecx,%ecx
303 xorl %esi,%edx
304 andl $0xfcfcfcfc,%eax
305 andl $0xcfcfcfcf,%edx
306 movb %al,%bl
307 movb %ah,%cl
308 rorl $4,%edx
309 xorl (%ebp,%ebx,1),%edi
310 movb %dl,%bl
311 xorl 0x200(%ebp,%ecx,1),%edi
312 movb %dh,%cl
313 shrl $16,%eax
314 xorl 0x100(%ebp,%ebx,1),%edi
315 movb %ah,%bl
316 shrl $16,%edx
317 xorl 0x300(%ebp,%ecx,1),%edi
318 movb %dh,%cl
319 andl $0xff,%eax
320 andl $0xff,%edx
321 xorl 0x600(%ebp,%ebx,1),%edi
322 xorl 0x700(%ebp,%ecx,1),%edi
323 movl (%esp),%ecx
324 xorl 0x400(%ebp,%eax,1),%edi
325 xorl 0x500(%ebp,%edx,1),%edi
326 # Round 11
327 movl 88(%ecx),%eax
328 xorl %ebx,%ebx
329 movl 92(%ecx),%edx
330 xorl %edi,%eax
331 xorl %ecx,%ecx
332 xorl %edi,%edx
333 andl $0xfcfcfcfc,%eax
334 andl $0xcfcfcfcf,%edx
335 movb %al,%bl
336 movb %ah,%cl
337 rorl $4,%edx
338 xorl (%ebp,%ebx,1),%esi
339 movb %dl,%bl
340 xorl 0x200(%ebp,%ecx,1),%esi
341 movb %dh,%cl
342 shrl $16,%eax
343 xorl 0x100(%ebp,%ebx,1),%esi
344 movb %ah,%bl
345 shrl $16,%edx
346 xorl 0x300(%ebp,%ecx,1),%esi
347 movb %dh,%cl
348 andl $0xff,%eax
349 andl $0xff,%edx
350 xorl 0x600(%ebp,%ebx,1),%esi
351 xorl 0x700(%ebp,%ecx,1),%esi
352 movl (%esp),%ecx
353 xorl 0x400(%ebp,%eax,1),%esi
354 xorl 0x500(%ebp,%edx,1),%esi
355 # Round 12
356 movl 96(%ecx),%eax
357 xorl %ebx,%ebx
358 movl 100(%ecx),%edx
359 xorl %esi,%eax
360 xorl %ecx,%ecx
361 xorl %esi,%edx
362 andl $0xfcfcfcfc,%eax
363 andl $0xcfcfcfcf,%edx
364 movb %al,%bl
365 movb %ah,%cl
366 rorl $4,%edx
367 xorl (%ebp,%ebx,1),%edi
368 movb %dl,%bl
369 xorl 0x200(%ebp,%ecx,1),%edi
370 movb %dh,%cl
371 shrl $16,%eax
372 xorl 0x100(%ebp,%ebx,1),%edi
373 movb %ah,%bl
374 shrl $16,%edx
375 xorl 0x300(%ebp,%ecx,1),%edi
376 movb %dh,%cl
377 andl $0xff,%eax
378 andl $0xff,%edx
379 xorl 0x600(%ebp,%ebx,1),%edi
380 xorl 0x700(%ebp,%ecx,1),%edi
381 movl (%esp),%ecx
382 xorl 0x400(%ebp,%eax,1),%edi
383 xorl 0x500(%ebp,%edx,1),%edi
384 # Round 13
385 movl 104(%ecx),%eax
386 xorl %ebx,%ebx
387 movl 108(%ecx),%edx
388 xorl %edi,%eax
389 xorl %ecx,%ecx
390 xorl %edi,%edx
391 andl $0xfcfcfcfc,%eax
392 andl $0xcfcfcfcf,%edx
393 movb %al,%bl
394 movb %ah,%cl
395 rorl $4,%edx
396 xorl (%ebp,%ebx,1),%esi
397 movb %dl,%bl
398 xorl 0x200(%ebp,%ecx,1),%esi
399 movb %dh,%cl
400 shrl $16,%eax
401 xorl 0x100(%ebp,%ebx,1),%esi
402 movb %ah,%bl
403 shrl $16,%edx
404 xorl 0x300(%ebp,%ecx,1),%esi
405 movb %dh,%cl
406 andl $0xff,%eax
407 andl $0xff,%edx
408 xorl 0x600(%ebp,%ebx,1),%esi
409 xorl 0x700(%ebp,%ecx,1),%esi
410 movl (%esp),%ecx
411 xorl 0x400(%ebp,%eax,1),%esi
412 xorl 0x500(%ebp,%edx,1),%esi
413 # Round 14
414 movl 112(%ecx),%eax
415 xorl %ebx,%ebx
416 movl 116(%ecx),%edx
417 xorl %esi,%eax
418 xorl %ecx,%ecx
419 xorl %esi,%edx
420 andl $0xfcfcfcfc,%eax
421 andl $0xcfcfcfcf,%edx
422 movb %al,%bl
423 movb %ah,%cl
424 rorl $4,%edx
425 xorl (%ebp,%ebx,1),%edi
426 movb %dl,%bl
427 xorl 0x200(%ebp,%ecx,1),%edi
428 movb %dh,%cl
429 shrl $16,%eax
430 xorl 0x100(%ebp,%ebx,1),%edi
431 movb %ah,%bl
432 shrl $16,%edx
433 xorl 0x300(%ebp,%ecx,1),%edi
434 movb %dh,%cl
435 andl $0xff,%eax
436 andl $0xff,%edx
437 xorl 0x600(%ebp,%ebx,1),%edi
438 xorl 0x700(%ebp,%ecx,1),%edi
439 movl (%esp),%ecx
440 xorl 0x400(%ebp,%eax,1),%edi
441 xorl 0x500(%ebp,%edx,1),%edi
442 # Round 15
443 movl 120(%ecx),%eax
444 xorl %ebx,%ebx
445 movl 124(%ecx),%edx
446 xorl %edi,%eax
447 xorl %ecx,%ecx
448 xorl %edi,%edx
449 andl $0xfcfcfcfc,%eax
450 andl $0xcfcfcfcf,%edx
451 movb %al,%bl
452 movb %ah,%cl
453 rorl $4,%edx
454 xorl (%ebp,%ebx,1),%esi
455 movb %dl,%bl
456 xorl 0x200(%ebp,%ecx,1),%esi
457 movb %dh,%cl
458 shrl $16,%eax
459 xorl 0x100(%ebp,%ebx,1),%esi
460 movb %ah,%bl
461 shrl $16,%edx
462 xorl 0x300(%ebp,%ecx,1),%esi
463 movb %dh,%cl
464 andl $0xff,%eax
465 andl $0xff,%edx
466 xorl 0x600(%ebp,%ebx,1),%esi
467 xorl 0x700(%ebp,%ecx,1),%esi
468 movl (%esp),%ecx
469 xorl 0x400(%ebp,%eax,1),%esi
470 xorl 0x500(%ebp,%edx,1),%esi
471 addl $4,%esp
472 ret
473 .align 4
474 __x86_DES_decrypt:
475 pushl %ecx
476 # Round 15
477 movl 120(%ecx),%eax
478 xorl %ebx,%ebx
479 movl 124(%ecx),%edx
480 xorl %esi,%eax
481 xorl %ecx,%ecx
482 xorl %esi,%edx
483 andl $0xfcfcfcfc,%eax
484 andl $0xcfcfcfcf,%edx
485 movb %al,%bl
486 movb %ah,%cl
487 rorl $4,%edx
488 xorl (%ebp,%ebx,1),%edi
489 movb %dl,%bl
490 xorl 0x200(%ebp,%ecx,1),%edi
491 movb %dh,%cl
492 shrl $16,%eax
493 xorl 0x100(%ebp,%ebx,1),%edi
494 movb %ah,%bl
495 shrl $16,%edx
496 xorl 0x300(%ebp,%ecx,1),%edi
497 movb %dh,%cl
498 andl $0xff,%eax
499 andl $0xff,%edx
500 xorl 0x600(%ebp,%ebx,1),%edi
501 xorl 0x700(%ebp,%ecx,1),%edi
502 movl (%esp),%ecx
503 xorl 0x400(%ebp,%eax,1),%edi
504 xorl 0x500(%ebp,%edx,1),%edi
505 # Round 14
506 movl 112(%ecx),%eax
507 xorl %ebx,%ebx
508 movl 116(%ecx),%edx
509 xorl %edi,%eax
510 xorl %ecx,%ecx
511 xorl %edi,%edx
512 andl $0xfcfcfcfc,%eax
513 andl $0xcfcfcfcf,%edx
514 movb %al,%bl
515 movb %ah,%cl
516 rorl $4,%edx
517 xorl (%ebp,%ebx,1),%esi
518 movb %dl,%bl
519 xorl 0x200(%ebp,%ecx,1),%esi
520 movb %dh,%cl
521 shrl $16,%eax
522 xorl 0x100(%ebp,%ebx,1),%esi
523 movb %ah,%bl
524 shrl $16,%edx
525 xorl 0x300(%ebp,%ecx,1),%esi
526 movb %dh,%cl
527 andl $0xff,%eax
528 andl $0xff,%edx
529 xorl 0x600(%ebp,%ebx,1),%esi
530 xorl 0x700(%ebp,%ecx,1),%esi
531 movl (%esp),%ecx
532 xorl 0x400(%ebp,%eax,1),%esi
533 xorl 0x500(%ebp,%edx,1),%esi
534 # Round 13
535 movl 104(%ecx),%eax
536 xorl %ebx,%ebx
537 movl 108(%ecx),%edx
538 xorl %esi,%eax
539 xorl %ecx,%ecx
540 xorl %esi,%edx
541 andl $0xfcfcfcfc,%eax
542 andl $0xcfcfcfcf,%edx
543 movb %al,%bl
544 movb %ah,%cl
545 rorl $4,%edx
546 xorl (%ebp,%ebx,1),%edi
547 movb %dl,%bl
548 xorl 0x200(%ebp,%ecx,1),%edi
549 movb %dh,%cl
550 shrl $16,%eax
551 xorl 0x100(%ebp,%ebx,1),%edi
552 movb %ah,%bl
553 shrl $16,%edx
554 xorl 0x300(%ebp,%ecx,1),%edi
555 movb %dh,%cl
556 andl $0xff,%eax
557 andl $0xff,%edx
558 xorl 0x600(%ebp,%ebx,1),%edi
559 xorl 0x700(%ebp,%ecx,1),%edi
560 movl (%esp),%ecx
561 xorl 0x400(%ebp,%eax,1),%edi
562 xorl 0x500(%ebp,%edx,1),%edi
563 # Round 12
564 movl 96(%ecx),%eax
565 xorl %ebx,%ebx
566 movl 100(%ecx),%edx
567 xorl %edi,%eax
568 xorl %ecx,%ecx
569 xorl %edi,%edx
570 andl $0xfcfcfcfc,%eax
571 andl $0xcfcfcfcf,%edx
572 movb %al,%bl
573 movb %ah,%cl
574 rorl $4,%edx
575 xorl (%ebp,%ebx,1),%esi
576 movb %dl,%bl
577 xorl 0x200(%ebp,%ecx,1),%esi
578 movb %dh,%cl
579 shrl $16,%eax
580 xorl 0x100(%ebp,%ebx,1),%esi
581 movb %ah,%bl
582 shrl $16,%edx
583 xorl 0x300(%ebp,%ecx,1),%esi
584 movb %dh,%cl
585 andl $0xff,%eax
586 andl $0xff,%edx
587 xorl 0x600(%ebp,%ebx,1),%esi
588 xorl 0x700(%ebp,%ecx,1),%esi
589 movl (%esp),%ecx
590 xorl 0x400(%ebp,%eax,1),%esi
591 xorl 0x500(%ebp,%edx,1),%esi
592 # Round 11
593 movl 88(%ecx),%eax
594 xorl %ebx,%ebx
595 movl 92(%ecx),%edx
596 xorl %esi,%eax
597 xorl %ecx,%ecx
598 xorl %esi,%edx
599 andl $0xfcfcfcfc,%eax
600 andl $0xcfcfcfcf,%edx
601 movb %al,%bl
602 movb %ah,%cl
603 rorl $4,%edx
604 xorl (%ebp,%ebx,1),%edi
605 movb %dl,%bl
606 xorl 0x200(%ebp,%ecx,1),%edi
607 movb %dh,%cl
608 shrl $16,%eax
609 xorl 0x100(%ebp,%ebx,1),%edi
610 movb %ah,%bl
611 shrl $16,%edx
612 xorl 0x300(%ebp,%ecx,1),%edi
613 movb %dh,%cl
614 andl $0xff,%eax
615 andl $0xff,%edx
616 xorl 0x600(%ebp,%ebx,1),%edi
617 xorl 0x700(%ebp,%ecx,1),%edi
618 movl (%esp),%ecx
619 xorl 0x400(%ebp,%eax,1),%edi
620 xorl 0x500(%ebp,%edx,1),%edi
621 # Round 10
622 movl 80(%ecx),%eax
623 xorl %ebx,%ebx
624 movl 84(%ecx),%edx
625 xorl %edi,%eax
626 xorl %ecx,%ecx
627 xorl %edi,%edx
628 andl $0xfcfcfcfc,%eax
629 andl $0xcfcfcfcf,%edx
630 movb %al,%bl
631 movb %ah,%cl
632 rorl $4,%edx
633 xorl (%ebp,%ebx,1),%esi
634 movb %dl,%bl
635 xorl 0x200(%ebp,%ecx,1),%esi
636 movb %dh,%cl
637 shrl $16,%eax
638 xorl 0x100(%ebp,%ebx,1),%esi
639 movb %ah,%bl
640 shrl $16,%edx
641 xorl 0x300(%ebp,%ecx,1),%esi
642 movb %dh,%cl
643 andl $0xff,%eax
644 andl $0xff,%edx
645 xorl 0x600(%ebp,%ebx,1),%esi
646 xorl 0x700(%ebp,%ecx,1),%esi
647 movl (%esp),%ecx
648 xorl 0x400(%ebp,%eax,1),%esi
649 xorl 0x500(%ebp,%edx,1),%esi
650 # Round 9
651 movl 72(%ecx),%eax
652 xorl %ebx,%ebx
653 movl 76(%ecx),%edx
654 xorl %esi,%eax
655 xorl %ecx,%ecx
656 xorl %esi,%edx
657 andl $0xfcfcfcfc,%eax
658 andl $0xcfcfcfcf,%edx
659 movb %al,%bl
660 movb %ah,%cl
661 rorl $4,%edx
662 xorl (%ebp,%ebx,1),%edi
663 movb %dl,%bl
664 xorl 0x200(%ebp,%ecx,1),%edi
665 movb %dh,%cl
666 shrl $16,%eax
667 xorl 0x100(%ebp,%ebx,1),%edi
668 movb %ah,%bl
669 shrl $16,%edx
670 xorl 0x300(%ebp,%ecx,1),%edi
671 movb %dh,%cl
672 andl $0xff,%eax
673 andl $0xff,%edx
674 xorl 0x600(%ebp,%ebx,1),%edi
675 xorl 0x700(%ebp,%ecx,1),%edi
676 movl (%esp),%ecx
677 xorl 0x400(%ebp,%eax,1),%edi
678 xorl 0x500(%ebp,%edx,1),%edi
679 # Round 8
680 movl 64(%ecx),%eax
681 xorl %ebx,%ebx
682 movl 68(%ecx),%edx
683 xorl %edi,%eax
684 xorl %ecx,%ecx
685 xorl %edi,%edx
686 andl $0xfcfcfcfc,%eax
687 andl $0xcfcfcfcf,%edx
688 movb %al,%bl
689 movb %ah,%cl
690 rorl $4,%edx
691 xorl (%ebp,%ebx,1),%esi
692 movb %dl,%bl
693 xorl 0x200(%ebp,%ecx,1),%esi
694 movb %dh,%cl
695 shrl $16,%eax
696 xorl 0x100(%ebp,%ebx,1),%esi
697 movb %ah,%bl
698 shrl $16,%edx
699 xorl 0x300(%ebp,%ecx,1),%esi
700 movb %dh,%cl
701 andl $0xff,%eax
702 andl $0xff,%edx
703 xorl 0x600(%ebp,%ebx,1),%esi
704 xorl 0x700(%ebp,%ecx,1),%esi
705 movl (%esp),%ecx
706 xorl 0x400(%ebp,%eax,1),%esi
707 xorl 0x500(%ebp,%edx,1),%esi
708 # Round 7
709 movl 56(%ecx),%eax
710 xorl %ebx,%ebx
711 movl 60(%ecx),%edx
712 xorl %esi,%eax
713 xorl %ecx,%ecx
714 xorl %esi,%edx
715 andl $0xfcfcfcfc,%eax
716 andl $0xcfcfcfcf,%edx
717 movb %al,%bl
718 movb %ah,%cl
719 rorl $4,%edx
720 xorl (%ebp,%ebx,1),%edi
721 movb %dl,%bl
722 xorl 0x200(%ebp,%ecx,1),%edi
723 movb %dh,%cl
724 shrl $16,%eax
725 xorl 0x100(%ebp,%ebx,1),%edi
726 movb %ah,%bl
727 shrl $16,%edx
728 xorl 0x300(%ebp,%ecx,1),%edi
729 movb %dh,%cl
730 andl $0xff,%eax
731 andl $0xff,%edx
732 xorl 0x600(%ebp,%ebx,1),%edi
733 xorl 0x700(%ebp,%ecx,1),%edi
734 movl (%esp),%ecx
735 xorl 0x400(%ebp,%eax,1),%edi
736 xorl 0x500(%ebp,%edx,1),%edi
737 # Round 6
738 movl 48(%ecx),%eax
739 xorl %ebx,%ebx
740 movl 52(%ecx),%edx
741 xorl %edi,%eax
742 xorl %ecx,%ecx
743 xorl %edi,%edx
744 andl $0xfcfcfcfc,%eax
745 andl $0xcfcfcfcf,%edx
746 movb %al,%bl
747 movb %ah,%cl
748 rorl $4,%edx
749 xorl (%ebp,%ebx,1),%esi
750 movb %dl,%bl
751 xorl 0x200(%ebp,%ecx,1),%esi
752 movb %dh,%cl
753 shrl $16,%eax
754 xorl 0x100(%ebp,%ebx,1),%esi
755 movb %ah,%bl
756 shrl $16,%edx
757 xorl 0x300(%ebp,%ecx,1),%esi
758 movb %dh,%cl
759 andl $0xff,%eax
760 andl $0xff,%edx
761 xorl 0x600(%ebp,%ebx,1),%esi
762 xorl 0x700(%ebp,%ecx,1),%esi
763 movl (%esp),%ecx
764 xorl 0x400(%ebp,%eax,1),%esi
765 xorl 0x500(%ebp,%edx,1),%esi
766 # Round 5
767 movl 40(%ecx),%eax
768 xorl %ebx,%ebx
769 movl 44(%ecx),%edx
770 xorl %esi,%eax
771 xorl %ecx,%ecx
772 xorl %esi,%edx
773 andl $0xfcfcfcfc,%eax
774 andl $0xcfcfcfcf,%edx
775 movb %al,%bl
776 movb %ah,%cl
777 rorl $4,%edx
778 xorl (%ebp,%ebx,1),%edi
779 movb %dl,%bl
780 xorl 0x200(%ebp,%ecx,1),%edi
781 movb %dh,%cl
782 shrl $16,%eax
783 xorl 0x100(%ebp,%ebx,1),%edi
784 movb %ah,%bl
785 shrl $16,%edx
786 xorl 0x300(%ebp,%ecx,1),%edi
787 movb %dh,%cl
788 andl $0xff,%eax
789 andl $0xff,%edx
790 xorl 0x600(%ebp,%ebx,1),%edi
791 xorl 0x700(%ebp,%ecx,1),%edi
792 movl (%esp),%ecx
793 xorl 0x400(%ebp,%eax,1),%edi
794 xorl 0x500(%ebp,%edx,1),%edi
795 # Round 4
796 movl 32(%ecx),%eax
797 xorl %ebx,%ebx
798 movl 36(%ecx),%edx
799 xorl %edi,%eax
800 xorl %ecx,%ecx
801 xorl %edi,%edx
802 andl $0xfcfcfcfc,%eax
803 andl $0xcfcfcfcf,%edx
804 movb %al,%bl
805 movb %ah,%cl
806 rorl $4,%edx
807 xorl (%ebp,%ebx,1),%esi
808 movb %dl,%bl
809 xorl 0x200(%ebp,%ecx,1),%esi
810 movb %dh,%cl
811 shrl $16,%eax
812 xorl 0x100(%ebp,%ebx,1),%esi
813 movb %ah,%bl
814 shrl $16,%edx
815 xorl 0x300(%ebp,%ecx,1),%esi
816 movb %dh,%cl
817 andl $0xff,%eax
818 andl $0xff,%edx
819 xorl 0x600(%ebp,%ebx,1),%esi
820 xorl 0x700(%ebp,%ecx,1),%esi
821 movl (%esp),%ecx
822 xorl 0x400(%ebp,%eax,1),%esi
823 xorl 0x500(%ebp,%edx,1),%esi
824 # Round 3
825 movl 24(%ecx),%eax
826 xorl %ebx,%ebx
827 movl 28(%ecx),%edx
828 xorl %esi,%eax
829 xorl %ecx,%ecx
830 xorl %esi,%edx
831 andl $0xfcfcfcfc,%eax
832 andl $0xcfcfcfcf,%edx
833 movb %al,%bl
834 movb %ah,%cl
835 rorl $4,%edx
836 xorl (%ebp,%ebx,1),%edi
837 movb %dl,%bl
838 xorl 0x200(%ebp,%ecx,1),%edi
839 movb %dh,%cl
840 shrl $16,%eax
841 xorl 0x100(%ebp,%ebx,1),%edi
842 movb %ah,%bl
843 shrl $16,%edx
844 xorl 0x300(%ebp,%ecx,1),%edi
845 movb %dh,%cl
846 andl $0xff,%eax
847 andl $0xff,%edx
848 xorl 0x600(%ebp,%ebx,1),%edi
849 xorl 0x700(%ebp,%ecx,1),%edi
850 movl (%esp),%ecx
851 xorl 0x400(%ebp,%eax,1),%edi
852 xorl 0x500(%ebp,%edx,1),%edi
853 # Round 2
854 movl 16(%ecx),%eax
855 xorl %ebx,%ebx
856 movl 20(%ecx),%edx
857 xorl %edi,%eax
858 xorl %ecx,%ecx
859 xorl %edi,%edx
860 andl $0xfcfcfcfc,%eax
861 andl $0xcfcfcfcf,%edx
862 movb %al,%bl
863 movb %ah,%cl
864 rorl $4,%edx
865 xorl (%ebp,%ebx,1),%esi
866 movb %dl,%bl
867 xorl 0x200(%ebp,%ecx,1),%esi
868 movb %dh,%cl
869 shrl $16,%eax
870 xorl 0x100(%ebp,%ebx,1),%esi
871 movb %ah,%bl
872 shrl $16,%edx
873 xorl 0x300(%ebp,%ecx,1),%esi
874 movb %dh,%cl
875 andl $0xff,%eax
876 andl $0xff,%edx
877 xorl 0x600(%ebp,%ebx,1),%esi
878 xorl 0x700(%ebp,%ecx,1),%esi
879 movl (%esp),%ecx
880 xorl 0x400(%ebp,%eax,1),%esi
881 xorl 0x500(%ebp,%edx,1),%esi
882 # Round 1
883 movl 8(%ecx),%eax
884 xorl %ebx,%ebx
885 movl 12(%ecx),%edx
886 xorl %esi,%eax
887 xorl %ecx,%ecx
888 xorl %esi,%edx
889 andl $0xfcfcfcfc,%eax
890 andl $0xcfcfcfcf,%edx
891 movb %al,%bl
892 movb %ah,%cl
893 rorl $4,%edx
894 xorl (%ebp,%ebx,1),%edi
895 movb %dl,%bl
896 xorl 0x200(%ebp,%ecx,1),%edi
897 movb %dh,%cl
898 shrl $16,%eax
899 xorl 0x100(%ebp,%ebx,1),%edi
900 movb %ah,%bl
901 shrl $16,%edx
902 xorl 0x300(%ebp,%ecx,1),%edi
903 movb %dh,%cl
904 andl $0xff,%eax
905 andl $0xff,%edx
906 xorl 0x600(%ebp,%ebx,1),%edi
907 xorl 0x700(%ebp,%ecx,1),%edi
908 movl (%esp),%ecx
909 xorl 0x400(%ebp,%eax,1),%edi
910 xorl 0x500(%ebp,%edx,1),%edi
911 # Round 0
912 movl (%ecx),%eax
913 xorl %ebx,%ebx
914 movl 4(%ecx),%edx
915 xorl %edi,%eax
916 xorl %ecx,%ecx
917 xorl %edi,%edx
918 andl $0xfcfcfcfc,%eax
919 andl $0xcfcfcfcf,%edx
920 movb %al,%bl
921 movb %ah,%cl
922 rorl $4,%edx
923 xorl (%ebp,%ebx,1),%esi
924 movb %dl,%bl
925 xorl 0x200(%ebp,%ecx,1),%esi
926 movb %dh,%cl
927 shrl $16,%eax
928 xorl 0x100(%ebp,%ebx,1),%esi
929 movb %ah,%bl
930 shrl $16,%edx
931 xorl 0x300(%ebp,%ecx,1),%esi
932 movb %dh,%cl
933 andl $0xff,%eax
934 andl $0xff,%edx
935 xorl 0x600(%ebp,%ebx,1),%esi
936 xorl 0x700(%ebp,%ecx,1),%esi
937 movl (%esp),%ecx
938 xorl 0x400(%ebp,%eax,1),%esi
939 xorl 0x500(%ebp,%edx,1),%esi
940 addl $4,%esp
941 ret
942 .globl _DES_encrypt1
943 .align 4
944 _DES_encrypt1:
945 L_DES_encrypt1_begin:
946 pushl %esi
947 pushl %edi
948
949 # Load the 2 words
950 movl 12(%esp),%esi
951 xorl %ecx,%ecx
952 pushl %ebx
953 pushl %ebp
954 movl (%esi),%eax
955 movl 28(%esp),%ebx
956 movl 4(%esi),%edi
957
958 # IP
959 roll $4,%eax
960 movl %eax,%esi
961 xorl %edi,%eax
962 andl $0xf0f0f0f0,%eax
963 xorl %eax,%esi
964 xorl %eax,%edi
965
966 roll $20,%edi
967 movl %edi,%eax
968 xorl %esi,%edi
969 andl $0xfff0000f,%edi
970 xorl %edi,%eax
971 xorl %edi,%esi
972
973 roll $14,%eax
974 movl %eax,%edi
975 xorl %esi,%eax
976 andl $0x33333333,%eax
977 xorl %eax,%edi
978 xorl %eax,%esi
979
980 roll $22,%esi
981 movl %esi,%eax
982 xorl %edi,%esi
983 andl $0x03fc03fc,%esi
984 xorl %esi,%eax
985 xorl %esi,%edi
986
987 roll $9,%eax
988 movl %eax,%esi
989 xorl %edi,%eax
990 andl $0xaaaaaaaa,%eax
991 xorl %eax,%esi
992 xorl %eax,%edi
993
994 roll $1,%edi
995 call L000pic_point
996 L000pic_point:
997 popl %ebp
998 leal _DES_SPtrans-L000pic_point(%ebp),%ebp
999 movl 24(%esp),%ecx
1000 cmpl $0,%ebx
1001 je L001decrypt
1002 call __x86_DES_encrypt
1003 jmp L002done
1004 L001decrypt:
1005 call __x86_DES_decrypt
1006 L002done:
1007
1008 # FP
1009 movl 20(%esp),%edx
1010 rorl $1,%esi
1011 movl %edi,%eax
1012 xorl %esi,%edi
1013 andl $0xaaaaaaaa,%edi
1014 xorl %edi,%eax
1015 xorl %edi,%esi
1016
1017 roll $23,%eax
1018 movl %eax,%edi
1019 xorl %esi,%eax
1020 andl $0x03fc03fc,%eax
1021 xorl %eax,%edi
1022 xorl %eax,%esi
1023
1024 roll $10,%edi
1025 movl %edi,%eax
1026 xorl %esi,%edi
1027 andl $0x33333333,%edi
1028 xorl %edi,%eax
1029 xorl %edi,%esi
1030
1031 roll $18,%esi
1032 movl %esi,%edi
1033 xorl %eax,%esi
1034 andl $0xfff0000f,%esi
1035 xorl %esi,%edi
1036 xorl %esi,%eax
1037
1038 roll $12,%edi
1039 movl %edi,%esi
1040 xorl %eax,%edi
1041 andl $0xf0f0f0f0,%edi
1042 xorl %edi,%esi
1043 xorl %edi,%eax
1044
1045 rorl $4,%eax
1046 movl %eax,(%edx)
1047 movl %esi,4(%edx)
1048 popl %ebp
1049 popl %ebx
1050 popl %edi
1051 popl %esi
1052 ret
1053 .globl _DES_encrypt2
1054 .align 4
1055 _DES_encrypt2:
1056 L_DES_encrypt2_begin:
1057 pushl %esi
1058 pushl %edi
1059
1060 # Load the 2 words
1061 movl 12(%esp),%eax
1062 xorl %ecx,%ecx
1063 pushl %ebx
1064 pushl %ebp
1065 movl (%eax),%esi
1066 movl 28(%esp),%ebx
1067 roll $3,%esi
1068 movl 4(%eax),%edi
1069 roll $3,%edi
1070 call L003pic_point
1071 L003pic_point:
1072 popl %ebp
1073 leal _DES_SPtrans-L003pic_point(%ebp),%ebp
1074 movl 24(%esp),%ecx
1075 cmpl $0,%ebx
1076 je L004decrypt
1077 call __x86_DES_encrypt
1078 jmp L005done
1079 L004decrypt:
1080 call __x86_DES_decrypt
1081 L005done:
1082
1083 # Fixup
1084 rorl $3,%edi
1085 movl 20(%esp),%eax
1086 rorl $3,%esi
1087 movl %edi,(%eax)
1088 movl %esi,4(%eax)
1089 popl %ebp
1090 popl %ebx
1091 popl %edi
1092 popl %esi
1093 ret
1094 .globl _DES_encrypt3
1095 .align 4
1096 _DES_encrypt3:
1097 L_DES_encrypt3_begin:
1098 pushl %ebx
1099 movl 8(%esp),%ebx
1100 pushl %ebp
1101 pushl %esi
1102 pushl %edi
1103
1104 # Load the data words
1105 movl (%ebx),%edi
1106 movl 4(%ebx),%esi
1107 subl $12,%esp
1108
1109 # IP
1110 roll $4,%edi
1111 movl %edi,%edx
1112 xorl %esi,%edi
1113 andl $0xf0f0f0f0,%edi
1114 xorl %edi,%edx
1115 xorl %edi,%esi
1116
1117 roll $20,%esi
1118 movl %esi,%edi
1119 xorl %edx,%esi
1120 andl $0xfff0000f,%esi
1121 xorl %esi,%edi
1122 xorl %esi,%edx
1123
1124 roll $14,%edi
1125 movl %edi,%esi
1126 xorl %edx,%edi
1127 andl $0x33333333,%edi
1128 xorl %edi,%esi
1129 xorl %edi,%edx
1130
1131 roll $22,%edx
1132 movl %edx,%edi
1133 xorl %esi,%edx
1134 andl $0x03fc03fc,%edx
1135 xorl %edx,%edi
1136 xorl %edx,%esi
1137
1138 roll $9,%edi
1139 movl %edi,%edx
1140 xorl %esi,%edi
1141 andl $0xaaaaaaaa,%edi
1142 xorl %edi,%edx
1143 xorl %edi,%esi
1144
1145 rorl $3,%edx
1146 rorl $2,%esi
1147 movl %esi,4(%ebx)
1148 movl 36(%esp),%eax
1149 movl %edx,(%ebx)
1150 movl 40(%esp),%edi
1151 movl 44(%esp),%esi
1152 movl $1,8(%esp)
1153 movl %eax,4(%esp)
1154 movl %ebx,(%esp)
1155 call L_DES_encrypt2_begin
1156 movl $0,8(%esp)
1157 movl %edi,4(%esp)
1158 movl %ebx,(%esp)
1159 call L_DES_encrypt2_begin
1160 movl $1,8(%esp)
1161 movl %esi,4(%esp)
1162 movl %ebx,(%esp)
1163 call L_DES_encrypt2_begin
1164 addl $12,%esp
1165 movl (%ebx),%edi
1166 movl 4(%ebx),%esi
1167
1168 # FP
1169 roll $2,%esi
1170 roll $3,%edi
1171 movl %edi,%eax
1172 xorl %esi,%edi
1173 andl $0xaaaaaaaa,%edi
1174 xorl %edi,%eax
1175 xorl %edi,%esi
1176
1177 roll $23,%eax
1178 movl %eax,%edi
1179 xorl %esi,%eax
1180 andl $0x03fc03fc,%eax
1181 xorl %eax,%edi
1182 xorl %eax,%esi
1183
1184 roll $10,%edi
1185 movl %edi,%eax
1186 xorl %esi,%edi
1187 andl $0x33333333,%edi
1188 xorl %edi,%eax
1189 xorl %edi,%esi
1190
1191 roll $18,%esi
1192 movl %esi,%edi
1193 xorl %eax,%esi
1194 andl $0xfff0000f,%esi
1195 xorl %esi,%edi
1196 xorl %esi,%eax
1197
1198 roll $12,%edi
1199 movl %edi,%esi
1200 xorl %eax,%edi
1201 andl $0xf0f0f0f0,%edi
1202 xorl %edi,%esi
1203 xorl %edi,%eax
1204
1205 rorl $4,%eax
1206 movl %eax,(%ebx)
1207 movl %esi,4(%ebx)
1208 popl %edi
1209 popl %esi
1210 popl %ebp
1211 popl %ebx
1212 ret
1213 .globl _DES_decrypt3
1214 .align 4
1215 _DES_decrypt3:
1216 L_DES_decrypt3_begin:
1217 pushl %ebx
1218 movl 8(%esp),%ebx
1219 pushl %ebp
1220 pushl %esi
1221 pushl %edi
1222
1223 # Load the data words
1224 movl (%ebx),%edi
1225 movl 4(%ebx),%esi
1226 subl $12,%esp
1227
1228 # IP
1229 roll $4,%edi
1230 movl %edi,%edx
1231 xorl %esi,%edi
1232 andl $0xf0f0f0f0,%edi
1233 xorl %edi,%edx
1234 xorl %edi,%esi
1235
1236 roll $20,%esi
1237 movl %esi,%edi
1238 xorl %edx,%esi
1239 andl $0xfff0000f,%esi
1240 xorl %esi,%edi
1241 xorl %esi,%edx
1242
1243 roll $14,%edi
1244 movl %edi,%esi
1245 xorl %edx,%edi
1246 andl $0x33333333,%edi
1247 xorl %edi,%esi
1248 xorl %edi,%edx
1249
1250 roll $22,%edx
1251 movl %edx,%edi
1252 xorl %esi,%edx
1253 andl $0x03fc03fc,%edx
1254 xorl %edx,%edi
1255 xorl %edx,%esi
1256
1257 roll $9,%edi
1258 movl %edi,%edx
1259 xorl %esi,%edi
1260 andl $0xaaaaaaaa,%edi
1261 xorl %edi,%edx
1262 xorl %edi,%esi
1263
1264 rorl $3,%edx
1265 rorl $2,%esi
1266 movl %esi,4(%ebx)
1267 movl 36(%esp),%esi
1268 movl %edx,(%ebx)
1269 movl 40(%esp),%edi
1270 movl 44(%esp),%eax
1271 movl $0,8(%esp)
1272 movl %eax,4(%esp)
1273 movl %ebx,(%esp)
1274 call L_DES_encrypt2_begin
1275 movl $1,8(%esp)
1276 movl %edi,4(%esp)
1277 movl %ebx,(%esp)
1278 call L_DES_encrypt2_begin
1279 movl $0,8(%esp)
1280 movl %esi,4(%esp)
1281 movl %ebx,(%esp)
1282 call L_DES_encrypt2_begin
1283 addl $12,%esp
1284 movl (%ebx),%edi
1285 movl 4(%ebx),%esi
1286
1287 # FP
1288 roll $2,%esi
1289 roll $3,%edi
1290 movl %edi,%eax
1291 xorl %esi,%edi
1292 andl $0xaaaaaaaa,%edi
1293 xorl %edi,%eax
1294 xorl %edi,%esi
1295
1296 roll $23,%eax
1297 movl %eax,%edi
1298 xorl %esi,%eax
1299 andl $0x03fc03fc,%eax
1300 xorl %eax,%edi
1301 xorl %eax,%esi
1302
1303 roll $10,%edi
1304 movl %edi,%eax
1305 xorl %esi,%edi
1306 andl $0x33333333,%edi
1307 xorl %edi,%eax
1308 xorl %edi,%esi
1309
1310 roll $18,%esi
1311 movl %esi,%edi
1312 xorl %eax,%esi
1313 andl $0xfff0000f,%esi
1314 xorl %esi,%edi
1315 xorl %esi,%eax
1316
1317 roll $12,%edi
1318 movl %edi,%esi
1319 xorl %eax,%edi
1320 andl $0xf0f0f0f0,%edi
1321 xorl %edi,%esi
1322 xorl %edi,%eax
1323
1324 rorl $4,%eax
1325 movl %eax,(%ebx)
1326 movl %esi,4(%ebx)
1327 popl %edi
1328 popl %esi
1329 popl %ebp
1330 popl %ebx
1331 ret
1332 .globl _DES_ncbc_encrypt
1333 .align 4
1334 _DES_ncbc_encrypt:
1335 L_DES_ncbc_encrypt_begin:
1336
1337 pushl %ebp
1338 pushl %ebx
1339 pushl %esi
1340 pushl %edi
1341 movl 28(%esp),%ebp
1342 # getting iv ptr from parameter 4
1343 movl 36(%esp),%ebx
1344 movl (%ebx),%esi
1345 movl 4(%ebx),%edi
1346 pushl %edi
1347 pushl %esi
1348 pushl %edi
1349 pushl %esi
1350 movl %esp,%ebx
1351 movl 36(%esp),%esi
1352 movl 40(%esp),%edi
1353 # getting encrypt flag from parameter 5
1354 movl 56(%esp),%ecx
1355 # get and push parameter 5
1356 pushl %ecx
1357 # get and push parameter 3
1358 movl 52(%esp),%eax
1359 pushl %eax
1360 pushl %ebx
1361 cmpl $0,%ecx
1362 jz L006decrypt
1363 andl $4294967288,%ebp
1364 movl 12(%esp),%eax
1365 movl 16(%esp),%ebx
1366 jz L007encrypt_finish
1367 L008encrypt_loop:
1368 movl (%esi),%ecx
1369 movl 4(%esi),%edx
1370 xorl %ecx,%eax
1371 xorl %edx,%ebx
1372 movl %eax,12(%esp)
1373 movl %ebx,16(%esp)
1374 call L_DES_encrypt1_begin
1375 movl 12(%esp),%eax
1376 movl 16(%esp),%ebx
1377 movl %eax,(%edi)
1378 movl %ebx,4(%edi)
1379 addl $8,%esi
1380 addl $8,%edi
1381 subl $8,%ebp
1382 jnz L008encrypt_loop
1383 L007encrypt_finish:
1384 movl 56(%esp),%ebp
1385 andl $7,%ebp
1386 jz L009finish
1387 call L010PIC_point
1388 L010PIC_point:
1389 popl %edx
1390 leal L011cbc_enc_jmp_table-L010PIC_point(%edx),%ecx
1391 movl (%ecx,%ebp,4),%ebp
1392 addl %edx,%ebp
1393 xorl %ecx,%ecx
1394 xorl %edx,%edx
1395 jmp *%ebp
1396 L012ej7:
1397 movb 6(%esi),%dh
1398 shll $8,%edx
1399 L013ej6:
1400 movb 5(%esi),%dh
1401 L014ej5:
1402 movb 4(%esi),%dl
1403 L015ej4:
1404 movl (%esi),%ecx
1405 jmp L016ejend
1406 L017ej3:
1407 movb 2(%esi),%ch
1408 shll $8,%ecx
1409 L018ej2:
1410 movb 1(%esi),%ch
1411 L019ej1:
1412 movb (%esi),%cl
1413 L016ejend:
1414 xorl %ecx,%eax
1415 xorl %edx,%ebx
1416 movl %eax,12(%esp)
1417 movl %ebx,16(%esp)
1418 call L_DES_encrypt1_begin
1419 movl 12(%esp),%eax
1420 movl 16(%esp),%ebx
1421 movl %eax,(%edi)
1422 movl %ebx,4(%edi)
1423 jmp L009finish
1424 L006decrypt:
1425 andl $4294967288,%ebp
1426 movl 20(%esp),%eax
1427 movl 24(%esp),%ebx
1428 jz L020decrypt_finish
1429 L021decrypt_loop:
1430 movl (%esi),%eax
1431 movl 4(%esi),%ebx
1432 movl %eax,12(%esp)
1433 movl %ebx,16(%esp)
1434 call L_DES_encrypt1_begin
1435 movl 12(%esp),%eax
1436 movl 16(%esp),%ebx
1437 movl 20(%esp),%ecx
1438 movl 24(%esp),%edx
1439 xorl %eax,%ecx
1440 xorl %ebx,%edx
1441 movl (%esi),%eax
1442 movl 4(%esi),%ebx
1443 movl %ecx,(%edi)
1444 movl %edx,4(%edi)
1445 movl %eax,20(%esp)
1446 movl %ebx,24(%esp)
1447 addl $8,%esi
1448 addl $8,%edi
1449 subl $8,%ebp
1450 jnz L021decrypt_loop
1451 L020decrypt_finish:
1452 movl 56(%esp),%ebp
1453 andl $7,%ebp
1454 jz L009finish
1455 movl (%esi),%eax
1456 movl 4(%esi),%ebx
1457 movl %eax,12(%esp)
1458 movl %ebx,16(%esp)
1459 call L_DES_encrypt1_begin
1460 movl 12(%esp),%eax
1461 movl 16(%esp),%ebx
1462 movl 20(%esp),%ecx
1463 movl 24(%esp),%edx
1464 xorl %eax,%ecx
1465 xorl %ebx,%edx
1466 movl (%esi),%eax
1467 movl 4(%esi),%ebx
1468 L022dj7:
1469 rorl $16,%edx
1470 movb %dl,6(%edi)
1471 shrl $16,%edx
1472 L023dj6:
1473 movb %dh,5(%edi)
1474 L024dj5:
1475 movb %dl,4(%edi)
1476 L025dj4:
1477 movl %ecx,(%edi)
1478 jmp L026djend
1479 L027dj3:
1480 rorl $16,%ecx
1481 movb %cl,2(%edi)
1482 shll $16,%ecx
1483 L028dj2:
1484 movb %ch,1(%esi)
1485 L029dj1:
1486 movb %cl,(%esi)
1487 L026djend:
1488 jmp L009finish
1489 L009finish:
1490 movl 64(%esp),%ecx
1491 addl $28,%esp
1492 movl %eax,(%ecx)
1493 movl %ebx,4(%ecx)
1494 popl %edi
1495 popl %esi
1496 popl %ebx
1497 popl %ebp
1498 ret
1499 .align 6,0x90
1500 L011cbc_enc_jmp_table:
1501 .long 0
1502 .long L019ej1-L010PIC_point
1503 .long L018ej2-L010PIC_point
1504 .long L017ej3-L010PIC_point
1505 .long L015ej4-L010PIC_point
1506 .long L014ej5-L010PIC_point
1507 .long L013ej6-L010PIC_point
1508 .long L012ej7-L010PIC_point
1509 .align 6,0x90
1510 .globl _DES_ede3_cbc_encrypt
1511 .align 4
1512 _DES_ede3_cbc_encrypt:
1513 L_DES_ede3_cbc_encrypt_begin:
1514
1515 pushl %ebp
1516 pushl %ebx
1517 pushl %esi
1518 pushl %edi
1519 movl 28(%esp),%ebp
1520 # getting iv ptr from parameter 6
1521 movl 44(%esp),%ebx
1522 movl (%ebx),%esi
1523 movl 4(%ebx),%edi
1524 pushl %edi
1525 pushl %esi
1526 pushl %edi
1527 pushl %esi
1528 movl %esp,%ebx
1529 movl 36(%esp),%esi
1530 movl 40(%esp),%edi
1531 # getting encrypt flag from parameter 7
1532 movl 64(%esp),%ecx
1533 # get and push parameter 5
1534 movl 56(%esp),%eax
1535 pushl %eax
1536 # get and push parameter 4
1537 movl 56(%esp),%eax
1538 pushl %eax
1539 # get and push parameter 3
1540 movl 56(%esp),%eax
1541 pushl %eax
1542 pushl %ebx
1543 cmpl $0,%ecx
1544 jz L030decrypt
1545 andl $4294967288,%ebp
1546 movl 16(%esp),%eax
1547 movl 20(%esp),%ebx
1548 jz L031encrypt_finish
1549 L032encrypt_loop:
1550 movl (%esi),%ecx
1551 movl 4(%esi),%edx
1552 xorl %ecx,%eax
1553 xorl %edx,%ebx
1554 movl %eax,16(%esp)
1555 movl %ebx,20(%esp)
1556 call L_DES_encrypt3_begin
1557 movl 16(%esp),%eax
1558 movl 20(%esp),%ebx
1559 movl %eax,(%edi)
1560 movl %ebx,4(%edi)
1561 addl $8,%esi
1562 addl $8,%edi
1563 subl $8,%ebp
1564 jnz L032encrypt_loop
1565 L031encrypt_finish:
1566 movl 60(%esp),%ebp
1567 andl $7,%ebp
1568 jz L033finish
1569 call L034PIC_point
1570 L034PIC_point:
1571 popl %edx
1572 leal L035cbc_enc_jmp_table-L034PIC_point(%edx),%ecx
1573 movl (%ecx,%ebp,4),%ebp
1574 addl %edx,%ebp
1575 xorl %ecx,%ecx
1576 xorl %edx,%edx
1577 jmp *%ebp
1578 L036ej7:
1579 movb 6(%esi),%dh
1580 shll $8,%edx
1581 L037ej6:
1582 movb 5(%esi),%dh
1583 L038ej5:
1584 movb 4(%esi),%dl
1585 L039ej4:
1586 movl (%esi),%ecx
1587 jmp L040ejend
1588 L041ej3:
1589 movb 2(%esi),%ch
1590 shll $8,%ecx
1591 L042ej2:
1592 movb 1(%esi),%ch
1593 L043ej1:
1594 movb (%esi),%cl
1595 L040ejend:
1596 xorl %ecx,%eax
1597 xorl %edx,%ebx
1598 movl %eax,16(%esp)
1599 movl %ebx,20(%esp)
1600 call L_DES_encrypt3_begin
1601 movl 16(%esp),%eax
1602 movl 20(%esp),%ebx
1603 movl %eax,(%edi)
1604 movl %ebx,4(%edi)
1605 jmp L033finish
1606 L030decrypt:
1607 andl $4294967288,%ebp
1608 movl 24(%esp),%eax
1609 movl 28(%esp),%ebx
1610 jz L044decrypt_finish
1611 L045decrypt_loop:
1612 movl (%esi),%eax
1613 movl 4(%esi),%ebx
1614 movl %eax,16(%esp)
1615 movl %ebx,20(%esp)
1616 call L_DES_decrypt3_begin
1617 movl 16(%esp),%eax
1618 movl 20(%esp),%ebx
1619 movl 24(%esp),%ecx
1620 movl 28(%esp),%edx
1621 xorl %eax,%ecx
1622 xorl %ebx,%edx
1623 movl (%esi),%eax
1624 movl 4(%esi),%ebx
1625 movl %ecx,(%edi)
1626 movl %edx,4(%edi)
1627 movl %eax,24(%esp)
1628 movl %ebx,28(%esp)
1629 addl $8,%esi
1630 addl $8,%edi
1631 subl $8,%ebp
1632 jnz L045decrypt_loop
1633 L044decrypt_finish:
1634 movl 60(%esp),%ebp
1635 andl $7,%ebp
1636 jz L033finish
1637 movl (%esi),%eax
1638 movl 4(%esi),%ebx
1639 movl %eax,16(%esp)
1640 movl %ebx,20(%esp)
1641 call L_DES_decrypt3_begin
1642 movl 16(%esp),%eax
1643 movl 20(%esp),%ebx
1644 movl 24(%esp),%ecx
1645 movl 28(%esp),%edx
1646 xorl %eax,%ecx
1647 xorl %ebx,%edx
1648 movl (%esi),%eax
1649 movl 4(%esi),%ebx
1650 L046dj7:
1651 rorl $16,%edx
1652 movb %dl,6(%edi)
1653 shrl $16,%edx
1654 L047dj6:
1655 movb %dh,5(%edi)
1656 L048dj5:
1657 movb %dl,4(%edi)
1658 L049dj4:
1659 movl %ecx,(%edi)
1660 jmp L050djend
1661 L051dj3:
1662 rorl $16,%ecx
1663 movb %cl,2(%edi)
1664 shll $16,%ecx
1665 L052dj2:
1666 movb %ch,1(%esi)
1667 L053dj1:
1668 movb %cl,(%esi)
1669 L050djend:
1670 jmp L033finish
1671 L033finish:
1672 movl 76(%esp),%ecx
1673 addl $32,%esp
1674 movl %eax,(%ecx)
1675 movl %ebx,4(%ecx)
1676 popl %edi
1677 popl %esi
1678 popl %ebx
1679 popl %ebp
1680 ret
1681 .align 6,0x90
1682 L035cbc_enc_jmp_table:
1683 .long 0
1684 .long L043ej1-L034PIC_point
1685 .long L042ej2-L034PIC_point
1686 .long L041ej3-L034PIC_point
1687 .long L039ej4-L034PIC_point
1688 .long L038ej5-L034PIC_point
1689 .long L037ej6-L034PIC_point
1690 .long L036ej7-L034PIC_point
1691 .align 6,0x90
1692 .align 6,0x90
1693 _DES_SPtrans:
1694 .long 34080768,524288,33554434,34080770
1695 .long 33554432,526338,524290,33554434
1696 .long 526338,34080768,34078720,2050
1697 .long 33556482,33554432,0,524290
1698 .long 524288,2,33556480,526336
1699 .long 34080770,34078720,2050,33556480
1700 .long 2,2048,526336,34078722
1701 .long 2048,33556482,34078722,0
1702 .long 0,34080770,33556480,524290
1703 .long 34080768,524288,2050,33556480
1704 .long 34078722,2048,526336,33554434
1705 .long 526338,2,33554434,34078720
1706 .long 34080770,526336,34078720,33556482
1707 .long 33554432,2050,524290,0
1708 .long 524288,33554432,33556482,34080768
1709 .long 2,34078722,2048,526338
1710 .long 1074823184,0,1081344,1074790400
1711 .long 1073741840,32784,1073774592,1081344
1712 .long 32768,1074790416,16,1073774592
1713 .long 1048592,1074823168,1074790400,16
1714 .long 1048576,1073774608,1074790416,32768
1715 .long 1081360,1073741824,0,1048592
1716 .long 1073774608,1081360,1074823168,1073741840
1717 .long 1073741824,1048576,32784,1074823184
1718 .long 1048592,1074823168,1073774592,1081360
1719 .long 1074823184,1048592,1073741840,0
1720 .long 1073741824,32784,1048576,1074790416
1721 .long 32768,1073741824,1081360,1073774608
1722 .long 1074823168,32768,0,1073741840
1723 .long 16,1074823184,1081344,1074790400
1724 .long 1074790416,1048576,32784,1073774592
1725 .long 1073774608,16,1074790400,1081344
1726 .long 67108865,67371264,256,67109121
1727 .long 262145,67108864,67109121,262400
1728 .long 67109120,262144,67371008,1
1729 .long 67371265,257,1,67371009
1730 .long 0,262145,67371264,256
1731 .long 257,67371265,262144,67108865
1732 .long 67371009,67109120,262401,67371008
1733 .long 262400,0,67108864,262401
1734 .long 67371264,256,1,262144
1735 .long 257,262145,67371008,67109121
1736 .long 0,67371264,262400,67371009
1737 .long 262145,67108864,67371265,1
1738 .long 262401,67108865,67108864,67371265
1739 .long 262144,67109120,67109121,262400
1740 .long 67109120,0,67371009,257
1741 .long 67108865,262401,256,67371008
1742 .long 4198408,268439552,8,272633864
1743 .long 0,272629760,268439560,4194312
1744 .long 272633856,268435464,268435456,4104
1745 .long 268435464,4198408,4194304,268435456
1746 .long 272629768,4198400,4096,8
1747 .long 4198400,268439560,272629760,4096
1748 .long 4104,0,4194312,272633856
1749 .long 268439552,272629768,272633864,4194304
1750 .long 272629768,4104,4194304,268435464
1751 .long 4198400,268439552,8,272629760
1752 .long 268439560,0,4096,4194312
1753 .long 0,272629768,272633856,4096
1754 .long 268435456,272633864,4198408,4194304
1755 .long 272633864,8,268439552,4198408
1756 .long 4194312,4198400,272629760,268439560
1757 .long 4104,268435456,268435464,272633856
1758 .long 134217728,65536,1024,134284320
1759 .long 134283296,134218752,66592,134283264
1760 .long 65536,32,134217760,66560
1761 .long 134218784,134283296,134284288,0
1762 .long 66560,134217728,65568,1056
1763 .long 134218752,66592,0,134217760
1764 .long 32,134218784,134284320,65568
1765 .long 134283264,1024,1056,134284288
1766 .long 134284288,134218784,65568,134283264
1767 .long 65536,32,134217760,134218752
1768 .long 134217728,66560,134284320,0
1769 .long 66592,134217728,1024,65568
1770 .long 134218784,1024,0,134284320
1771 .long 134283296,134284288,1056,65536
1772 .long 66560,134283296,134218752,1056
1773 .long 32,66592,134283264,134217760
1774 .long 2147483712,2097216,0,2149588992
1775 .long 2097216,8192,2147491904,2097152
1776 .long 8256,2149589056,2105344,2147483648
1777 .long 2147491840,2147483712,2149580800,2105408
1778 .long 2097152,2147491904,2149580864,0
1779 .long 8192,64,2149588992,2149580864
1780 .long 2149589056,2149580800,2147483648,8256
1781 .long 64,2105344,2105408,2147491840
1782 .long 8256,2147483648,2147491840,2105408
1783 .long 2149588992,2097216,0,2147491840
1784 .long 2147483648,8192,2149580864,2097152
1785 .long 2097216,2149589056,2105344,64
1786 .long 2149589056,2105344,2097152,2147491904
1787 .long 2147483712,2149580800,2105408,0
1788 .long 8192,2147483712,2147491904,2149588992
1789 .long 2149580800,8256,64,2149580864
1790 .long 16384,512,16777728,16777220
1791 .long 16794116,16388,16896,0
1792 .long 16777216,16777732,516,16793600
1793 .long 4,16794112,16793600,516
1794 .long 16777732,16384,16388,16794116
1795 .long 0,16777728,16777220,16896
1796 .long 16793604,16900,16794112,4
1797 .long 16900,16793604,512,16777216
1798 .long 16900,16793600,16793604,516
1799 .long 16384,512,16777216,16793604
1800 .long 16777732,16900,16896,0
1801 .long 512,16777220,4,16777728
1802 .long 0,16777732,16777728,16896
1803 .long 516,16384,16794116,16777216
1804 .long 16794112,4,16388,16794116
1805 .long 16777220,16794112,16793600,16388
1806 .long 545259648,545390592,131200,0
1807 .long 537001984,8388736,545259520,545390720
1808 .long 128,536870912,8519680,131200
1809 .long 8519808,537002112,536871040,545259520
1810 .long 131072,8519808,8388736,537001984
1811 .long 545390720,536871040,0,8519680
1812 .long 536870912,8388608,537002112,545259648
1813 .long 8388608,131072,545390592,128
1814 .long 8388608,131072,536871040,545390720
1815 .long 131200,536870912,0,8519680
1816 .long 545259648,537002112,537001984,8388736
1817 .long 545390592,128,8388736,537001984
1818 .long 545390720,8388608,545259520,536871040
1819 .long 8519680,131200,537002112,545259520
1820 .long 128,545390592,8519808,0
1821 .long 536870912,545259648,131072,8519808
OLDNEW
« no previous file with comments | « openssl/crypto/des/asm/des-586.pl ('k') | openssl/crypto/des/asm/des_enc.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698