Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
internal-photon256-mix.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Southern Storm Software, Pty Ltd.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef LW_INTERNAL_PHOTON256_MIX_H
24 #define LW_INTERNAL_PHOTON256_MIX_H
25 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
37 /* These macros were generated by a script to produce the minimum number
38  * of XOR's and rotations necessary to mix each vector together */
39 
40 #define MIXL0(out, s0, s1, s2, s3) \
41  do { \
42  uint32_t s, t; \
43  /* MIX(0x02, s0) */ \
44  s = (s0); \
45  t = s >> 24; \
46  s = (s << 8) ^ t ^ (t << 8); \
47  (out) = s; \
48  /* MIX(0x04, s1) */ \
49  s = (s1); \
50  t = s >> 24; \
51  s = (s << 8) ^ t ^ (t << 8); \
52  t = s >> 24; \
53  s = (s << 8) ^ t ^ (t << 8); \
54  (out) ^= s; \
55  /* MIX(0x02, s2) */ \
56  s = (s2); \
57  t = s >> 24; \
58  s = (s << 8) ^ t ^ (t << 8); \
59  (out) ^= s; \
60  /* MIX(0x0b, s3) */ \
61  (out) ^= (s3); \
62  s = (s3); \
63  t = s >> 24; \
64  s = (s << 8) ^ t ^ (t << 8); \
65  (out) ^= s; \
66  t = s >> 24; \
67  s = (s << 8) ^ t ^ (t << 8); \
68  t = s >> 24; \
69  s = (s << 8) ^ t ^ (t << 8); \
70  (out) ^= s; \
71  } while (0)
72 
73 #define MIXR0(out, s0, s1, s2, s3) \
74  do { \
75  uint32_t s, t; \
76  /* MIX(0x02, s0) */ \
77  s = (s0); \
78  t = s >> 24; \
79  s = (s << 8) ^ t ^ (t << 8); \
80  (out) ^= s; \
81  /* MIX(0x08, s1) */ \
82  s = (s1); \
83  t = s >> 24; \
84  s = (s << 8) ^ t ^ (t << 8); \
85  t = s >> 24; \
86  s = (s << 8) ^ t ^ (t << 8); \
87  t = s >> 24; \
88  s = (s << 8) ^ t ^ (t << 8); \
89  (out) ^= s; \
90  /* MIX(0x05, s2) */ \
91  (out) ^= (s2); \
92  s = (s2); \
93  t = s >> 24; \
94  s = (s << 8) ^ t ^ (t << 8); \
95  t = s >> 24; \
96  s = (s << 8) ^ t ^ (t << 8); \
97  (out) ^= s; \
98  /* MIX(0x06, s3) */ \
99  s = (s3); \
100  t = s >> 24; \
101  s = (s << 8) ^ t ^ (t << 8); \
102  (out) ^= s; \
103  t = s >> 24; \
104  s = (s << 8) ^ t ^ (t << 8); \
105  (out) ^= s; \
106  } while (0)
107 
108 #define MIXL1(out, s0, s1, s2, s3) \
109  do { \
110  uint32_t s, t; \
111  /* MIX(0x0c, s0) */ \
112  s = (s0); \
113  t = s >> 24; \
114  s = (s << 8) ^ t ^ (t << 8); \
115  t = s >> 24; \
116  s = (s << 8) ^ t ^ (t << 8); \
117  (out) = s; \
118  t = s >> 24; \
119  s = (s << 8) ^ t ^ (t << 8); \
120  (out) ^= s; \
121  /* MIX(0x09, s1) */ \
122  (out) ^= (s1); \
123  s = (s1); \
124  t = s >> 24; \
125  s = (s << 8) ^ t ^ (t << 8); \
126  t = s >> 24; \
127  s = (s << 8) ^ t ^ (t << 8); \
128  t = s >> 24; \
129  s = (s << 8) ^ t ^ (t << 8); \
130  (out) ^= s; \
131  /* MIX(0x08, s2) */ \
132  s = (s2); \
133  t = s >> 24; \
134  s = (s << 8) ^ t ^ (t << 8); \
135  t = s >> 24; \
136  s = (s << 8) ^ t ^ (t << 8); \
137  t = s >> 24; \
138  s = (s << 8) ^ t ^ (t << 8); \
139  (out) ^= s; \
140  /* MIX(0x0d, s3) */ \
141  (out) ^= (s3); \
142  s = (s3); \
143  t = s >> 24; \
144  s = (s << 8) ^ t ^ (t << 8); \
145  t = s >> 24; \
146  s = (s << 8) ^ t ^ (t << 8); \
147  (out) ^= s; \
148  t = s >> 24; \
149  s = (s << 8) ^ t ^ (t << 8); \
150  (out) ^= s; \
151  } while (0)
152 
153 #define MIXR1(out, s0, s1, s2, s3) \
154  do { \
155  uint32_t s, t; \
156  /* MIX(0x07, s0) */ \
157  (out) ^= (s0); \
158  s = (s0); \
159  t = s >> 24; \
160  s = (s << 8) ^ t ^ (t << 8); \
161  (out) ^= s; \
162  t = s >> 24; \
163  s = (s << 8) ^ t ^ (t << 8); \
164  (out) ^= s; \
165  /* MIX(0x07, s1) */ \
166  (out) ^= (s1); \
167  s = (s1); \
168  t = s >> 24; \
169  s = (s << 8) ^ t ^ (t << 8); \
170  (out) ^= s; \
171  t = s >> 24; \
172  s = (s << 8) ^ t ^ (t << 8); \
173  (out) ^= s; \
174  /* MIX(0x05, s2) */ \
175  (out) ^= (s2); \
176  s = (s2); \
177  t = s >> 24; \
178  s = (s << 8) ^ t ^ (t << 8); \
179  t = s >> 24; \
180  s = (s << 8) ^ t ^ (t << 8); \
181  (out) ^= s; \
182  /* MIX(0x02, s3) */ \
183  s = (s3); \
184  t = s >> 24; \
185  s = (s << 8) ^ t ^ (t << 8); \
186  (out) ^= s; \
187  } while (0)
188 
189 #define MIXL2(out, s0, s1, s2, s3) \
190  do { \
191  uint32_t s, t; \
192  /* MIX(0x04, s0) */ \
193  s = (s0); \
194  t = s >> 24; \
195  s = (s << 8) ^ t ^ (t << 8); \
196  t = s >> 24; \
197  s = (s << 8) ^ t ^ (t << 8); \
198  (out) = s; \
199  /* MIX(0x04, s1) */ \
200  s = (s1); \
201  t = s >> 24; \
202  s = (s << 8) ^ t ^ (t << 8); \
203  t = s >> 24; \
204  s = (s << 8) ^ t ^ (t << 8); \
205  (out) ^= s; \
206  /* MIX(0x0d, s2) */ \
207  (out) ^= (s2); \
208  s = (s2); \
209  t = s >> 24; \
210  s = (s << 8) ^ t ^ (t << 8); \
211  t = s >> 24; \
212  s = (s << 8) ^ t ^ (t << 8); \
213  (out) ^= s; \
214  t = s >> 24; \
215  s = (s << 8) ^ t ^ (t << 8); \
216  (out) ^= s; \
217  /* MIX(0x0d, s3) */ \
218  (out) ^= (s3); \
219  s = (s3); \
220  t = s >> 24; \
221  s = (s << 8) ^ t ^ (t << 8); \
222  t = s >> 24; \
223  s = (s << 8) ^ t ^ (t << 8); \
224  (out) ^= s; \
225  t = s >> 24; \
226  s = (s << 8) ^ t ^ (t << 8); \
227  (out) ^= s; \
228  } while (0)
229 
230 #define MIXR2(out, s0, s1, s2, s3) \
231  do { \
232  uint32_t s, t; \
233  /* MIX(0x09, s0) */ \
234  (out) ^= (s0); \
235  s = (s0); \
236  t = s >> 24; \
237  s = (s << 8) ^ t ^ (t << 8); \
238  t = s >> 24; \
239  s = (s << 8) ^ t ^ (t << 8); \
240  t = s >> 24; \
241  s = (s << 8) ^ t ^ (t << 8); \
242  (out) ^= s; \
243  /* MIX(0x04, s1) */ \
244  s = (s1); \
245  t = s >> 24; \
246  s = (s << 8) ^ t ^ (t << 8); \
247  t = s >> 24; \
248  s = (s << 8) ^ t ^ (t << 8); \
249  (out) ^= s; \
250  /* MIX(0x0d, s2) */ \
251  (out) ^= (s2); \
252  s = (s2); \
253  t = s >> 24; \
254  s = (s << 8) ^ t ^ (t << 8); \
255  t = s >> 24; \
256  s = (s << 8) ^ t ^ (t << 8); \
257  (out) ^= s; \
258  t = s >> 24; \
259  s = (s << 8) ^ t ^ (t << 8); \
260  (out) ^= s; \
261  /* MIX(0x09, s3) */ \
262  (out) ^= (s3); \
263  s = (s3); \
264  t = s >> 24; \
265  s = (s << 8) ^ t ^ (t << 8); \
266  t = s >> 24; \
267  s = (s << 8) ^ t ^ (t << 8); \
268  t = s >> 24; \
269  s = (s << 8) ^ t ^ (t << 8); \
270  (out) ^= s; \
271  } while (0)
272 
273 #define MIXL3(out, s0, s1, s2, s3) \
274  do { \
275  uint32_t s, t; \
276  /* MIX(0x01, s0) */ \
277  (out) = (s0); \
278  /* MIX(0x06, s1) */ \
279  s = (s1); \
280  t = s >> 24; \
281  s = (s << 8) ^ t ^ (t << 8); \
282  (out) ^= s; \
283  t = s >> 24; \
284  s = (s << 8) ^ t ^ (t << 8); \
285  (out) ^= s; \
286  /* MIX(0x05, s2) */ \
287  (out) ^= (s2); \
288  s = (s2); \
289  t = s >> 24; \
290  s = (s << 8) ^ t ^ (t << 8); \
291  t = s >> 24; \
292  s = (s << 8) ^ t ^ (t << 8); \
293  (out) ^= s; \
294  /* MIX(0x01, s3) */ \
295  (out) ^= (s3); \
296  } while (0)
297 
298 #define MIXR3(out, s0, s1, s2, s3) \
299  do { \
300  uint32_t s, t; \
301  /* MIX(0x0c, s0) */ \
302  s = (s0); \
303  t = s >> 24; \
304  s = (s << 8) ^ t ^ (t << 8); \
305  t = s >> 24; \
306  s = (s << 8) ^ t ^ (t << 8); \
307  (out) ^= s; \
308  t = s >> 24; \
309  s = (s << 8) ^ t ^ (t << 8); \
310  (out) ^= s; \
311  /* MIX(0x0d, s1) */ \
312  (out) ^= (s1); \
313  s = (s1); \
314  t = s >> 24; \
315  s = (s << 8) ^ t ^ (t << 8); \
316  t = s >> 24; \
317  s = (s << 8) ^ t ^ (t << 8); \
318  (out) ^= s; \
319  t = s >> 24; \
320  s = (s << 8) ^ t ^ (t << 8); \
321  (out) ^= s; \
322  /* MIX(0x0f, s2) */ \
323  (out) ^= (s2); \
324  s = (s2); \
325  t = s >> 24; \
326  s = (s << 8) ^ t ^ (t << 8); \
327  (out) ^= s; \
328  t = s >> 24; \
329  s = (s << 8) ^ t ^ (t << 8); \
330  (out) ^= s; \
331  t = s >> 24; \
332  s = (s << 8) ^ t ^ (t << 8); \
333  (out) ^= s; \
334  /* MIX(0x0e, s3) */ \
335  s = (s3); \
336  t = s >> 24; \
337  s = (s << 8) ^ t ^ (t << 8); \
338  (out) ^= s; \
339  t = s >> 24; \
340  s = (s << 8) ^ t ^ (t << 8); \
341  (out) ^= s; \
342  t = s >> 24; \
343  s = (s << 8) ^ t ^ (t << 8); \
344  (out) ^= s; \
345  } while (0)
346 
347 #define MIXL4(out, s0, s1, s2, s3) \
348  do { \
349  uint32_t s, t; \
350  /* MIX(0x0f, s0) */ \
351  (out) = (s0); \
352  s = (s0); \
353  t = s >> 24; \
354  s = (s << 8) ^ t ^ (t << 8); \
355  (out) ^= s; \
356  t = s >> 24; \
357  s = (s << 8) ^ t ^ (t << 8); \
358  (out) ^= s; \
359  t = s >> 24; \
360  s = (s << 8) ^ t ^ (t << 8); \
361  (out) ^= s; \
362  /* MIX(0x0c, s1) */ \
363  s = (s1); \
364  t = s >> 24; \
365  s = (s << 8) ^ t ^ (t << 8); \
366  t = s >> 24; \
367  s = (s << 8) ^ t ^ (t << 8); \
368  (out) ^= s; \
369  t = s >> 24; \
370  s = (s << 8) ^ t ^ (t << 8); \
371  (out) ^= s; \
372  /* MIX(0x09, s2) */ \
373  (out) ^= (s2); \
374  s = (s2); \
375  t = s >> 24; \
376  s = (s << 8) ^ t ^ (t << 8); \
377  t = s >> 24; \
378  s = (s << 8) ^ t ^ (t << 8); \
379  t = s >> 24; \
380  s = (s << 8) ^ t ^ (t << 8); \
381  (out) ^= s; \
382  /* MIX(0x0d, s3) */ \
383  (out) ^= (s3); \
384  s = (s3); \
385  t = s >> 24; \
386  s = (s << 8) ^ t ^ (t << 8); \
387  t = s >> 24; \
388  s = (s << 8) ^ t ^ (t << 8); \
389  (out) ^= s; \
390  t = s >> 24; \
391  s = (s << 8) ^ t ^ (t << 8); \
392  (out) ^= s; \
393  } while (0)
394 
395 #define MIXR4(out, s0, s1, s2, s3) \
396  do { \
397  uint32_t s, t; \
398  /* MIX(0x0e, s0) */ \
399  s = (s0); \
400  t = s >> 24; \
401  s = (s << 8) ^ t ^ (t << 8); \
402  (out) ^= s; \
403  t = s >> 24; \
404  s = (s << 8) ^ t ^ (t << 8); \
405  (out) ^= s; \
406  t = s >> 24; \
407  s = (s << 8) ^ t ^ (t << 8); \
408  (out) ^= s; \
409  /* MIX(0x05, s1) */ \
410  (out) ^= (s1); \
411  s = (s1); \
412  t = s >> 24; \
413  s = (s << 8) ^ t ^ (t << 8); \
414  t = s >> 24; \
415  s = (s << 8) ^ t ^ (t << 8); \
416  (out) ^= s; \
417  /* MIX(0x0e, s2) */ \
418  s = (s2); \
419  t = s >> 24; \
420  s = (s << 8) ^ t ^ (t << 8); \
421  (out) ^= s; \
422  t = s >> 24; \
423  s = (s << 8) ^ t ^ (t << 8); \
424  (out) ^= s; \
425  t = s >> 24; \
426  s = (s << 8) ^ t ^ (t << 8); \
427  (out) ^= s; \
428  /* MIX(0x0d, s3) */ \
429  (out) ^= (s3); \
430  s = (s3); \
431  t = s >> 24; \
432  s = (s << 8) ^ t ^ (t << 8); \
433  t = s >> 24; \
434  s = (s << 8) ^ t ^ (t << 8); \
435  (out) ^= s; \
436  t = s >> 24; \
437  s = (s << 8) ^ t ^ (t << 8); \
438  (out) ^= s; \
439  } while (0)
440 
441 #define MIXL5(out, s0, s1, s2, s3) \
442  do { \
443  uint32_t s, t; \
444  /* MIX(0x09, s0) */ \
445  (out) = (s0); \
446  s = (s0); \
447  t = s >> 24; \
448  s = (s << 8) ^ t ^ (t << 8); \
449  t = s >> 24; \
450  s = (s << 8) ^ t ^ (t << 8); \
451  t = s >> 24; \
452  s = (s << 8) ^ t ^ (t << 8); \
453  (out) ^= s; \
454  /* MIX(0x0e, s1) */ \
455  s = (s1); \
456  t = s >> 24; \
457  s = (s << 8) ^ t ^ (t << 8); \
458  (out) ^= s; \
459  t = s >> 24; \
460  s = (s << 8) ^ t ^ (t << 8); \
461  (out) ^= s; \
462  t = s >> 24; \
463  s = (s << 8) ^ t ^ (t << 8); \
464  (out) ^= s; \
465  /* MIX(0x05, s2) */ \
466  (out) ^= (s2); \
467  s = (s2); \
468  t = s >> 24; \
469  s = (s << 8) ^ t ^ (t << 8); \
470  t = s >> 24; \
471  s = (s << 8) ^ t ^ (t << 8); \
472  (out) ^= s; \
473  /* MIX(0x0f, s3) */ \
474  (out) ^= (s3); \
475  s = (s3); \
476  t = s >> 24; \
477  s = (s << 8) ^ t ^ (t << 8); \
478  (out) ^= s; \
479  t = s >> 24; \
480  s = (s << 8) ^ t ^ (t << 8); \
481  (out) ^= s; \
482  t = s >> 24; \
483  s = (s << 8) ^ t ^ (t << 8); \
484  (out) ^= s; \
485  } while (0)
486 
487 #define MIXR5(out, s0, s1, s2, s3) \
488  do { \
489  uint32_t s, t; \
490  /* MIX(0x04, s0) */ \
491  s = (s0); \
492  t = s >> 24; \
493  s = (s << 8) ^ t ^ (t << 8); \
494  t = s >> 24; \
495  s = (s << 8) ^ t ^ (t << 8); \
496  (out) ^= s; \
497  /* MIX(0x0c, s1) */ \
498  s = (s1); \
499  t = s >> 24; \
500  s = (s << 8) ^ t ^ (t << 8); \
501  t = s >> 24; \
502  s = (s << 8) ^ t ^ (t << 8); \
503  (out) ^= s; \
504  t = s >> 24; \
505  s = (s << 8) ^ t ^ (t << 8); \
506  (out) ^= s; \
507  /* MIX(0x09, s2) */ \
508  (out) ^= (s2); \
509  s = (s2); \
510  t = s >> 24; \
511  s = (s << 8) ^ t ^ (t << 8); \
512  t = s >> 24; \
513  s = (s << 8) ^ t ^ (t << 8); \
514  t = s >> 24; \
515  s = (s << 8) ^ t ^ (t << 8); \
516  (out) ^= s; \
517  /* MIX(0x06, s3) */ \
518  s = (s3); \
519  t = s >> 24; \
520  s = (s << 8) ^ t ^ (t << 8); \
521  (out) ^= s; \
522  t = s >> 24; \
523  s = (s << 8) ^ t ^ (t << 8); \
524  (out) ^= s; \
525  } while (0)
526 
527 #define MIXL6(out, s0, s1, s2, s3) \
528  do { \
529  uint32_t s, t; \
530  /* MIX(0x0c, s0) */ \
531  s = (s0); \
532  t = s >> 24; \
533  s = (s << 8) ^ t ^ (t << 8); \
534  t = s >> 24; \
535  s = (s << 8) ^ t ^ (t << 8); \
536  (out) = s; \
537  t = s >> 24; \
538  s = (s << 8) ^ t ^ (t << 8); \
539  (out) ^= s; \
540  /* MIX(0x02, s1) */ \
541  s = (s1); \
542  t = s >> 24; \
543  s = (s << 8) ^ t ^ (t << 8); \
544  (out) ^= s; \
545  /* MIX(0x02, s2) */ \
546  s = (s2); \
547  t = s >> 24; \
548  s = (s << 8) ^ t ^ (t << 8); \
549  (out) ^= s; \
550  /* MIX(0x0a, s3) */ \
551  s = (s3); \
552  t = s >> 24; \
553  s = (s << 8) ^ t ^ (t << 8); \
554  (out) ^= s; \
555  t = s >> 24; \
556  s = (s << 8) ^ t ^ (t << 8); \
557  t = s >> 24; \
558  s = (s << 8) ^ t ^ (t << 8); \
559  (out) ^= s; \
560  } while (0)
561 
562 #define MIXR6(out, s0, s1, s2, s3) \
563  do { \
564  uint32_t s, t; \
565  /* MIX(0x03, s0) */ \
566  (out) ^= (s0); \
567  s = (s0); \
568  t = s >> 24; \
569  s = (s << 8) ^ t ^ (t << 8); \
570  (out) ^= s; \
571  /* MIX(0x01, s1) */ \
572  (out) ^= (s1); \
573  /* MIX(0x01, s2) */ \
574  (out) ^= (s2); \
575  /* MIX(0x0e, s3) */ \
576  s = (s3); \
577  t = s >> 24; \
578  s = (s << 8) ^ t ^ (t << 8); \
579  (out) ^= s; \
580  t = s >> 24; \
581  s = (s << 8) ^ t ^ (t << 8); \
582  (out) ^= s; \
583  t = s >> 24; \
584  s = (s << 8) ^ t ^ (t << 8); \
585  (out) ^= s; \
586  } while (0)
587 
588 #define MIXL7(out, s0, s1, s2, s3) \
589  do { \
590  uint32_t s, t; \
591  /* MIX(0x0f, s0) */ \
592  (out) = (s0); \
593  s = (s0); \
594  t = s >> 24; \
595  s = (s << 8) ^ t ^ (t << 8); \
596  (out) ^= s; \
597  t = s >> 24; \
598  s = (s << 8) ^ t ^ (t << 8); \
599  (out) ^= s; \
600  t = s >> 24; \
601  s = (s << 8) ^ t ^ (t << 8); \
602  (out) ^= s; \
603  /* MIX(0x01, s1) */ \
604  (out) ^= (s1); \
605  /* MIX(0x0d, s2) */ \
606  (out) ^= (s2); \
607  s = (s2); \
608  t = s >> 24; \
609  s = (s << 8) ^ t ^ (t << 8); \
610  t = s >> 24; \
611  s = (s << 8) ^ t ^ (t << 8); \
612  (out) ^= s; \
613  t = s >> 24; \
614  s = (s << 8) ^ t ^ (t << 8); \
615  (out) ^= s; \
616  /* MIX(0x0a, s3) */ \
617  s = (s3); \
618  t = s >> 24; \
619  s = (s << 8) ^ t ^ (t << 8); \
620  (out) ^= s; \
621  t = s >> 24; \
622  s = (s << 8) ^ t ^ (t << 8); \
623  t = s >> 24; \
624  s = (s << 8) ^ t ^ (t << 8); \
625  (out) ^= s; \
626  } while (0)
627 
628 #define MIXR7(out, s0, s1, s2, s3) \
629  do { \
630  uint32_t s, t; \
631  /* MIX(0x05, s0) */ \
632  (out) ^= (s0); \
633  s = (s0); \
634  t = s >> 24; \
635  s = (s << 8) ^ t ^ (t << 8); \
636  t = s >> 24; \
637  s = (s << 8) ^ t ^ (t << 8); \
638  (out) ^= s; \
639  /* MIX(0x0a, s1) */ \
640  s = (s1); \
641  t = s >> 24; \
642  s = (s << 8) ^ t ^ (t << 8); \
643  (out) ^= s; \
644  t = s >> 24; \
645  s = (s << 8) ^ t ^ (t << 8); \
646  t = s >> 24; \
647  s = (s << 8) ^ t ^ (t << 8); \
648  (out) ^= s; \
649  /* MIX(0x02, s2) */ \
650  s = (s2); \
651  t = s >> 24; \
652  s = (s << 8) ^ t ^ (t << 8); \
653  (out) ^= s; \
654  /* MIX(0x03, s3) */ \
655  (out) ^= (s3); \
656  s = (s3); \
657  t = s >> 24; \
658  s = (s << 8) ^ t ^ (t << 8); \
659  (out) ^= s; \
660  } while (0)
661 
664 #ifdef __cplusplus
665 }
666 #endif
667 
668 #endif