forked from XKCP/XKCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.build
230 lines (193 loc) · 11.7 KB
/
Makefile.build
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
<?xml version="1.0"?>
<!--
Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
hereby denoted as "the implementer".
For more information, feedback or questions, please refer to our website:
https://keccak.team/
To the extent possible under law, the implementer has waived all copyright
and related or neighboring rights to the source code in this file.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<build all="all" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="lib/HighLevel.build"/>
<xi:include href="lib/LowLevel.build"/>
<xi:include href="lib/Ketje.build"/>
<xi:include href="lib/Keyak.build"/>
<xi:include href="tests/SUPERCOP/SUPERCOP.build"/>
<xi:include href="tests/NIST_LWC/NIST_LWC.build"/>
<xi:include href="doc/HOWTO-customize.build"/>
<!-- For the name of the targets, please see the end of this file. -->
<fragment name="common">
<h>lib/common/align.h</h>
<h>lib/common/brg_endian.h</h>
</fragment>
<!-- *** Utilities *** -->
<!-- To run many tests -->
<fragment name="KeccakTests" inherits="All">
<c>tests/UnitTests/main.c</c>
<c>tests/UnitTests/testSnP.c</c>
<h>tests/UnitTests/testSnP.inc</h>
<h>tests/UnitTests/testSnP.h</h>
<c>tests/UnitTests/testPlSnP.c</c>
<h>tests/UnitTests/testPlSnP.inc</h>
<h>tests/UnitTests/testPlSnP.h</h>
<c>tests/UnitTests/testSponge.c</c>
<h>tests/UnitTests/testSponge.inc</h>
<h>tests/UnitTests/testSponge.h</h>
<c>tests/UnitTests/testDuplex.c</c>
<h>tests/UnitTests/testDuplex.inc</h>
<h>tests/UnitTests/testDuplex.h</h>
<c>tests/UnitTests/testMotorist.c</c>
<h>tests/UnitTests/testMotorist.inc</h>
<h>tests/UnitTests/testMotorist.h</h>
<c>tests/UnitTests/testKeyakv2.c</c>
<h>tests/UnitTests/testKeyakv2.inc</h>
<h>tests/UnitTests/testKeyakv2.h</h>
<c>tests/UnitTests/testKetjev2.c</c>
<h>tests/UnitTests/testKetjev2.h</h>
<h>tests/UnitTests/testKetjev2.inc</h>
<c>tests/UnitTests/genKAT.c</c>
<h>tests/UnitTests/genKAT.h</h>
<c>tests/UnitTests/testPerformance.c</c>
<h>tests/UnitTests/timing.h</h>
<h>tests/UnitTests/testPerformance.h</h>
<h>tests/UnitTests/timingSnP.inc</h>
<h>tests/UnitTests/timingPlSnP.inc</h>
<h>tests/UnitTests/timingSponge.inc</h>
<h>tests/UnitTests/timingKeyak.inc</h>
<c>tests/UnitTests/testKeccakPRG.c</c>
<h>tests/UnitTests/testKeccakPRG.inc</h>
<h>tests/UnitTests/testKeccakPRG.h</h>
<c>tests/UnitTests/testKangarooTwelve.c</c>
<h>tests/UnitTests/testKangarooTwelve.h</h>
<c>tests/UnitTests/testKravatte.c</c>
<h>tests/UnitTests/testKravatte.h</h>
<c>tests/UnitTests/testKravatteModes.c</c>
<h>tests/UnitTests/testKravatteModes.h</h>
<c>tests/UnitTests/testSP800-185.c</c>
<h>tests/UnitTests/testSP800-185.h</h>
<gcc>-lm</gcc>
</fragment>
<!-- To compute a hash of a file -->
<fragment name="KeccakSum" inherits="FIPS202 SP800-185 KangarooTwelve">
<c>util/KeccakSum/KeccakSum.c</c>
<c>util/KeccakSum/base64.c</c>
<h>util/KeccakSum/base64.h</h>
</fragment>
<!-- To make a library -->
<fragment name="libkeccak.a" inherits="All"/>
<fragment name="libkeccak.so" inherits="All"/>
<!-- *** CAESAR-related targets *** -->
<fragment name="crypto_aead_test">
<h>tests/SUPERCOP/test_crypto_aead.h</h>
<c>tests/SUPERCOP/test_crypto_aead.c</c>
</fragment>
<!-- *** Xoo *** -->
<fragment name="XooTests" inherits="XooAll">
<c>tests/UnitTests/testXooMain.c</c>
<c>tests/UnitTests/testXooSnP.c</c>
<h>tests/UnitTests/testXooSnP.inc</h>
<h>tests/UnitTests/testXooSnP.h</h>
<c>tests/UnitTests/testXooPlSnP.c</c>
<h>tests/UnitTests/testXooPlSnP.inc</h>
<h>tests/UnitTests/testXooPlSnP.h</h>
<c>tests/UnitTests/testXoofff.c</c>
<h>tests/UnitTests/testXoofff.h</h>
<c>tests/UnitTests/testXoofffModes.c</c>
<h>tests/UnitTests/testXoofffModes.h</h>
<c>tests/UnitTests/testXoodyak.c</c>
<h>tests/UnitTests/testXoodyak.h</h>
<c>tests/UnitTests/testXooPerformance.c</c>
<h>tests/UnitTests/testXooPerformance.h</h>
<h>tests/UnitTests/timing.h</h>
<h>tests/UnitTests/timingXooSnP.inc</h>
<h>tests/UnitTests/timingXooPlSnP.inc</h>
<h>lib/low/common/SnP-Relaned.h</h>
<c>lib/high/Keccak/KeccakSpongeWidth1600.c</c>
<h>lib/high/Keccak/KeccakSpongeWidth1600.h</h>
<gcc>-lm</gcc>
</fragment>
<!-- To make a library -->
<fragment name="libXoo.a" inherits="XooAll"/>
<fragment name="libXoo.so" inherits="XooAll"/>
<!-- *** Targets *** -->
<fragment name="serial-fallbacks" inherits="1600times2on1 1600times4on1 1600times8on1"/>
<!-- Reference implementations -->
<fragment name="reference" inherits="reference200 reference400 reference800 reference1600 serial-fallbacks Ket-SnP XooReference XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1">
<c>tests/UnitTests/displayIntermediateValues.c</c>
<h>tests/UnitTests/displayIntermediateValues.h</h>
<define>KeccakReference</define>
<gcc>-O</gcc>
</fragment>
<!-- Reference implementations dedicated to 32-bit platforms
(i.e., featuring bit interleaving for Keccak-p[1600]) -->
<fragment name="reference32bits" inherits="reference200 reference400 reference800 reference1600-32bits serial-fallbacks Ket-SnP">
<c>tests/UnitTests/displayIntermediateValues.c</c>
<h>tests/UnitTests/displayIntermediateValues.h</h>
<define>KeccakReference</define>
<define>KeccakReference32BI</define>
<gcc>-O</gcc>
</fragment>
<!-- Compact implementations -->
<fragment name="compact" inherits="compact200 reference400 compact800 compact1600 serial-fallbacks Ket-SnP"/>
<!-- Generically optimized 32-bit implementations -->
<fragment name="generic32" inherits="no_parallel reference200 reference400 optimized800u2 inplace1600bi serial-fallbacks Ket-SnP XooOptimized32 XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Generically optimized 32-bit implementations, featuring lane complementing -->
<fragment name="generic32lc" inherits="reference200 reference400 optimized800lcu2 inplace1600bi serial-fallbacks Ket-SnP"/>
<!-- Generically optimized 64-bit implementations -->
<fragment name="generic64" inherits="reference200 reference400 optimized800ufull optimized1600ufull serial-fallbacks Ket-SnP"/>
<!-- Generically optimized 64-bit implementations, featuring lane complementing -->
<fragment name="generic64lc" inherits="reference200 reference400 optimized800lcufull optimized1600lcufull serial-fallbacks Ket-SnP"/>
<!-- Assembler optimized 64-bit implementations -->
<fragment name="asmX86-64" inherits="reference200 reference400 reference800 optimized1600AsmX86-64 serial-fallbacks Ket-SnP"/>
<!-- Assembler optimized 64-bit implementations -->
<fragment name="asmX86-64shld" inherits="reference200 reference400 reference800 optimized1600AsmX86-64shld serial-fallbacks Ket-SnP"/>
<!-- Implementations selected for the Nehalem microarchitecture -->
<fragment name="Nehalem" inherits="reference200 reference400 optimized800lcufull optimized1600lcufull SIMD128-SSE2u2 1600times4on2 1600times8on2 Ket-SnP XooOptimizedSIMD128 XooOptimizedTimes4_SIMD128 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Implementations selected for the Sandy Bridge microarchitecture -->
<fragment name="SandyBridge" inherits="reference200 reference400 optimized800lcufull optimized1600lcufullshld SIMD128-SSE2ufull 1600times4on2 1600times8on2 Ket-SnP"/>
<!-- Implementations selected for the Bulldozer microarchitecture -->
<fragment name="Bulldozer" inherits="reference200 reference400 optimized800lcufull optimized1600XOPufull SIMD128-XOPufull 1600times4on2 1600times8on2 Ket-SnP"/>
<!-- Implementations selected for the Haswell and Skylake microarchitectures -->
<fragment name="Haswell" inherits="reference200 reference400 optimized800lcufull optimized1600AVX2 SIMD128-SSE2u2 SIMD256-AVX2u12 1600times8on4 Ket-SnP XooOptimizedSIMD128 XooOptimizedTimes4_SIMD128 XooOptimizedTimes8_AVX2 XooOptimizedTimes16_On1"/>
<!-- Implementations selected for the SkylakeX microarchitecture -->
<fragment name="SkylakeX" inherits="reference200 reference400 optimized800lcufull optimized1600AVX512a SIMD512-2-AVX512u12 SIMD512-4-AVX512u12 SIMD512-8-AVX512u12 Ket-SnP XooOptimizedSIMD512 XooOptimizedTimes4_AVX512 XooOptimizedTimes8_AVX512 XooOptimizedTimes16_AVX512"/>
<!-- Implementations selected for ARMv6 -->
<fragment name="ARMv6" inherits="optimized200ARMv6M optimized400ARMv6M optimized800ARMv6Mu2 optimized1600ARMv6Mu2 serial-fallbacks Ket-optimizedLE XooOptimizedARMv6 XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Implementations selected for ARMv6M -->
<fragment name="ARMv6M" inherits="optimized200ARMv6M optimized400ARMv6M optimized800ARMv6Mu2 optimized1600ARMv6Mu2 serial-fallbacks Ket-optimizedLE XooOptimizedARMv6M XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Implementations selected for ARMv7M -->
<fragment name="ARMv7M" inherits="optimized200ARMv7M optimized400ARMv7M optimized800ARMv7Mu2 inplace1600ARMv7M serial-fallbacks Ket-ARMv7M XooOptimizedARMv7M XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Implementations selected for ARMv7A -->
<fragment name="ARMv7A" inherits="reference200 reference400 optimized800ARMv7Au2 optimized1600ARMv7A 1600times2ARMV7A 1600times4on2 1600times8on2 Ket-optimizedLE XooOptimizedARMv7A XooOptimizedTimes4_ARMv7A XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/> <!-- XooOptimizedTimes4_On1 -->
<!-- Implementations selected for ARMv8A -->
<fragment name="ARMv8A" inherits="reference200 reference400 optimized800ARMv8A optimized1600ARMv8A serial-fallbacks Ket-optimizedLE"/>
<!-- Implementations selected for 8-bit AVR -->
<fragment name="AVR8" inherits="optimized200AVR8 optimized400AVR8 optimized800AVR8 optimized1600AVR8 serial-fallbacks Ket-SnP XooOptimizedAVR8 XooOptimizedTimes4_On1 XooOptimizedTimes8_On1 XooOptimizedTimes16_On1"/>
<!-- Target names are of the form x/y where x is taken from the first set and y from the second set. -->
<group all="Keccak">
<product delimiter="/">
<factor set="reference reference32bits compact generic32 generic32lc generic64 generic64lc asmX86-64 asmX86-64shld Nehalem SandyBridge Bulldozer Haswell SkylakeX ARMv6 ARMv6M ARMv7M ARMv7A ARMv8A AVR8"/>
<factor set="KeccakTests KeccakSum libkeccak.a libkeccak.so"/>
</product>
</group>
<!-- Reference implementations -->
<fragment name="Xreference" inherits="XooReference no_parallel">
<define>XooReference</define>
<gcc>-O</gcc>
</fragment>
<fragment name="Xoptimized32" inherits="XooOptimized32 no_parallel"/>
<group all="Xoodoo">
<product delimiter="/">
<factor set="reference generic32 Nehalem Haswell SkylakeX ARMv6 ARMv6M ARMv7M ARMv7A AVR8"/>
<factor set="XooTests libXoo.a libXoo.so"/>
</product>
</group>
<group all="Xoodyak">
<product delimiter="/">
<factor set="Xreference Xoptimized32 XSIMD128 XSIMD512 XARMv6M XARMv7M"/>
<factor set="Xoodyak_aead_kat Xoodyak_hash_kat Xoodyak_aead_pack Xoodyak_hash_pack"/>
</product>
</group>
</build>