1 | .text
|
---|
2 | .align 6,0x90
|
---|
3 | .globl _poly1305_init
|
---|
4 | .align 4
|
---|
5 | _poly1305_init:
|
---|
6 | L_poly1305_init_begin:
|
---|
7 | #ifdef __CET__
|
---|
8 |
|
---|
9 | .byte 243,15,30,251
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | pushl %ebp
|
---|
13 | pushl %ebx
|
---|
14 | pushl %esi
|
---|
15 | pushl %edi
|
---|
16 | movl 20(%esp),%edi
|
---|
17 | movl 24(%esp),%esi
|
---|
18 | movl 28(%esp),%ebp
|
---|
19 | xorl %eax,%eax
|
---|
20 | movl %eax,(%edi)
|
---|
21 | movl %eax,4(%edi)
|
---|
22 | movl %eax,8(%edi)
|
---|
23 | movl %eax,12(%edi)
|
---|
24 | movl %eax,16(%edi)
|
---|
25 | movl %eax,20(%edi)
|
---|
26 | cmpl $0,%esi
|
---|
27 | je L000nokey
|
---|
28 | movl (%esi),%eax
|
---|
29 | movl 4(%esi),%ebx
|
---|
30 | movl 8(%esi),%ecx
|
---|
31 | movl 12(%esi),%edx
|
---|
32 | andl $268435455,%eax
|
---|
33 | andl $268435452,%ebx
|
---|
34 | andl $268435452,%ecx
|
---|
35 | andl $268435452,%edx
|
---|
36 | movl %eax,24(%edi)
|
---|
37 | movl %ebx,28(%edi)
|
---|
38 | movl %ecx,32(%edi)
|
---|
39 | movl %edx,36(%edi)
|
---|
40 | movl $0,%eax
|
---|
41 | L000nokey:
|
---|
42 | popl %edi
|
---|
43 | popl %esi
|
---|
44 | popl %ebx
|
---|
45 | popl %ebp
|
---|
46 | ret
|
---|
47 | .globl _poly1305_blocks
|
---|
48 | .align 4
|
---|
49 | _poly1305_blocks:
|
---|
50 | L_poly1305_blocks_begin:
|
---|
51 | #ifdef __CET__
|
---|
52 |
|
---|
53 | .byte 243,15,30,251
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | pushl %ebp
|
---|
57 | pushl %ebx
|
---|
58 | pushl %esi
|
---|
59 | pushl %edi
|
---|
60 | movl 20(%esp),%edi
|
---|
61 | movl 24(%esp),%esi
|
---|
62 | movl 28(%esp),%ecx
|
---|
63 | L001enter_blocks:
|
---|
64 | andl $-15,%ecx
|
---|
65 | jz L002nodata
|
---|
66 | subl $64,%esp
|
---|
67 | movl 24(%edi),%eax
|
---|
68 | movl 28(%edi),%ebx
|
---|
69 | leal (%esi,%ecx,1),%ebp
|
---|
70 | movl 32(%edi),%ecx
|
---|
71 | movl 36(%edi),%edx
|
---|
72 | movl %ebp,92(%esp)
|
---|
73 | movl %esi,%ebp
|
---|
74 | movl %eax,36(%esp)
|
---|
75 | movl %ebx,%eax
|
---|
76 | shrl $2,%eax
|
---|
77 | movl %ebx,40(%esp)
|
---|
78 | addl %ebx,%eax
|
---|
79 | movl %ecx,%ebx
|
---|
80 | shrl $2,%ebx
|
---|
81 | movl %ecx,44(%esp)
|
---|
82 | addl %ecx,%ebx
|
---|
83 | movl %edx,%ecx
|
---|
84 | shrl $2,%ecx
|
---|
85 | movl %edx,48(%esp)
|
---|
86 | addl %edx,%ecx
|
---|
87 | movl %eax,52(%esp)
|
---|
88 | movl %ebx,56(%esp)
|
---|
89 | movl %ecx,60(%esp)
|
---|
90 | movl (%edi),%eax
|
---|
91 | movl 4(%edi),%ebx
|
---|
92 | movl 8(%edi),%ecx
|
---|
93 | movl 12(%edi),%esi
|
---|
94 | movl 16(%edi),%edi
|
---|
95 | jmp L003loop
|
---|
96 | .align 5,0x90
|
---|
97 | L003loop:
|
---|
98 | addl (%ebp),%eax
|
---|
99 | adcl 4(%ebp),%ebx
|
---|
100 | adcl 8(%ebp),%ecx
|
---|
101 | adcl 12(%ebp),%esi
|
---|
102 | leal 16(%ebp),%ebp
|
---|
103 | adcl 96(%esp),%edi
|
---|
104 | movl %eax,(%esp)
|
---|
105 | movl %esi,12(%esp)
|
---|
106 | mull 36(%esp)
|
---|
107 | movl %edi,16(%esp)
|
---|
108 | movl %eax,%edi
|
---|
109 | movl %ebx,%eax
|
---|
110 | movl %edx,%esi
|
---|
111 | mull 60(%esp)
|
---|
112 | addl %eax,%edi
|
---|
113 | movl %ecx,%eax
|
---|
114 | adcl %edx,%esi
|
---|
115 | mull 56(%esp)
|
---|
116 | addl %eax,%edi
|
---|
117 | movl 12(%esp),%eax
|
---|
118 | adcl %edx,%esi
|
---|
119 | mull 52(%esp)
|
---|
120 | addl %eax,%edi
|
---|
121 | movl (%esp),%eax
|
---|
122 | adcl %edx,%esi
|
---|
123 | mull 40(%esp)
|
---|
124 | movl %edi,20(%esp)
|
---|
125 | xorl %edi,%edi
|
---|
126 | addl %eax,%esi
|
---|
127 | movl %ebx,%eax
|
---|
128 | adcl %edx,%edi
|
---|
129 | mull 36(%esp)
|
---|
130 | addl %eax,%esi
|
---|
131 | movl %ecx,%eax
|
---|
132 | adcl %edx,%edi
|
---|
133 | mull 60(%esp)
|
---|
134 | addl %eax,%esi
|
---|
135 | movl 12(%esp),%eax
|
---|
136 | adcl %edx,%edi
|
---|
137 | mull 56(%esp)
|
---|
138 | addl %eax,%esi
|
---|
139 | movl 16(%esp),%eax
|
---|
140 | adcl %edx,%edi
|
---|
141 | imull 52(%esp),%eax
|
---|
142 | addl %eax,%esi
|
---|
143 | movl (%esp),%eax
|
---|
144 | adcl $0,%edi
|
---|
145 | mull 44(%esp)
|
---|
146 | movl %esi,24(%esp)
|
---|
147 | xorl %esi,%esi
|
---|
148 | addl %eax,%edi
|
---|
149 | movl %ebx,%eax
|
---|
150 | adcl %edx,%esi
|
---|
151 | mull 40(%esp)
|
---|
152 | addl %eax,%edi
|
---|
153 | movl %ecx,%eax
|
---|
154 | adcl %edx,%esi
|
---|
155 | mull 36(%esp)
|
---|
156 | addl %eax,%edi
|
---|
157 | movl 12(%esp),%eax
|
---|
158 | adcl %edx,%esi
|
---|
159 | mull 60(%esp)
|
---|
160 | addl %eax,%edi
|
---|
161 | movl 16(%esp),%eax
|
---|
162 | adcl %edx,%esi
|
---|
163 | imull 56(%esp),%eax
|
---|
164 | addl %eax,%edi
|
---|
165 | movl (%esp),%eax
|
---|
166 | adcl $0,%esi
|
---|
167 | mull 48(%esp)
|
---|
168 | movl %edi,28(%esp)
|
---|
169 | xorl %edi,%edi
|
---|
170 | addl %eax,%esi
|
---|
171 | movl %ebx,%eax
|
---|
172 | adcl %edx,%edi
|
---|
173 | mull 44(%esp)
|
---|
174 | addl %eax,%esi
|
---|
175 | movl %ecx,%eax
|
---|
176 | adcl %edx,%edi
|
---|
177 | mull 40(%esp)
|
---|
178 | addl %eax,%esi
|
---|
179 | movl 12(%esp),%eax
|
---|
180 | adcl %edx,%edi
|
---|
181 | mull 36(%esp)
|
---|
182 | addl %eax,%esi
|
---|
183 | movl 16(%esp),%ecx
|
---|
184 | adcl %edx,%edi
|
---|
185 | movl %ecx,%edx
|
---|
186 | imull 60(%esp),%ecx
|
---|
187 | addl %ecx,%esi
|
---|
188 | movl 20(%esp),%eax
|
---|
189 | adcl $0,%edi
|
---|
190 | imull 36(%esp),%edx
|
---|
191 | addl %edi,%edx
|
---|
192 | movl 24(%esp),%ebx
|
---|
193 | movl 28(%esp),%ecx
|
---|
194 | movl %edx,%edi
|
---|
195 | shrl $2,%edx
|
---|
196 | andl $3,%edi
|
---|
197 | leal (%edx,%edx,4),%edx
|
---|
198 | addl %edx,%eax
|
---|
199 | adcl $0,%ebx
|
---|
200 | adcl $0,%ecx
|
---|
201 | adcl $0,%esi
|
---|
202 | adcl $0,%edi
|
---|
203 | cmpl 92(%esp),%ebp
|
---|
204 | jne L003loop
|
---|
205 | movl 84(%esp),%edx
|
---|
206 | addl $64,%esp
|
---|
207 | movl %eax,(%edx)
|
---|
208 | movl %ebx,4(%edx)
|
---|
209 | movl %ecx,8(%edx)
|
---|
210 | movl %esi,12(%edx)
|
---|
211 | movl %edi,16(%edx)
|
---|
212 | L002nodata:
|
---|
213 | popl %edi
|
---|
214 | popl %esi
|
---|
215 | popl %ebx
|
---|
216 | popl %ebp
|
---|
217 | ret
|
---|
218 | .globl _poly1305_emit
|
---|
219 | .align 4
|
---|
220 | _poly1305_emit:
|
---|
221 | L_poly1305_emit_begin:
|
---|
222 | #ifdef __CET__
|
---|
223 |
|
---|
224 | .byte 243,15,30,251
|
---|
225 | #endif
|
---|
226 |
|
---|
227 | pushl %ebp
|
---|
228 | pushl %ebx
|
---|
229 | pushl %esi
|
---|
230 | pushl %edi
|
---|
231 | movl 20(%esp),%ebp
|
---|
232 | L004enter_emit:
|
---|
233 | movl 24(%esp),%edi
|
---|
234 | movl (%ebp),%eax
|
---|
235 | movl 4(%ebp),%ebx
|
---|
236 | movl 8(%ebp),%ecx
|
---|
237 | movl 12(%ebp),%edx
|
---|
238 | movl 16(%ebp),%esi
|
---|
239 | addl $5,%eax
|
---|
240 | adcl $0,%ebx
|
---|
241 | adcl $0,%ecx
|
---|
242 | adcl $0,%edx
|
---|
243 | adcl $0,%esi
|
---|
244 | shrl $2,%esi
|
---|
245 | negl %esi
|
---|
246 | andl %esi,%eax
|
---|
247 | andl %esi,%ebx
|
---|
248 | andl %esi,%ecx
|
---|
249 | andl %esi,%edx
|
---|
250 | movl %eax,(%edi)
|
---|
251 | movl %ebx,4(%edi)
|
---|
252 | movl %ecx,8(%edi)
|
---|
253 | movl %edx,12(%edi)
|
---|
254 | notl %esi
|
---|
255 | movl (%ebp),%eax
|
---|
256 | movl 4(%ebp),%ebx
|
---|
257 | movl 8(%ebp),%ecx
|
---|
258 | movl 12(%ebp),%edx
|
---|
259 | movl 28(%esp),%ebp
|
---|
260 | andl %esi,%eax
|
---|
261 | andl %esi,%ebx
|
---|
262 | andl %esi,%ecx
|
---|
263 | andl %esi,%edx
|
---|
264 | orl (%edi),%eax
|
---|
265 | orl 4(%edi),%ebx
|
---|
266 | orl 8(%edi),%ecx
|
---|
267 | orl 12(%edi),%edx
|
---|
268 | addl (%ebp),%eax
|
---|
269 | adcl 4(%ebp),%ebx
|
---|
270 | adcl 8(%ebp),%ecx
|
---|
271 | adcl 12(%ebp),%edx
|
---|
272 | movl %eax,(%edi)
|
---|
273 | movl %ebx,4(%edi)
|
---|
274 | movl %ecx,8(%edi)
|
---|
275 | movl %edx,12(%edi)
|
---|
276 | popl %edi
|
---|
277 | popl %esi
|
---|
278 | popl %ebx
|
---|
279 | popl %ebp
|
---|
280 | ret
|
---|
281 | .byte 80,111,108,121,49,51,48,53,32,102,111,114,32,120,56,54
|
---|
282 | .byte 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
|
---|
283 | .byte 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
|
---|
284 | .byte 114,103,62,0
|
---|
285 | .align 2,0x90
|
---|