xref: /freebsd/lib/libmd/rmdconst.h (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1 /* crypto/ripemd/rmdconst.h */
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 routines 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 #define KL0 0x00000000L
59 #define KL1 0x5A827999L
60 #define KL2 0x6ED9EBA1L
61 #define KL3 0x8F1BBCDCL
62 #define KL4 0xA953FD4EL
63 
64 #define KR0 0x50A28BE6L
65 #define KR1 0x5C4DD124L
66 #define KR2 0x6D703EF3L
67 #define KR3 0x7A6D76E9L
68 #define KR4 0x00000000L
69 
70 #define WL00  0
71 #define SL00 11
72 #define WL01  1
73 #define SL01 14
74 #define WL02  2
75 #define SL02 15
76 #define WL03  3
77 #define SL03 12
78 #define WL04  4
79 #define SL04  5
80 #define WL05  5
81 #define SL05  8
82 #define WL06  6
83 #define SL06  7
84 #define WL07  7
85 #define SL07  9
86 #define WL08  8
87 #define SL08 11
88 #define WL09  9
89 #define SL09 13
90 #define WL10 10
91 #define SL10 14
92 #define WL11 11
93 #define SL11 15
94 #define WL12 12
95 #define SL12  6
96 #define WL13 13
97 #define SL13  7
98 #define WL14 14
99 #define SL14  9
100 #define WL15 15
101 #define SL15  8
102 
103 #define WL16  7
104 #define SL16  7
105 #define WL17  4
106 #define SL17  6
107 #define WL18 13
108 #define SL18  8
109 #define WL19  1
110 #define SL19 13
111 #define WL20 10
112 #define SL20 11
113 #define WL21  6
114 #define SL21  9
115 #define WL22 15
116 #define SL22  7
117 #define WL23  3
118 #define SL23 15
119 #define WL24 12
120 #define SL24  7
121 #define WL25  0
122 #define SL25 12
123 #define WL26  9
124 #define SL26 15
125 #define WL27  5
126 #define SL27  9
127 #define WL28  2
128 #define SL28 11
129 #define WL29 14
130 #define SL29  7
131 #define WL30 11
132 #define SL30 13
133 #define WL31  8
134 #define SL31 12
135 
136 #define WL32  3
137 #define SL32 11
138 #define WL33 10
139 #define SL33 13
140 #define WL34 14
141 #define SL34  6
142 #define WL35  4
143 #define SL35  7
144 #define WL36  9
145 #define SL36 14
146 #define WL37 15
147 #define SL37  9
148 #define WL38  8
149 #define SL38 13
150 #define WL39  1
151 #define SL39 15
152 #define WL40  2
153 #define SL40 14
154 #define WL41  7
155 #define SL41  8
156 #define WL42  0
157 #define SL42 13
158 #define WL43  6
159 #define SL43  6
160 #define WL44 13
161 #define SL44  5
162 #define WL45 11
163 #define SL45 12
164 #define WL46  5
165 #define SL46  7
166 #define WL47 12
167 #define SL47  5
168 
169 #define WL48  1
170 #define SL48 11
171 #define WL49  9
172 #define SL49 12
173 #define WL50 11
174 #define SL50 14
175 #define WL51 10
176 #define SL51 15
177 #define WL52  0
178 #define SL52 14
179 #define WL53  8
180 #define SL53 15
181 #define WL54 12
182 #define SL54  9
183 #define WL55  4
184 #define SL55  8
185 #define WL56 13
186 #define SL56  9
187 #define WL57  3
188 #define SL57 14
189 #define WL58  7
190 #define SL58  5
191 #define WL59 15
192 #define SL59  6
193 #define WL60 14
194 #define SL60  8
195 #define WL61  5
196 #define SL61  6
197 #define WL62  6
198 #define SL62  5
199 #define WL63  2
200 #define SL63 12
201 
202 #define WL64  4
203 #define SL64  9
204 #define WL65  0
205 #define SL65 15
206 #define WL66  5
207 #define SL66  5
208 #define WL67  9
209 #define SL67 11
210 #define WL68  7
211 #define SL68  6
212 #define WL69 12
213 #define SL69  8
214 #define WL70  2
215 #define SL70 13
216 #define WL71 10
217 #define SL71 12
218 #define WL72 14
219 #define SL72  5
220 #define WL73  1
221 #define SL73 12
222 #define WL74  3
223 #define SL74 13
224 #define WL75  8
225 #define SL75 14
226 #define WL76 11
227 #define SL76 11
228 #define WL77  6
229 #define SL77  8
230 #define WL78 15
231 #define SL78  5
232 #define WL79 13
233 #define SL79  6
234 
235 #define WR00  5
236 #define SR00  8
237 #define WR01 14
238 #define SR01  9
239 #define WR02  7
240 #define SR02  9
241 #define WR03  0
242 #define SR03 11
243 #define WR04  9
244 #define SR04 13
245 #define WR05  2
246 #define SR05 15
247 #define WR06 11
248 #define SR06 15
249 #define WR07  4
250 #define SR07  5
251 #define WR08 13
252 #define SR08  7
253 #define WR09  6
254 #define SR09  7
255 #define WR10 15
256 #define SR10  8
257 #define WR11  8
258 #define SR11 11
259 #define WR12  1
260 #define SR12 14
261 #define WR13 10
262 #define SR13 14
263 #define WR14  3
264 #define SR14 12
265 #define WR15 12
266 #define SR15  6
267 
268 #define WR16  6
269 #define SR16  9
270 #define WR17 11
271 #define SR17 13
272 #define WR18  3
273 #define SR18 15
274 #define WR19  7
275 #define SR19  7
276 #define WR20  0
277 #define SR20 12
278 #define WR21 13
279 #define SR21  8
280 #define WR22  5
281 #define SR22  9
282 #define WR23 10
283 #define SR23 11
284 #define WR24 14
285 #define SR24  7
286 #define WR25 15
287 #define SR25  7
288 #define WR26  8
289 #define SR26 12
290 #define WR27 12
291 #define SR27  7
292 #define WR28  4
293 #define SR28  6
294 #define WR29  9
295 #define SR29 15
296 #define WR30  1
297 #define SR30 13
298 #define WR31  2
299 #define SR31 11
300 
301 #define WR32 15
302 #define SR32  9
303 #define WR33  5
304 #define SR33  7
305 #define WR34  1
306 #define SR34 15
307 #define WR35  3
308 #define SR35 11
309 #define WR36  7
310 #define SR36  8
311 #define WR37 14
312 #define SR37  6
313 #define WR38  6
314 #define SR38  6
315 #define WR39  9
316 #define SR39 14
317 #define WR40 11
318 #define SR40 12
319 #define WR41  8
320 #define SR41 13
321 #define WR42 12
322 #define SR42  5
323 #define WR43  2
324 #define SR43 14
325 #define WR44 10
326 #define SR44 13
327 #define WR45  0
328 #define SR45 13
329 #define WR46  4
330 #define SR46  7
331 #define WR47 13
332 #define SR47  5
333 
334 #define WR48  8
335 #define SR48 15
336 #define WR49  6
337 #define SR49  5
338 #define WR50  4
339 #define SR50  8
340 #define WR51  1
341 #define SR51 11
342 #define WR52  3
343 #define SR52 14
344 #define WR53 11
345 #define SR53 14
346 #define WR54 15
347 #define SR54  6
348 #define WR55  0
349 #define SR55 14
350 #define WR56  5
351 #define SR56  6
352 #define WR57 12
353 #define SR57  9
354 #define WR58  2
355 #define SR58 12
356 #define WR59 13
357 #define SR59  9
358 #define WR60  9
359 #define SR60 12
360 #define WR61  7
361 #define SR61  5
362 #define WR62 10
363 #define SR62 15
364 #define WR63 14
365 #define SR63  8
366 
367 #define WR64 12
368 #define SR64  8
369 #define WR65 15
370 #define SR65  5
371 #define WR66 10
372 #define SR66 12
373 #define WR67  4
374 #define SR67  9
375 #define WR68  1
376 #define SR68 12
377 #define WR69  5
378 #define SR69  5
379 #define WR70  8
380 #define SR70 14
381 #define WR71  7
382 #define SR71  6
383 #define WR72  6
384 #define SR72  8
385 #define WR73  2
386 #define SR73 13
387 #define WR74 13
388 #define SR74  6
389 #define WR75 14
390 #define SR75  5
391 #define WR76  0
392 #define SR76 15
393 #define WR77  3
394 #define SR77 13
395 #define WR78  9
396 #define SR78 11
397 #define WR79 11
398 #define SR79 11
399 
400