-
Notifications
You must be signed in to change notification settings - Fork 4
/
sbox32_hash.h
1777 lines (1744 loc) · 55.6 KB
/
sbox32_hash.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef DEBUG_SBOX32_HASH
#define DEBUG_SBOX32_HASH 0
#include "zaphod32_hash.h"
#if DEBUG_SBOX32_HASH == 1
#include <stdio.h>
#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5) printf(pat, v0, v1, v2, v3, v4, v5)
#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4) printf(pat, v0, v1, v2, v3, v4)
#define SBOX32_WARN4(pat,v0,v1,v2,v3) printf(pat, v0, v1, v2, v3)
#define SBOX32_WARN3(pat,v0,v1,v2) printf(pat, v0, v1, v2)
#define SBOX32_WARN2(pat,v0,v1) printf(pat, v0, v1)
#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2)
#elif DEBUG_SBOX32_HASH == 2
#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5)
#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4)
#define SBOX32_WARN4(pat,v0,v1,v2,v3)
#define SBOX32_WARN3(pat,v0,v1,v2)
#define SBOX32_WARN2(pat,v0,v1)
#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2)
#else
#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5)
#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4)
#define SBOX32_WARN4(pat,v0,v1,v2,v3)
#define SBOX32_WARN3(pat,v0,v1,v2)
#define NOTE3(pat,v0,v1,v2)
#define SBOX32_WARN2(pat,v0,v1)
#endif
#ifndef PERL_SEEN_HV_FUNC_H
#if !defined(U32)
#include <stdint.h>
#define U32 uint32_t
#endif
#if !defined(U8)
#define U8 unsigned char
#endif
#if !defined(U16)
#define U16 uint16_t
#endif
#ifndef STRLEN
#define STRLEN int
#endif
#endif
#ifndef SBOX32_STATIC_INLINE
#ifdef PERL_STATIC_INLINE
#define SBOX32_STATIC_INLINE PERL_STATIC_INLINE
#else
#define SBOX32_STATIC_INLINE static inline
#endif
#endif
#ifndef STMT_START
#define STMT_START do
#define STMT_END while(0)
#endif
#ifndef U8TO32_LE
#define U8TO32_LE(ptr) (*((const U32 *)(ptr)))
#endif
#ifndef U8TO16_LE
#define U8TO16_LE(ptr) (*((const U16 *)(ptr)))
#endif
#ifndef SBOX32_MAX_LEN
#define SBOX32_MAX_LEN 256
#endif
#ifndef SBOX32_STATE_WORDS
#define SBOX32_STATE_WORDS (1 + (SBOX32_MAX_LEN * 256))
#define SBOX32_STATE_BYTES (SBOX32_STATE_WORDS * sizeof(U32))
#define SBOX32_STATE_BITS (SBOX32_STATE_BYTES * 8)
#endif
#define SBOX32_MIX4(v0,v1,v2,v3,text) STMT_START { \
SBOX32_WARN5("v0=%08x v1=%08x v2=%08x v3=%08x - SBOX32_MIX4 %s\n", \
(unsigned int)v0, (unsigned int)v1, \
(unsigned int)v2, (unsigned int)v3, text); \
v0 = ROTL32(v0,13) - v3; \
v1 ^= v2; \
v3 = ROTL32(v3, 9) + v1; \
v2 ^= v0; \
v0 = ROTL32(v0,14) ^ v3; \
v1 = ROTL32(v1,25) - v2; \
v3 ^= v1; \
v2 = ROTL32(v2, 4) - v0; \
} STMT_END
#define SBOX32_MIX3(v0,v1,v2,text) STMT_START { \
SBOX32_WARN4("v0=%08x v1=%08x v2=%08x - SBOX32_MIX3 %s\n", \
(unsigned int)v0,(unsigned int)v1,(unsigned int)v2, text ); \
v0 = ROTL32(v0,16) - v2; \
v1 = ROTR32(v1,13) ^ v2; \
v2 = ROTL32(v2,17) + v1; \
v0 = ROTR32(v0, 2) + v1; \
v1 = ROTR32(v1,17) - v0; \
v2 = ROTR32(v2, 7) ^ v0; \
} STMT_END
#if SBOX32_MAX_LEN > 256
#error "SBOX32_MAX_LEN is set too high!"
#elif SBOX32_MAX_LEN == 256
#define case_256_SBOX32(hash,state,key) _SBOX32_CASE(256,hash,state,key)
#else
#define case_256_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 255
#define case_255_SBOX32(hash,state,key) _SBOX32_CASE(255,hash,state,key)
#else
#define case_255_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 254
#define case_254_SBOX32(hash,state,key) _SBOX32_CASE(254,hash,state,key)
#else
#define case_254_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 253
#define case_253_SBOX32(hash,state,key) _SBOX32_CASE(253,hash,state,key)
#else
#define case_253_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 252
#define case_252_SBOX32(hash,state,key) _SBOX32_CASE(252,hash,state,key)
#else
#define case_252_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 251
#define case_251_SBOX32(hash,state,key) _SBOX32_CASE(251,hash,state,key)
#else
#define case_251_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 250
#define case_250_SBOX32(hash,state,key) _SBOX32_CASE(250,hash,state,key)
#else
#define case_250_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 249
#define case_249_SBOX32(hash,state,key) _SBOX32_CASE(249,hash,state,key)
#else
#define case_249_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 248
#define case_248_SBOX32(hash,state,key) _SBOX32_CASE(248,hash,state,key)
#else
#define case_248_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 247
#define case_247_SBOX32(hash,state,key) _SBOX32_CASE(247,hash,state,key)
#else
#define case_247_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 246
#define case_246_SBOX32(hash,state,key) _SBOX32_CASE(246,hash,state,key)
#else
#define case_246_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 245
#define case_245_SBOX32(hash,state,key) _SBOX32_CASE(245,hash,state,key)
#else
#define case_245_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 244
#define case_244_SBOX32(hash,state,key) _SBOX32_CASE(244,hash,state,key)
#else
#define case_244_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 243
#define case_243_SBOX32(hash,state,key) _SBOX32_CASE(243,hash,state,key)
#else
#define case_243_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 242
#define case_242_SBOX32(hash,state,key) _SBOX32_CASE(242,hash,state,key)
#else
#define case_242_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 241
#define case_241_SBOX32(hash,state,key) _SBOX32_CASE(241,hash,state,key)
#else
#define case_241_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 240
#define case_240_SBOX32(hash,state,key) _SBOX32_CASE(240,hash,state,key)
#else
#define case_240_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 239
#define case_239_SBOX32(hash,state,key) _SBOX32_CASE(239,hash,state,key)
#else
#define case_239_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 238
#define case_238_SBOX32(hash,state,key) _SBOX32_CASE(238,hash,state,key)
#else
#define case_238_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 237
#define case_237_SBOX32(hash,state,key) _SBOX32_CASE(237,hash,state,key)
#else
#define case_237_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 236
#define case_236_SBOX32(hash,state,key) _SBOX32_CASE(236,hash,state,key)
#else
#define case_236_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 235
#define case_235_SBOX32(hash,state,key) _SBOX32_CASE(235,hash,state,key)
#else
#define case_235_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 234
#define case_234_SBOX32(hash,state,key) _SBOX32_CASE(234,hash,state,key)
#else
#define case_234_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 233
#define case_233_SBOX32(hash,state,key) _SBOX32_CASE(233,hash,state,key)
#else
#define case_233_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 232
#define case_232_SBOX32(hash,state,key) _SBOX32_CASE(232,hash,state,key)
#else
#define case_232_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 231
#define case_231_SBOX32(hash,state,key) _SBOX32_CASE(231,hash,state,key)
#else
#define case_231_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 230
#define case_230_SBOX32(hash,state,key) _SBOX32_CASE(230,hash,state,key)
#else
#define case_230_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 229
#define case_229_SBOX32(hash,state,key) _SBOX32_CASE(229,hash,state,key)
#else
#define case_229_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 228
#define case_228_SBOX32(hash,state,key) _SBOX32_CASE(228,hash,state,key)
#else
#define case_228_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 227
#define case_227_SBOX32(hash,state,key) _SBOX32_CASE(227,hash,state,key)
#else
#define case_227_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 226
#define case_226_SBOX32(hash,state,key) _SBOX32_CASE(226,hash,state,key)
#else
#define case_226_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 225
#define case_225_SBOX32(hash,state,key) _SBOX32_CASE(225,hash,state,key)
#else
#define case_225_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 224
#define case_224_SBOX32(hash,state,key) _SBOX32_CASE(224,hash,state,key)
#else
#define case_224_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 223
#define case_223_SBOX32(hash,state,key) _SBOX32_CASE(223,hash,state,key)
#else
#define case_223_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 222
#define case_222_SBOX32(hash,state,key) _SBOX32_CASE(222,hash,state,key)
#else
#define case_222_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 221
#define case_221_SBOX32(hash,state,key) _SBOX32_CASE(221,hash,state,key)
#else
#define case_221_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 220
#define case_220_SBOX32(hash,state,key) _SBOX32_CASE(220,hash,state,key)
#else
#define case_220_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 219
#define case_219_SBOX32(hash,state,key) _SBOX32_CASE(219,hash,state,key)
#else
#define case_219_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 218
#define case_218_SBOX32(hash,state,key) _SBOX32_CASE(218,hash,state,key)
#else
#define case_218_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 217
#define case_217_SBOX32(hash,state,key) _SBOX32_CASE(217,hash,state,key)
#else
#define case_217_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 216
#define case_216_SBOX32(hash,state,key) _SBOX32_CASE(216,hash,state,key)
#else
#define case_216_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 215
#define case_215_SBOX32(hash,state,key) _SBOX32_CASE(215,hash,state,key)
#else
#define case_215_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 214
#define case_214_SBOX32(hash,state,key) _SBOX32_CASE(214,hash,state,key)
#else
#define case_214_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 213
#define case_213_SBOX32(hash,state,key) _SBOX32_CASE(213,hash,state,key)
#else
#define case_213_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 212
#define case_212_SBOX32(hash,state,key) _SBOX32_CASE(212,hash,state,key)
#else
#define case_212_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 211
#define case_211_SBOX32(hash,state,key) _SBOX32_CASE(211,hash,state,key)
#else
#define case_211_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 210
#define case_210_SBOX32(hash,state,key) _SBOX32_CASE(210,hash,state,key)
#else
#define case_210_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 209
#define case_209_SBOX32(hash,state,key) _SBOX32_CASE(209,hash,state,key)
#else
#define case_209_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 208
#define case_208_SBOX32(hash,state,key) _SBOX32_CASE(208,hash,state,key)
#else
#define case_208_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 207
#define case_207_SBOX32(hash,state,key) _SBOX32_CASE(207,hash,state,key)
#else
#define case_207_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 206
#define case_206_SBOX32(hash,state,key) _SBOX32_CASE(206,hash,state,key)
#else
#define case_206_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 205
#define case_205_SBOX32(hash,state,key) _SBOX32_CASE(205,hash,state,key)
#else
#define case_205_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 204
#define case_204_SBOX32(hash,state,key) _SBOX32_CASE(204,hash,state,key)
#else
#define case_204_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 203
#define case_203_SBOX32(hash,state,key) _SBOX32_CASE(203,hash,state,key)
#else
#define case_203_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 202
#define case_202_SBOX32(hash,state,key) _SBOX32_CASE(202,hash,state,key)
#else
#define case_202_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 201
#define case_201_SBOX32(hash,state,key) _SBOX32_CASE(201,hash,state,key)
#else
#define case_201_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 200
#define case_200_SBOX32(hash,state,key) _SBOX32_CASE(200,hash,state,key)
#else
#define case_200_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 199
#define case_199_SBOX32(hash,state,key) _SBOX32_CASE(199,hash,state,key)
#else
#define case_199_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 198
#define case_198_SBOX32(hash,state,key) _SBOX32_CASE(198,hash,state,key)
#else
#define case_198_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 197
#define case_197_SBOX32(hash,state,key) _SBOX32_CASE(197,hash,state,key)
#else
#define case_197_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 196
#define case_196_SBOX32(hash,state,key) _SBOX32_CASE(196,hash,state,key)
#else
#define case_196_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 195
#define case_195_SBOX32(hash,state,key) _SBOX32_CASE(195,hash,state,key)
#else
#define case_195_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 194
#define case_194_SBOX32(hash,state,key) _SBOX32_CASE(194,hash,state,key)
#else
#define case_194_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 193
#define case_193_SBOX32(hash,state,key) _SBOX32_CASE(193,hash,state,key)
#else
#define case_193_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 192
#define case_192_SBOX32(hash,state,key) _SBOX32_CASE(192,hash,state,key)
#else
#define case_192_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 191
#define case_191_SBOX32(hash,state,key) _SBOX32_CASE(191,hash,state,key)
#else
#define case_191_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 190
#define case_190_SBOX32(hash,state,key) _SBOX32_CASE(190,hash,state,key)
#else
#define case_190_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 189
#define case_189_SBOX32(hash,state,key) _SBOX32_CASE(189,hash,state,key)
#else
#define case_189_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 188
#define case_188_SBOX32(hash,state,key) _SBOX32_CASE(188,hash,state,key)
#else
#define case_188_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 187
#define case_187_SBOX32(hash,state,key) _SBOX32_CASE(187,hash,state,key)
#else
#define case_187_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 186
#define case_186_SBOX32(hash,state,key) _SBOX32_CASE(186,hash,state,key)
#else
#define case_186_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 185
#define case_185_SBOX32(hash,state,key) _SBOX32_CASE(185,hash,state,key)
#else
#define case_185_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 184
#define case_184_SBOX32(hash,state,key) _SBOX32_CASE(184,hash,state,key)
#else
#define case_184_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 183
#define case_183_SBOX32(hash,state,key) _SBOX32_CASE(183,hash,state,key)
#else
#define case_183_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 182
#define case_182_SBOX32(hash,state,key) _SBOX32_CASE(182,hash,state,key)
#else
#define case_182_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 181
#define case_181_SBOX32(hash,state,key) _SBOX32_CASE(181,hash,state,key)
#else
#define case_181_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 180
#define case_180_SBOX32(hash,state,key) _SBOX32_CASE(180,hash,state,key)
#else
#define case_180_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 179
#define case_179_SBOX32(hash,state,key) _SBOX32_CASE(179,hash,state,key)
#else
#define case_179_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 178
#define case_178_SBOX32(hash,state,key) _SBOX32_CASE(178,hash,state,key)
#else
#define case_178_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 177
#define case_177_SBOX32(hash,state,key) _SBOX32_CASE(177,hash,state,key)
#else
#define case_177_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 176
#define case_176_SBOX32(hash,state,key) _SBOX32_CASE(176,hash,state,key)
#else
#define case_176_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 175
#define case_175_SBOX32(hash,state,key) _SBOX32_CASE(175,hash,state,key)
#else
#define case_175_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 174
#define case_174_SBOX32(hash,state,key) _SBOX32_CASE(174,hash,state,key)
#else
#define case_174_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 173
#define case_173_SBOX32(hash,state,key) _SBOX32_CASE(173,hash,state,key)
#else
#define case_173_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 172
#define case_172_SBOX32(hash,state,key) _SBOX32_CASE(172,hash,state,key)
#else
#define case_172_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 171
#define case_171_SBOX32(hash,state,key) _SBOX32_CASE(171,hash,state,key)
#else
#define case_171_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 170
#define case_170_SBOX32(hash,state,key) _SBOX32_CASE(170,hash,state,key)
#else
#define case_170_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 169
#define case_169_SBOX32(hash,state,key) _SBOX32_CASE(169,hash,state,key)
#else
#define case_169_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 168
#define case_168_SBOX32(hash,state,key) _SBOX32_CASE(168,hash,state,key)
#else
#define case_168_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 167
#define case_167_SBOX32(hash,state,key) _SBOX32_CASE(167,hash,state,key)
#else
#define case_167_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 166
#define case_166_SBOX32(hash,state,key) _SBOX32_CASE(166,hash,state,key)
#else
#define case_166_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 165
#define case_165_SBOX32(hash,state,key) _SBOX32_CASE(165,hash,state,key)
#else
#define case_165_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 164
#define case_164_SBOX32(hash,state,key) _SBOX32_CASE(164,hash,state,key)
#else
#define case_164_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 163
#define case_163_SBOX32(hash,state,key) _SBOX32_CASE(163,hash,state,key)
#else
#define case_163_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 162
#define case_162_SBOX32(hash,state,key) _SBOX32_CASE(162,hash,state,key)
#else
#define case_162_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 161
#define case_161_SBOX32(hash,state,key) _SBOX32_CASE(161,hash,state,key)
#else
#define case_161_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 160
#define case_160_SBOX32(hash,state,key) _SBOX32_CASE(160,hash,state,key)
#else
#define case_160_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 159
#define case_159_SBOX32(hash,state,key) _SBOX32_CASE(159,hash,state,key)
#else
#define case_159_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 158
#define case_158_SBOX32(hash,state,key) _SBOX32_CASE(158,hash,state,key)
#else
#define case_158_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 157
#define case_157_SBOX32(hash,state,key) _SBOX32_CASE(157,hash,state,key)
#else
#define case_157_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 156
#define case_156_SBOX32(hash,state,key) _SBOX32_CASE(156,hash,state,key)
#else
#define case_156_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 155
#define case_155_SBOX32(hash,state,key) _SBOX32_CASE(155,hash,state,key)
#else
#define case_155_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 154
#define case_154_SBOX32(hash,state,key) _SBOX32_CASE(154,hash,state,key)
#else
#define case_154_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 153
#define case_153_SBOX32(hash,state,key) _SBOX32_CASE(153,hash,state,key)
#else
#define case_153_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 152
#define case_152_SBOX32(hash,state,key) _SBOX32_CASE(152,hash,state,key)
#else
#define case_152_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 151
#define case_151_SBOX32(hash,state,key) _SBOX32_CASE(151,hash,state,key)
#else
#define case_151_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 150
#define case_150_SBOX32(hash,state,key) _SBOX32_CASE(150,hash,state,key)
#else
#define case_150_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 149
#define case_149_SBOX32(hash,state,key) _SBOX32_CASE(149,hash,state,key)
#else
#define case_149_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 148
#define case_148_SBOX32(hash,state,key) _SBOX32_CASE(148,hash,state,key)
#else
#define case_148_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 147
#define case_147_SBOX32(hash,state,key) _SBOX32_CASE(147,hash,state,key)
#else
#define case_147_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 146
#define case_146_SBOX32(hash,state,key) _SBOX32_CASE(146,hash,state,key)
#else
#define case_146_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 145
#define case_145_SBOX32(hash,state,key) _SBOX32_CASE(145,hash,state,key)
#else
#define case_145_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 144
#define case_144_SBOX32(hash,state,key) _SBOX32_CASE(144,hash,state,key)
#else
#define case_144_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 143
#define case_143_SBOX32(hash,state,key) _SBOX32_CASE(143,hash,state,key)
#else
#define case_143_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 142
#define case_142_SBOX32(hash,state,key) _SBOX32_CASE(142,hash,state,key)
#else
#define case_142_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 141
#define case_141_SBOX32(hash,state,key) _SBOX32_CASE(141,hash,state,key)
#else
#define case_141_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 140
#define case_140_SBOX32(hash,state,key) _SBOX32_CASE(140,hash,state,key)
#else
#define case_140_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 139
#define case_139_SBOX32(hash,state,key) _SBOX32_CASE(139,hash,state,key)
#else
#define case_139_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 138
#define case_138_SBOX32(hash,state,key) _SBOX32_CASE(138,hash,state,key)
#else
#define case_138_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 137
#define case_137_SBOX32(hash,state,key) _SBOX32_CASE(137,hash,state,key)
#else
#define case_137_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 136
#define case_136_SBOX32(hash,state,key) _SBOX32_CASE(136,hash,state,key)
#else
#define case_136_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 135
#define case_135_SBOX32(hash,state,key) _SBOX32_CASE(135,hash,state,key)
#else
#define case_135_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 134
#define case_134_SBOX32(hash,state,key) _SBOX32_CASE(134,hash,state,key)
#else
#define case_134_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 133
#define case_133_SBOX32(hash,state,key) _SBOX32_CASE(133,hash,state,key)
#else
#define case_133_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 132
#define case_132_SBOX32(hash,state,key) _SBOX32_CASE(132,hash,state,key)
#else
#define case_132_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 131
#define case_131_SBOX32(hash,state,key) _SBOX32_CASE(131,hash,state,key)
#else
#define case_131_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 130
#define case_130_SBOX32(hash,state,key) _SBOX32_CASE(130,hash,state,key)
#else
#define case_130_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 129
#define case_129_SBOX32(hash,state,key) _SBOX32_CASE(129,hash,state,key)
#else
#define case_129_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 128
#define case_128_SBOX32(hash,state,key) _SBOX32_CASE(128,hash,state,key)
#else
#define case_128_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 127
#define case_127_SBOX32(hash,state,key) _SBOX32_CASE(127,hash,state,key)
#else
#define case_127_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 126
#define case_126_SBOX32(hash,state,key) _SBOX32_CASE(126,hash,state,key)
#else
#define case_126_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 125
#define case_125_SBOX32(hash,state,key) _SBOX32_CASE(125,hash,state,key)
#else
#define case_125_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 124
#define case_124_SBOX32(hash,state,key) _SBOX32_CASE(124,hash,state,key)
#else
#define case_124_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 123
#define case_123_SBOX32(hash,state,key) _SBOX32_CASE(123,hash,state,key)
#else
#define case_123_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 122
#define case_122_SBOX32(hash,state,key) _SBOX32_CASE(122,hash,state,key)
#else
#define case_122_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 121
#define case_121_SBOX32(hash,state,key) _SBOX32_CASE(121,hash,state,key)
#else
#define case_121_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 120
#define case_120_SBOX32(hash,state,key) _SBOX32_CASE(120,hash,state,key)
#else
#define case_120_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 119
#define case_119_SBOX32(hash,state,key) _SBOX32_CASE(119,hash,state,key)
#else
#define case_119_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 118
#define case_118_SBOX32(hash,state,key) _SBOX32_CASE(118,hash,state,key)
#else
#define case_118_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 117
#define case_117_SBOX32(hash,state,key) _SBOX32_CASE(117,hash,state,key)
#else
#define case_117_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 116
#define case_116_SBOX32(hash,state,key) _SBOX32_CASE(116,hash,state,key)
#else
#define case_116_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 115
#define case_115_SBOX32(hash,state,key) _SBOX32_CASE(115,hash,state,key)
#else
#define case_115_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 114
#define case_114_SBOX32(hash,state,key) _SBOX32_CASE(114,hash,state,key)
#else
#define case_114_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 113
#define case_113_SBOX32(hash,state,key) _SBOX32_CASE(113,hash,state,key)
#else
#define case_113_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 112
#define case_112_SBOX32(hash,state,key) _SBOX32_CASE(112,hash,state,key)
#else
#define case_112_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 111
#define case_111_SBOX32(hash,state,key) _SBOX32_CASE(111,hash,state,key)
#else
#define case_111_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 110
#define case_110_SBOX32(hash,state,key) _SBOX32_CASE(110,hash,state,key)
#else
#define case_110_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 109
#define case_109_SBOX32(hash,state,key) _SBOX32_CASE(109,hash,state,key)
#else
#define case_109_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 108
#define case_108_SBOX32(hash,state,key) _SBOX32_CASE(108,hash,state,key)
#else
#define case_108_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 107
#define case_107_SBOX32(hash,state,key) _SBOX32_CASE(107,hash,state,key)
#else
#define case_107_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 106
#define case_106_SBOX32(hash,state,key) _SBOX32_CASE(106,hash,state,key)
#else
#define case_106_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 105
#define case_105_SBOX32(hash,state,key) _SBOX32_CASE(105,hash,state,key)
#else
#define case_105_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 104
#define case_104_SBOX32(hash,state,key) _SBOX32_CASE(104,hash,state,key)
#else
#define case_104_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 103
#define case_103_SBOX32(hash,state,key) _SBOX32_CASE(103,hash,state,key)
#else
#define case_103_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 102
#define case_102_SBOX32(hash,state,key) _SBOX32_CASE(102,hash,state,key)
#else
#define case_102_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 101
#define case_101_SBOX32(hash,state,key) _SBOX32_CASE(101,hash,state,key)
#else
#define case_101_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 100
#define case_100_SBOX32(hash,state,key) _SBOX32_CASE(100,hash,state,key)
#else
#define case_100_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 99
#define case_99_SBOX32(hash,state,key) _SBOX32_CASE(99,hash,state,key)
#else
#define case_99_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 98
#define case_98_SBOX32(hash,state,key) _SBOX32_CASE(98,hash,state,key)
#else
#define case_98_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 97
#define case_97_SBOX32(hash,state,key) _SBOX32_CASE(97,hash,state,key)
#else
#define case_97_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 96
#define case_96_SBOX32(hash,state,key) _SBOX32_CASE(96,hash,state,key)
#else
#define case_96_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 95
#define case_95_SBOX32(hash,state,key) _SBOX32_CASE(95,hash,state,key)
#else
#define case_95_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 94
#define case_94_SBOX32(hash,state,key) _SBOX32_CASE(94,hash,state,key)
#else
#define case_94_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 93
#define case_93_SBOX32(hash,state,key) _SBOX32_CASE(93,hash,state,key)
#else
#define case_93_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 92
#define case_92_SBOX32(hash,state,key) _SBOX32_CASE(92,hash,state,key)
#else
#define case_92_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 91
#define case_91_SBOX32(hash,state,key) _SBOX32_CASE(91,hash,state,key)
#else
#define case_91_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 90
#define case_90_SBOX32(hash,state,key) _SBOX32_CASE(90,hash,state,key)
#else
#define case_90_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 89
#define case_89_SBOX32(hash,state,key) _SBOX32_CASE(89,hash,state,key)
#else
#define case_89_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 88
#define case_88_SBOX32(hash,state,key) _SBOX32_CASE(88,hash,state,key)
#else
#define case_88_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 87
#define case_87_SBOX32(hash,state,key) _SBOX32_CASE(87,hash,state,key)
#else
#define case_87_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 86
#define case_86_SBOX32(hash,state,key) _SBOX32_CASE(86,hash,state,key)
#else
#define case_86_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 85
#define case_85_SBOX32(hash,state,key) _SBOX32_CASE(85,hash,state,key)
#else
#define case_85_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 84
#define case_84_SBOX32(hash,state,key) _SBOX32_CASE(84,hash,state,key)
#else
#define case_84_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 83
#define case_83_SBOX32(hash,state,key) _SBOX32_CASE(83,hash,state,key)
#else
#define case_83_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 82
#define case_82_SBOX32(hash,state,key) _SBOX32_CASE(82,hash,state,key)
#else
#define case_82_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 81
#define case_81_SBOX32(hash,state,key) _SBOX32_CASE(81,hash,state,key)
#else
#define case_81_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 80
#define case_80_SBOX32(hash,state,key) _SBOX32_CASE(80,hash,state,key)
#else
#define case_80_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 79
#define case_79_SBOX32(hash,state,key) _SBOX32_CASE(79,hash,state,key)
#else
#define case_79_SBOX32(hash,state,key) /**/
#endif
#if SBOX32_MAX_LEN >= 78
#define case_78_SBOX32(hash,state,key) _SBOX32_CASE(78,hash,state,key)
#else
#define case_78_SBOX32(hash,state,key) /**/
#endif