1 /*
2 Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni,
3 Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby
4 denoted as "the implementer".
5 
6 For more information, feedback or questions, please refer to our websites:
7 http://keccak.noekeon.org/
8 http://keyak.noekeon.org/
9 http://ketje.noekeon.org/
10 
11 To the extent possible under law, the implementer has waived all copyright
12 and related or neighboring rights to the source code in this file.
13 http://creativecommons.org/publicdomain/zero/1.0/
14 */
15 
16 #include "KeccakSponge.h"
17 
18 #ifdef KeccakReference
19     #include "displayIntermediateValues.h"
20 #endif
21 
22 #ifndef KeccakP200_excluded
23     #include "KeccakP-200-SnP.h"
24 
25     #define prefix KeccakWidth200
26     #define SnP KeccakP200
27     #define SnP_width 200
28     #define SnP_Permute KeccakP200_Permute_18rounds
29     #if defined(KeccakF200_FastLoop_supported)
30         #define SnP_FastLoop_Absorb KeccakF200_FastLoop_Absorb
31     #endif
32         #include "KeccakSponge.inc"
33     #undef prefix
34     #undef SnP
35     #undef SnP_width
36     #undef SnP_Permute
37     #undef SnP_FastLoop_Absorb
38 #endif
39 
40 #ifndef KeccakP400_excluded
41     #include "KeccakP-400-SnP.h"
42 
43     #define prefix KeccakWidth400
44     #define SnP KeccakP400
45     #define SnP_width 400
46     #define SnP_Permute KeccakP400_Permute_20rounds
47     #if defined(KeccakF400_FastLoop_supported)
48         #define SnP_FastLoop_Absorb KeccakF400_FastLoop_Absorb
49     #endif
50         #include "KeccakSponge.inc"
51     #undef prefix
52     #undef SnP
53     #undef SnP_width
54     #undef SnP_Permute
55     #undef SnP_FastLoop_Absorb
56 #endif
57 
58 #ifndef KeccakP800_excluded
59     #include "KeccakP-800-SnP.h"
60 
61     #define prefix KeccakWidth800
62     #define SnP KeccakP800
63     #define SnP_width 800
64     #define SnP_Permute KeccakP800_Permute_22rounds
65     #if defined(KeccakF800_FastLoop_supported)
66         #define SnP_FastLoop_Absorb KeccakF800_FastLoop_Absorb
67     #endif
68         #include "KeccakSponge.inc"
69     #undef prefix
70     #undef SnP
71     #undef SnP_width
72     #undef SnP_Permute
73     #undef SnP_FastLoop_Absorb
74 #endif
75 
76 #ifndef KeccakP1600_excluded
77     #include "KeccakP-1600-SnP.h"
78 
79     #define prefix KeccakWidth1600
80     #define SnP KeccakP1600
81     #define SnP_width 1600
82     #define SnP_Permute KeccakP1600_Permute_24rounds
83     #if defined(KeccakF1600_FastLoop_supported)
84         #define SnP_FastLoop_Absorb KeccakF1600_FastLoop_Absorb
85     #endif
86         #include "KeccakSponge.inc"
87     #undef prefix
88     #undef SnP
89     #undef SnP_width
90     #undef SnP_Permute
91     #undef SnP_FastLoop_Absorb
92 #endif
93 
94 #ifndef KeccakP1600_excluded
95     #include "KeccakP-1600-SnP.h"
96 
97     #define prefix KeccakWidth1600_12rounds
98     #define SnP KeccakP1600
99     #define SnP_width 1600
100     #define SnP_Permute KeccakP1600_Permute_12rounds
101     #if defined(KeccakP1600_12rounds_FastLoop_supported)
102         #define SnP_FastLoop_Absorb KeccakP1600_12rounds_FastLoop_Absorb
103     #endif
104         #include "KeccakSponge.inc"
105     #undef prefix
106     #undef SnP
107     #undef SnP_width
108     #undef SnP_Permute
109     #undef SnP_FastLoop_Absorb
110 #endif
111