forked from XKCP/XKCP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.build
200 lines (168 loc) · 10.3 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
<?xml version="1.0"?>
<!--
The eXtended Keccak Code Package (XKCP)
https://github.com/XKCP/XKCP
Implementation by Gilles Van Assche and Ronny Van Keer, hereby denoted as "the implementer".
For more information, feedback or questions, please refer to the Keccak Team 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="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 *** -->
<!-- The unit tests -->
<fragment name="UT" inherits="common">
<c>tests/UnitTests/main.c</c>
<c>tests/UnitTests/UT.c</c>
<h>tests/UnitTests/UT.h</h>
<c>tests/UnitTests/testPermutations.c</c>
<h>tests/UnitTests/testPermutations.h</h>
<inc>tests/UnitTests/testSnP.inc</inc>
<inc>tests/UnitTests/testPlSnP.inc</inc>
<c>tests/UnitTests/testSponge.c</c>
<inc>tests/UnitTests/testSponge.inc</inc>
<h>tests/UnitTests/testSponge.h</h>
<c>tests/UnitTests/testDuplex.c</c>
<inc>tests/UnitTests/testDuplex.inc</inc>
<h>tests/UnitTests/testDuplex.h</h>
<c>tests/UnitTests/testMotorist.c</c>
<inc>tests/UnitTests/testMotorist.inc</inc>
<h>tests/UnitTests/testMotorist.h</h>
<c>tests/UnitTests/testKeyakv2.c</c>
<inc>tests/UnitTests/testKeyakv2.inc</inc>
<h>tests/UnitTests/testKeyakv2.h</h>
<c>tests/UnitTests/testKetjev2.c</c>
<h>tests/UnitTests/testKetjev2.h</h>
<inc>tests/UnitTests/testKetjev2.inc</inc>
<c>tests/UnitTests/genKAT.c</c>
<h>tests/UnitTests/genKAT.h</h>
<c>tests/UnitTests/testPRG.c</c>
<inc>tests/UnitTests/testPRG.inc</inc>
<h>tests/UnitTests/testPRG.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>
<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>
</fragment>
<fragment name="UnitTests" inherits="All UT"/>
<!-- The benchmarking tool -->
<fragment name="BM" inherits="common">
<c>tests/Benchmarks/main.c</c>
<c>tests/Benchmarks/testPerformance.c</c>
<c>tests/Benchmarks/timing.c</c>
<h>tests/Benchmarks/timing.h</h>
<h>tests/Benchmarks/testPerformance.h</h>
<inc>tests/Benchmarks/timingSnP.inc</inc>
<inc>tests/Benchmarks/timingPlSnP.inc</inc>
<inc>tests/Benchmarks/timingSponge.inc</inc>
<inc>tests/Benchmarks/timingKeyak.inc</inc>
<c>tests/Benchmarks/testXooPerformance.c</c>
<h>tests/Benchmarks/testXooPerformance.h</h>
<inc>tests/Benchmarks/timingXooSnP.inc</inc>
<inc>tests/Benchmarks/timingXooPlSnP.inc</inc>
<gcc>-lm</gcc>
</fragment>
<fragment name="Benchmarks" inherits="All BM"/>
<!-- 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="libXKCP.a" inherits="All"/>
<fragment name="libXKCP.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>
<!-- *** Targets *** -->
<fragment name="serial-fallbacks" inherits="K1600x2-on1 K1600x4-on1 K1600x8-on1 Xoodoox4-on1 Xoodoox8-on1 Xoodoox16-on1"/>
<!-- Reference implementations -->
<fragment name="reference" inherits="K200-ref K400-ref K800-ref K1600-ref-64bits serial-fallbacks Ket-SnP Xoodoo-ref">
<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="K200-ref K400-ref K800-ref K1600-ref-32bits serial-fallbacks Ket-SnP Xoodoo-ref">
<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="K200-compact K400-ref K800-compact K1600-compact serial-fallbacks Ket-SnP Xoodoo-plain-ua"/>
<!-- Generically optimized 32-bit implementations -->
<fragment name="generic32" inherits="K200-ref K400-ref K800-plain-u2 K1600-plain-32bits-inplace serial-fallbacks Ket-SnP Xoodoo-plain-ua"/>
<!-- Generically optimized 32-bit implementations, featuring lane complementing -->
<fragment name="generic32lc" inherits="K200-ref K400-ref K800-plain-lcu2 K1600-plain-32bits-inplace serial-fallbacks Ket-SnP Xoodoo-plain-ua"/>
<!-- Generically optimized 64-bit implementations -->
<fragment name="generic64" inherits="K200-ref K400-ref K800-plain-ua K1600-plain-64bits-ua serial-fallbacks Ket-SnP Xoodoo-plain-ua"/>
<!-- Generically optimized 64-bit implementations, featuring lane complementing -->
<fragment name="generic64lc" inherits="K200-ref K400-ref K800-plain-lcua K1600-plain-64bits-lcua serial-fallbacks Ket-SnP Xoodoo-plain-ua"/>
<!-- Implementations selected for the processors that support the SSSE3 instruction set -->
<fragment name="SSSE3" inherits="K200-ref K400-ref K800-plain-lcua K1600-plain-64bits-lcua K1600x2-SSSE3-u2 K1600x4-on2 K1600x8-on2 Ket-SnP Xoodoo-SSE2 Xoodoox4-SSSE3 Xoodoox8-on1 Xoodoox16-on1"/>
<!-- Implementations selected for processors that support the AVX instruction set (e.g., Sandy Bridge microarchitectures) -->
<fragment name="AVX" inherits="K200-ref K400-ref K800-plain-lcua K1600-plain-64bits-lcua-shld K1600x2-SSSE3-ua K1600x4-on2 K1600x8-on2 Ket-SnP Xoodoo-SSE2 Xoodoox4-SSSE3 Xoodoox8-on1 Xoodoox16-on1">
<msvc>/arch:AVX</msvc>
</fragment>
<!-- Implementations selected for processors that support the XOP instruction set (e.g., Bulldozer microarchitecture) -->
<fragment name="XOP" inherits="K200-ref K400-ref K800-plain-lcua K1600-XOP-ua K1600x2-XOP-ua K1600x4-on2 K1600x8-on2 Ket-SnP Xoodoo-SSE2 Xoodoox4-SSSE3 Xoodoox8-on1 Xoodoox16-on1"/>
<!-- Implementations selected for processors that support the AVX2 instruction set (e.g., Haswell and Skylake microarchitectures) -->
<fragment name="AVX2" inherits="K200-ref K400-ref K800-plain-ua K1600-AVX2 K1600x2-SSSE3-u2 K1600x4-AVX2-u12 K1600x8-on4 Ket-SnP Xoodoo-SSE2 Xoodoox4-SSSE3 Xoodoox8-AVX2 Xoodoox16-on1"/>
<!-- Same, but without the assembly file (for MS Visual Studio) -->
<fragment name="AVX2noAsm" inherits="K200-ref K400-ref K800-plain-ua K1600-plain-64bits-ua K1600x2-SSSE3-u2 K1600x4-AVX2-u12 K1600x8-on4 Ket-SnP Xoodoo-SSE2 Xoodoox4-SSSE3 Xoodoox8-AVX2 Xoodoox16-on1">
<msvc>/arch:AVX2</msvc>
</fragment>
<!-- Implementations selected for the processors that support the AVX-512 instruction set (e.g., SkylakeX microarchitecture) -->
<fragment name="AVX512" inherits="K200-ref K400-ref K800-plain-ua K1600-AVX512 K1600x2-AVX512-u12 K1600x4-AVX512-u12 K1600x8-AVX512-u12 Ket-SnP Xoodoo-AVX512 Xoodoox4-AVX512 Xoodoox8-AVX512 Xoodoox16-AVX512"/>
<!-- Same, but without the assembly file (for MS Visual Studio) -->
<fragment name="AVX512noAsm" inherits="K200-ref K400-ref K800-plain-ua K1600-AVX512-C K1600x2-AVX512-u12 K1600x4-AVX512-u12 K1600x8-AVX512-u12 Ket-SnP Xoodoo-AVX512 Xoodoox4-AVX512 Xoodoox8-AVX512 Xoodoox16-AVX512">
<msvc>/arch:AVX512</msvc>
</fragment>
<!-- Implementations selected for ARMv6 -->
<fragment name="ARMv6" inherits="K200-ARMv6M K400-ARMv6M K800-ARMv6M-u2 K1600-ARMv6M-u2 serial-fallbacks Ket-SnP Xoodoo-ARMv6"/>
<!-- Implementations selected for ARMv6M -->
<fragment name="ARMv6M" inherits="K200-ARMv6M K400-ARMv6M K800-ARMv6M-u2 K1600-ARMv6M-u2 serial-fallbacks Ket-SnP Xoodoo-ARMv6M"/>
<!-- Implementations selected for ARMv7M -->
<fragment name="ARMv7M" inherits="K200-ARMv7M K400-ARMv7M K800-ARMv7M-u2 K1600-ARMv7M-inplace serial-fallbacks Ket-ARMv7M Xoodoo-ARMv7M"/>
<!-- Implementations selected for ARMv7A -->
<fragment name="ARMv7A" inherits="K200-ref K400-ref K800-ARMv7A-u2 K1600-ARMv7A-NEON K1600x2-ARMv7A-NEON K1600x4-on2 K1600x8-on2 Ket-optimizedLE Xoodoo-ARMv7A-NEON Xoodoox4-ARMv7A-NEON Xoodoox8-on1 Xoodoox16-on1"/>
<!-- Implementations selected for ARMv8A -->
<fragment name="ARMv8A" inherits="K200-ref K400-ref K800-plain-ua K1600-plain-64bits-ua serial-fallbacks Ket-optimizedLE Xoodoo-plain-ua"/>
<!-- Implementations selected for 8-bit AVR -->
<fragment name="AVR8" inherits="K200-AVR8 K400-AVR8 K800-AVR8 K1600-AVR8 serial-fallbacks Ket-SnP Xoodoo-AVR8"/>
<!-- Target names are of the form x/y where x is taken from the first set and y from the second set. -->
<group all="XKCP">
<product delimiter="/">
<factor set="reference reference32bits compact generic32 generic32lc generic64 generic64lc SSSE3 AVX XOP AVX2 AVX2noAsm AVX512 AVX512noAsm ARMv6 ARMv6M ARMv7M ARMv7A ARMv8A AVR8"/>
<factor set="UnitTests Benchmarks KeccakSum libXKCP.a libXKCP.so libXKCP.dylib"/>
</product>
</group>
</build>