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