Commit | Line | Data |
---|---|---|
0f00dc4c MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### Build script for symmetric cryptography | |
4 | ### | |
5 | ### (c) 2013 Straylight/Edgeware | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
10 | ### This file is part of Catacomb. | |
11 | ### | |
12 | ### Catacomb is free software; you can redistribute it and/or modify | |
13 | ### it under the terms of the GNU Library General Public License as | |
14 | ### published by the Free Software Foundation; either version 2 of the | |
15 | ### License, or (at your option) any later version. | |
16 | ### | |
17 | ### Catacomb is distributed in the hope that it will be useful, | |
18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ### GNU Library General Public License for more details. | |
21 | ### | |
22 | ### You should have received a copy of the GNU Library General Public | |
23 | ### License along with Catacomb; if not, write to the Free | |
24 | ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
25 | ### MA 02111-1307, USA. | |
26 | ||
27 | include $(top_srcdir)/vars.am | |
28 | ||
29 | noinst_LTLIBRARIES = libsymm.la | |
30 | libsymm_la_SOURCES = | |
31 | nodist_libsymm_la_SOURCES = | |
32 | ||
33 | TEST_LIBS = libsymm.la | |
34 | ||
e5b61a8d | 35 | VPATH += $(srcdir)/modes |
0f00dc4c MW |
36 | |
37 | ###-------------------------------------------------------------------------- | |
38 | ### Autogenerated lists. | |
39 | ||
40 | ## Fancy template substitutions. | |
41 | multigen = $(PYTHON) $(srcdir)/multigen | |
42 | EXTRA_DIST += multigen | |
43 | ||
44 | ## The heart of this is an enormous cross-product of crypto primitives and | |
45 | ## the corresponding modes of operation. Rather than write it out longhand, | |
46 | ## we generate it using `multigen'. Unfortunately, this needs to be done | |
47 | ## at the Automake level, which causes some interesting bootstrapping | |
48 | ## problems. | |
24497005 MW |
49 | ## |
50 | ## Of course, now that we have this machinery for the complicated modes | |
51 | ## generation, we might as well use it for simpler things. | |
0f00dc4c | 52 | include modes.am |
24497005 | 53 | include stubs.am |
0f00dc4c MW |
54 | |
55 | EXTRA_DIST += modes.am.in modes.am | |
24497005 | 56 | EXTRA_DIST += stubs.am.in stubs.am |
0f00dc4c | 57 | MAINTAINERCLEANFILES += $(srcdir)/modes.am |
24497005 | 58 | MAINTAINERCLEANFILES += $(srcdir)/stubs.am |
0f00dc4c MW |
59 | |
60 | ## Generate the lists. | |
77843a37 | 61 | $(srcdir)/modes.am: modes.am.in Makefile.am |
0f00dc4c MW |
62 | $(AM_V_GEN)$(multigen) -g $(srcdir)/modes.am.in $(srcdir)/modes.am \ |
63 | blkc="$(BLKCS)" \ | |
64 | blkcmode="$(BLKCMODES)" \ | |
65 | blkcciphermode="$(BLKCCIPHERMODES)" \ | |
66 | hash="$(HASHES)" \ | |
67 | hashmode="$(HASHMODES)" \ | |
68 | hashciphermode="$(HASHCIPHERMODES)" \ | |
69 | hashmacmode="$(HASHMACMODES)" | |
24497005 MW |
70 | $(srcdir)/stubs.am: stubs.am.in Makefile.am |
71 | $(AM_V_GEN)$(multigen) -g $(srcdir)/stubs.am.in $(srcdir)/stubs.am \ | |
72 | descr,hname,base="$(STUBS_HDR)" cname="$(STUBS_SRC)" | |
0f00dc4c MW |
73 | |
74 | ## Initialize lists of known classes. | |
75 | ALL_CIPHERS = $(CIPHER_MODES) | |
76 | ALL_HASHES = $(HASHES) | |
77 | ALL_MACS = $(MAC_MODES) | |
78 | ||
24497005 MW |
79 | ## Stub headers and sources. |
80 | STUBS_HDR = | |
81 | STUBS_SRC = | |
82 | ||
0f00dc4c MW |
83 | ###-------------------------------------------------------------------------- |
84 | ### Block ciphers. | |
85 | ||
86 | BLKCS = | |
87 | BLKCMODES = | |
88 | ||
89 | BLKCCIPHERMODES = | |
90 | BLKCMODES += $(BLKCCIPHERMODES) | |
91 | ||
92 | ## A tool for translating the AES-contest test vectors into a form our test | |
93 | ## rigs understand. | |
94 | EXTRA_DIST += aes-trans | |
95 | ||
96 | ## Block cipher utility macros, mainly used in mode implementations. | |
97 | pkginclude_HEADERS += blkc.h | |
98 | ||
99 | ## Source code and headers for the block ciphers. | |
100 | libsymm_la_SOURCES += $(BLKC_C) | |
101 | pkginclude_HEADERS += $(BLKC_H) | |
102 | ||
103 | ## Schneier's `Blowfish' block cipher. | |
104 | BLKCS += blowfish | |
e5b61a8d MW |
105 | libsymm_la_SOURCES += $(precomp)/blowfish-tab.c |
106 | PRECOMPS += $(precomp)/blowfish-tab.c | |
107 | PRECOMP_PROGS += blowfish-mktab | |
0f00dc4c | 108 | blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET |
e5b61a8d MW |
109 | if !CROSS_COMPILING |
110 | $(precomp)/blowfish-tab.c: | |
111 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
112 | $(AM_V_at)$(MAKE) blowfish-mktab$e | |
113 | $(AM_V_GEN)./blowfish-mktab >$(precomp)/blowfish-tab.c.new && \ | |
114 | mv $(precomp)/blowfish-tab.c.new $(precomp)/blowfish-tab.c | |
115 | endif | |
0f00dc4c MW |
116 | |
117 | ## Adams and Tavares' `CAST' block ciphers. | |
118 | BLKCS += cast128 cast256 | |
e5b61a8d | 119 | libsymm_la_SOURCES += cast-s.c cast-sk.c cast-base.h |
0f00dc4c MW |
120 | cast256.$t: t/cast256 |
121 | EXTRA_DIST += t/cast256.aes | |
122 | MAINTAINERCLEANFILES += $(srcdir)/t/cast256 | |
123 | t/cast256: t/cast256.aes | |
124 | $(AM_V_GEN)$(srcdir)/aes-trans CAST256 \ | |
125 | <$(srcdir)/t/cast256.aes \ | |
126 | >$(srcdir)/t/cast256.new && \ | |
127 | mv $(srcdir)/t/cast256.new $(srcdir)/t/cast256 | |
128 | ||
129 | ## IBM's `DES' block cipher, by Feistel, Coppersmith, and others. | |
130 | BLKCS += des des3 | |
e5b61a8d MW |
131 | libsymm_la_SOURCES += des-base.h $(precomp)/des-tab.c |
132 | PRECOMPS += $(precomp)/des-tab.c | |
133 | PRECOMP_PROGS += des-mktab | |
134 | if !CROSS_COMPILING | |
135 | $(precomp)/des-tab.c: | |
136 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
137 | $(AM_V_at)$(MAKE) des-mktab$e | |
138 | $(AM_V_GEN)./des-mktab >$(precomp)/des-tab.c.new && \ | |
139 | mv $(precomp)/des-tab.c.new $(precomp)/des-tab.c | |
140 | endif | |
0f00dc4c MW |
141 | |
142 | ## Rivest's `DESX' variant, with pre- and post-whitening. | |
143 | BLKCS += desx | |
e5b61a8d | 144 | libsymm_la_SOURCES += desx-tab.c |
0f00dc4c MW |
145 | |
146 | ## Lai and Massey's IDEA. | |
147 | BLKCS += idea | |
148 | ||
149 | ## IBM's `MARS' block cipher. | |
150 | BLKCS += mars | |
e5b61a8d MW |
151 | libsymm_la_SOURCES += $(precomp)/mars-tab.c |
152 | PRECOMPS += $(precomp)/mars-tab.c | |
153 | PRECOMP_PROGS += mars-mktab | |
154 | if !CROSS_COMPILING | |
155 | $(precomp)/mars-tab.c: | |
156 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
157 | $(AM_V_at)$(MAKE) mars-mktab$e | |
158 | $(AM_V_GEN)./mars-mktab >$(precomp)/mars-tab.c.new && \ | |
159 | mv $(precomp)/mars-tab.c.new $(precomp)/mars-tab.c | |
160 | endif | |
0f00dc4c MW |
161 | mars.$t: t/mars |
162 | EXTRA_DIST += t/mars.aes | |
163 | MAINTAINERCLEANFILES += $(srcdir)/t/mars | |
164 | t/mars: t/mars.aes | |
165 | $(AM_V_GEN)$(srcdir)/aes-trans Mars \ | |
166 | <$(srcdir)/t/mars.aes \ | |
167 | >$(srcdir)/t/mars.new && \ | |
168 | mv $(srcdir)/t/mars.new $(srcdir)/t/mars | |
169 | ||
170 | ## Daemen, Peeters, Van Assche and Rijmen's `Noekeon'. | |
171 | BLKCS += noekeon | |
172 | ||
173 | ## Rivest's `RC2' block cipher. | |
174 | BLKCS += rc2 | |
e5b61a8d | 175 | libsymm_la_SOURCES += rc2-tab.c |
0f00dc4c MW |
176 | |
177 | ## Rivest's `RC5'. | |
178 | BLKCS += rc5 | |
179 | ||
180 | ## Daemen and Rijmen's `Rijndael' block cipher, selected as AES. | |
181 | BLKCS += rijndael rijndael192 rijndael256 | |
182 | libsymm_la_SOURCES += rijndael-base.h rijndael-base.c | |
226639f3 | 183 | if CPUFAM_X86 |
1a0c09c4 | 184 | libsymm_la_SOURCES += rijndael-x86-aesni.S |
226639f3 | 185 | endif |
e5b61a8d MW |
186 | libsymm_la_SOURCES += $(precomp)/rijndael-tab.c |
187 | PRECOMPS += $(precomp)/rijndael-tab.c | |
188 | PRECOMP_PROGS += rijndael-mktab | |
189 | if !CROSS_COMPILING | |
190 | $(precomp)/rijndael-tab.c: | |
191 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
192 | $(AM_V_at)$(MAKE) rijndael-mktab$e | |
193 | $(AM_V_GEN)./rijndael-mktab >$(precomp)/rijndael-tab.c.new && \ | |
194 | mv $(precomp)/rijndael-tab.c.new $(precomp)/rijndael-tab.c | |
195 | endif | |
0f00dc4c MW |
196 | rijndael.$t: t/rijndael |
197 | EXTRA_DIST += t/rijndael.aes | |
198 | MAINTAINERCLEANFILES += $(srcdir)/t/rijndael | |
199 | t/rijndael: t/rijndael.aes | |
200 | $(AM_V_GEN)$(srcdir)/aes-trans Rijndael \ | |
201 | <$(srcdir)/t/rijndael.aes \ | |
202 | >$(srcdir)/t/rijndael.new && \ | |
203 | mv $(srcdir)/t/rijndael.new $(srcdir)/t/rijndael | |
204 | ||
205 | ## Massey's `SAFER' block ciphers. | |
206 | BLKCS += safer safersk | |
e5b61a8d MW |
207 | libsymm_la_SOURCES += $(precomp)/safer-tab.c |
208 | PRECOMPS += $(precomp)/safer-tab.c | |
209 | PRECOMP_PROGS += safer-mktab | |
24497005 | 210 | STUBS_HDR += SAFER-SK,safersk,safer |
e5b61a8d MW |
211 | if !CROSS_COMPILING |
212 | $(precomp)/safer-tab.c: | |
213 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
214 | $(AM_V_at)$(MAKE) safer-mktab$e | |
215 | $(AM_V_GEN)./safer-mktab >$(precomp)/safer-tab.c.new && \ | |
216 | mv $(precomp)/safer-tab.c.new $(precomp)/safer-tab.c | |
217 | endif | |
0f00dc4c MW |
218 | |
219 | ## Anderson, Biham and Knudsen's `Serpent' block cipher. | |
220 | BLKCS += serpent | |
221 | libsymm_la_SOURCES += serpent-sbox.h | |
e5b61a8d | 222 | check_PROGRAMS += serpent-check |
0f00dc4c MW |
223 | TESTS += serpent-check |
224 | serpent.$t: t/serpent | |
225 | EXTRA_DIST += t/serpent.aes | |
226 | MAINTAINERCLEANFILES += $(srcdir)/t/serpent | |
227 | t/serpent: t/serpent.aes | |
228 | $(AM_V_GEN)$(srcdir)/aes-trans Serpent -v rev=1 \ | |
229 | <$(srcdir)/t/serpent.aes \ | |
230 | >$(srcdir)/t/serpent.new && \ | |
231 | mv $(srcdir)/t/serpent.new $(srcdir)/t/serpent | |
232 | ||
233 | ## The National Security Agency's `Skipjack' block cipher. You don't want to | |
234 | ## use this. | |
235 | BLKCS += skipjack | |
e5b61a8d | 236 | libsymm_la_SOURCES += skipjack-tab.c |
0f00dc4c MW |
237 | |
238 | ## Daemen and Rijmen's `Square' block cipher. | |
239 | BLKCS += square | |
e5b61a8d MW |
240 | libsymm_la_SOURCES += $(precomp)/square-tab.c |
241 | PRECOMPS += $(precomp)/square-tab.c | |
242 | PRECOMP_PROGS += square-mktab | |
243 | if !CROSS_COMPILING | |
244 | $(precomp)/square-tab.c: | |
245 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
246 | $(AM_V_at)$(MAKE) square-mktab$e | |
247 | $(AM_V_GEN)./square-mktab >$(precomp)/square-tab.c.new && \ | |
248 | mv $(precomp)/square-tab.c.new $(precomp)/square-tab.c | |
249 | endif | |
0f00dc4c MW |
250 | |
251 | ## Wheeler and Needham's `TEA' and `XTEA' block ciphers. | |
252 | BLKCS += tea xtea | |
253 | ||
254 | ## Schneier, Kelsey, Whiting, Wagner, Hall and Ferguson's `Twofish' block | |
255 | ## cipher. | |
256 | BLKCS += twofish | |
e5b61a8d MW |
257 | libsymm_la_SOURCES += $(precomp)/twofish-tab.c |
258 | PRECOMPS += $(precomp)/twofish-tab.c | |
259 | PRECOMP_PROGS += twofish-mktab | |
260 | if !CROSS_COMPILING | |
261 | $(precomp)/twofish-tab.c: | |
262 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
263 | $(AM_V_at)$(MAKE) twofish-mktab$e | |
264 | $(AM_V_GEN)./twofish-mktab >$(precomp)/twofish-tab.c.new && \ | |
265 | mv $(precomp)/twofish-tab.c.new $(precomp)/twofish-tab.c | |
266 | endif | |
0f00dc4c MW |
267 | twofish.$t: t/twofish |
268 | EXTRA_DIST += t/twofish.aes | |
269 | MAINTAINERCLEANFILES += $(srcdir)/t/twofish | |
270 | t/twofish: t/twofish.aes | |
271 | $(AM_V_GEN)$(srcdir)/aes-trans Twofish \ | |
272 | <$(srcdir)/t/twofish.aes \ | |
273 | >$(srcdir)/t/twofish.new && \ | |
274 | mv $(srcdir)/t/twofish.new $(srcdir)/t/twofish | |
275 | ||
276 | ## The old NIST modes for DES. | |
277 | BLKCCIPHERMODES += cbc cfb ecb ofb | |
278 | ||
279 | ## Counter mode. | |
280 | BLKCCIPHERMODES += counter | |
281 | ||
282 | ###-------------------------------------------------------------------------- | |
283 | ### Hash functions. | |
284 | ||
285 | HASHES = | |
286 | HASHMODES = | |
287 | ||
288 | HASHCIPHERMODES = | |
289 | HASHMODES += $(HASHCIPHERMODES) | |
290 | ||
291 | HASHMACMODES = | |
292 | HASHMODES += $(HASHMACMODES) | |
293 | ||
294 | ## Common definitions for hash functions. | |
295 | pkginclude_HEADERS += hash.h | |
296 | ||
297 | ## Source code and headers for the hash functions. | |
298 | libsymm_la_SOURCES += $(HASH_C) | |
299 | pkginclude_HEADERS += $(HASH_H) | |
300 | ||
301 | ## Lim and KISA's `HAS-160', recommended for use with KCDSA. | |
302 | HASHES += has160 | |
303 | ||
304 | ## Rivest's `MD' series of hash functions | |
305 | HASHES += md2 md4 md5 | |
e5b61a8d | 306 | libsymm_la_SOURCES += md2-tab.c |
0f00dc4c MW |
307 | |
308 | ## Dobbertin, Bosselaers and Preneel's `RIPEMD' suite. | |
309 | HASHES += rmd128 rmd160 rmd256 rmd320 | |
310 | ||
311 | ## The National Security Agency's `SHA-1' hash function. | |
312 | HASHES += sha | |
313 | ||
314 | ## The National Security Agency's `SHA-2' suite. | |
315 | HASHES += sha224 sha256 | |
316 | HASHES += sha384 sha512 | |
24497005 MW |
317 | STUBS_HDR += SHA-224,sha224,sha256 |
318 | STUBS_HDR += SHA-384,sha384,sha512 | |
0f00dc4c MW |
319 | |
320 | ## Anderson and Biham's `Tiger' hash function. | |
321 | HASHES += tiger | |
e5b61a8d MW |
322 | libsymm_la_SOURCES += tiger-base.h $(precomp)/tiger-tab.c |
323 | PRECOMPS += $(precomp)/tiger-tab.c | |
324 | PRECOMP_PROGS += tiger-mktab | |
325 | if !CROSS_COMPILING | |
326 | $(precomp)/tiger-tab.c: | |
327 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
328 | $(AM_V_at)$(MAKE) tiger-mktab$e | |
329 | $(AM_V_GEN)./tiger-mktab >$(precomp)/tiger-tab.c.new && \ | |
330 | mv $(precomp)/tiger-tab.c.new $(precomp)/tiger-tab.c | |
331 | endif | |
0f00dc4c MW |
332 | |
333 | ## Barreto and Rijmen's `Whirlpool' hash function. | |
334 | HASHES += whirlpool whirlpool256 | |
e5b61a8d MW |
335 | libsymm_la_SOURCES += $(precomp)/whirlpool-tab.c |
336 | PRECOMPS += $(precomp)/whirlpool-tab.c | |
337 | PRECOMP_PROGS += whirlpool-mktab | |
24497005 | 338 | STUBS_HDR += Whirlpool-256,whirlpool256,whirlpool |
e5b61a8d MW |
339 | if !CROSS_COMPILING |
340 | $(precomp)/whirlpool-tab.c: | |
341 | $(AM_V_at)$(MKDIR_P) $(precomp) | |
342 | $(AM_V_at)$(MAKE) whirlpool-mktab$e | |
343 | $(AM_V_GEN)./whirlpool-mktab >$(precomp)/whirlpool-tab.c.new && \ | |
344 | mv $(precomp)/whirlpool-tab.c.new $(precomp)/whirlpool-tab.c | |
345 | endif | |
0f00dc4c MW |
346 | |
347 | ## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication. | |
348 | HASHMACMODES += hmac | |
349 | ||
350 | ## MGF1, used in OAEP and PSS. | |
351 | HASHCIPHERMODES += mgf | |
352 | ||
353 | ###-------------------------------------------------------------------------- | |
354 | ### Other symmetric primitives. | |
355 | ||
356 | ## The CRC32 algorithm, which is useful, but has no worthwhile security. | |
357 | pkginclude_HEADERS += crc32.h | |
358 | libsymm_la_SOURCES += crc32.c | |
359 | ALL_HASHES += crc32=gcrc32 | |
360 | ||
361 | ## Rivest's `RC4' stream cipher. | |
362 | pkginclude_HEADERS += rc4.h | |
363 | libsymm_la_SOURCES += rc4.c | |
364 | TESTS += rc4.$t | |
365 | EXTRA_DIST += t/rc4 | |
366 | ALL_CIPHERS += rc4 | |
367 | ||
368 | ## Coppersmith and Rogaway's `SEAL' pseudorandom function. | |
369 | pkginclude_HEADERS += seal.h | |
370 | libsymm_la_SOURCES += seal.c | |
371 | TESTS += seal.$t | |
372 | EXTRA_DIST += t/seal | |
373 | ALL_CIPHERS += seal | |
374 | ||
194e93f2 MW |
375 | ## Bernstein's `Salsa20' stream cipher. Most of the test vectors come from |
376 | ## the eSTREAM project, captured by the Internet Archive's Wayback Machine at | |
377 | ## | |
378 | ## http://web.archive.org/web/20070814004154/http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20.tar.gz?view=tar | |
379 | ## | |
380 | ## and automatically converted into the format we want. | |
381 | EXTRA_DIST += salsa20-tvconv | |
382 | pkginclude_HEADERS += salsa20.h salsa20-core.h | |
383 | libsymm_la_SOURCES += salsa20.c | |
e10e6494 | 384 | if CPUFAM_X86 |
1a0c09c4 | 385 | libsymm_la_SOURCES += salsa20-x86-sse2.S |
e10e6494 | 386 | endif |
194e93f2 MW |
387 | TESTS += salsa20.$t |
388 | ALL_CIPHERS += salsa20 salsa2012 salsa208 | |
389 | ALL_CIPHERS += xsalsa20 xsalsa2012 xsalsa208 | |
390 | STUBS_HDR += Salsa20/12,salsa2012,salsa20 | |
391 | STUBS_HDR += Salsa20/8,salsa208,salsa20 | |
392 | STUBS_HDR += XSalsa20,xsalsa20,salsa20 | |
393 | STUBS_HDR += XSalsa20/12,xsalsa2012,salsa20 | |
394 | STUBS_HDR += XSalsa20/8,xsalsa208,salsa20 | |
395 | EXTRA_DIST += t/salsa20 | |
396 | MAINTAINERCLEANFILES += t/salsa20 | |
397 | salsa20.$t: t/salsa20 | |
398 | SALSA20_ESTREAM_TV = t/salsa20.estream | |
399 | SALSA20_ESTREAM_TV += t/salsa2012.estream | |
400 | SALSA20_ESTREAM_TV += t/salsa208.estream | |
401 | EXTRA_DIST += t/salsa20.local $(SALSA20_ESTREAM_TV) | |
402 | t/salsa20: salsa20-tvconv t/salsa20.local $(SALSA20_ESTREAM_TV) | |
403 | $(AM_V_GEN)cd $(srcdir) && \ | |
404 | { echo "### GENERATED by salsa20-tvconv" && \ | |
405 | cat t/salsa20.local && \ | |
406 | ./salsa20-tvconv $(SALSA20_ESTREAM_TV); \ | |
407 | } >t/salsa20.new && \ | |
408 | mv t/salsa20.new t/salsa20 | |
409 | ||
55d81656 MW |
410 | ## Bernstein's `ChaCha' stream cipher. |
411 | pkginclude_HEADERS += chacha.h chacha-core.h | |
412 | libsymm_la_SOURCES += chacha.c | |
e10e6494 | 413 | if CPUFAM_X86 |
1a0c09c4 | 414 | libsymm_la_SOURCES += chacha-x86-sse2.S |
e10e6494 | 415 | endif |
55d81656 MW |
416 | TESTS += chacha.$t |
417 | EXTRA_DIST += t/chacha | |
418 | ALL_CIPHERS += chacha20 chacha12 chacha8 | |
419 | ALL_CIPHERS += xchacha20 xchacha12 xchacha8 | |
420 | STUBS_HDR += ChaCha20,chacha20,chacha | |
421 | STUBS_HDR += ChaCha12,chacha12,chacha | |
422 | STUBS_HDR += ChaCha8,chacha8,chacha | |
423 | STUBS_HDR += XChaCha20,xchacha20,chacha | |
424 | STUBS_HDR += XChaCha12,xchacha12,chacha | |
425 | STUBS_HDR += XChaCha8,xchacha8,chacha | |
426 | ||
0f00dc4c MW |
427 | ###-------------------------------------------------------------------------- |
428 | ### Autogenerated mode implementations. | |
429 | ||
430 | ## The master stamp file, indicating that we generated all of the sources. | |
0f00dc4c | 431 | EXTRA_DIST += mode.h.in mode.c.in |
e5b61a8d MW |
432 | EXTRA_DIST += modes/gen-stamp |
433 | MAINTAINERCLEANFILES += modes/gen-stamp | |
77843a37 | 434 | modes/gen-stamp: Makefile.am |
e5b61a8d | 435 | $(AM_V_at)$(MKDIR_P) $(srcdir)/modes |
0f00dc4c | 436 | $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \ |
e5b61a8d | 437 | $(srcdir)/modes/@base-@mode.c \ |
0f00dc4c MW |
438 | base="$(BLKCS)" mode="$(BLKCMODES)" |
439 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ | |
e5b61a8d | 440 | $(srcdir)/modes/@base-@mode.h \ |
0f00dc4c MW |
441 | base="$(BLKCS)" mode="$(BLKCMODES)" |
442 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \ | |
e5b61a8d | 443 | $(srcdir)/modes/@base-@mode.c \ |
0f00dc4c MW |
444 | base="$(HASHES)" mode="$(HASHMODES)" |
445 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ | |
e5b61a8d | 446 | $(srcdir)/modes/@base-@mode.h \ |
0f00dc4c | 447 | base="$(HASHES)" mode="$(HASHMODES)" |
e5b61a8d | 448 | $(AM_V_at)touch $(srcdir)/modes/gen-stamp |
0f00dc4c MW |
449 | |
450 | ## The individual mode interfaces and implementations. | |
451 | pkginclude_HEADERS += $(MODE_H) | |
452 | ||
453 | ## Generated implementations. | |
454 | BUILT_SOURCES += $(GENMODES_C) | |
e5b61a8d | 455 | MAINTAINERCLEANFILES += $(GENMODES_C) |
ef75f314 | 456 | libsymm_la_SOURCES += $(GENMODES_C) |
0f00dc4c MW |
457 | $(GENMODES_C): modes/gen-stamp |
458 | ||
459 | ## Generated interfaces. | |
460 | BUILT_SOURCES += $(GENMODES_H) | |
e5b61a8d | 461 | MAINTAINERCLEANFILES += $(GENMODES_H) |
ef75f314 | 462 | pkginclude_HEADERS += $(GENMODES_H) |
0f00dc4c MW |
463 | $(GENMODES_H): modes/gen-stamp |
464 | ||
465 | ###-------------------------------------------------------------------------- | |
24497005 MW |
466 | ### Autogenerated stub headers. |
467 | ||
468 | ## The master stamp file. | |
469 | EXTRA_DIST += stub.h.in | |
470 | EXTRA_DIST += stubs.gen-stamp | |
471 | MAINTAINERCLEANFILES += stubs.gen-stamp | |
472 | stubs.gen-stamp: Makefile.am | |
473 | $(AM_V_at)$(MKDIR_P) $(srcdir)/stubs | |
474 | $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.h.in \ | |
475 | $(srcdir)/@name.h descr,name,base="$(STUBS_HDR)" | |
476 | $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.c.in \ | |
477 | $(srcdir)/@name.c name="$(STUBS_SRC)" | |
478 | $(AM_V_at)touch $(srcdir)/stubs.gen-stamp | |
479 | ||
480 | ## Generated stub headers. | |
481 | BUILT_SOURCES += $(STUB_H) $(STUB_C) | |
482 | MAINTAINERCLEANFILES += $(STUB_H) $(STUB_C) | |
483 | pkginclude_HEADERS += $(STUB_H) | |
484 | $(STUB_H) $(STUB_C): stubs.gen-stamp | |
485 | ||
486 | ###-------------------------------------------------------------------------- | |
0f00dc4c MW |
487 | ### Tables of classes for encryption, hashing, and message authentication. |
488 | ||
489 | ## The skeleton for the class tables. | |
490 | EXTRA_DIST += gthingtab.c.in | |
491 | ||
492 | ## Table of cipher classes. | |
493 | pkginclude_HEADERS += gcipher.h | |
494 | CLEANFILES += gciphertab.c | |
495 | nodist_libsymm_la_SOURCES += gciphertab.c | |
77843a37 | 496 | gciphertab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
497 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \ |
498 | what=gcipher cls=gccipher thing="$(ALL_CIPHERS)" | |
499 | ||
500 | ## Table of hash classes. | |
501 | pkginclude_HEADERS += ghash.h ghash-def.h | |
502 | CLEANFILES += ghashtab.c | |
503 | nodist_libsymm_la_SOURCES += ghashtab.c | |
77843a37 | 504 | ghashtab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
505 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \ |
506 | what=ghash cls=gchash thing="$(ALL_HASHES)" | |
507 | ||
508 | ## Table of MAC classes. | |
509 | pkginclude_HEADERS += gmac.h | |
510 | CLEANFILES += gmactab.c | |
511 | nodist_libsymm_la_SOURCES += gmactab.c | |
77843a37 | 512 | gmactab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
513 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \ |
514 | what=gmac cls=gcmac thing="$(ALL_MACS)" | |
515 | ||
516 | ###-------------------------------------------------------------------------- | |
517 | ### Testing. | |
518 | ||
519 | ## Run the test programs. | |
520 | TESTS += $(SYMM_TESTS) | |
521 | EXTRA_DIST += $(SYMM_TEST_FILES) | |
522 | ||
523 | ## A piece of sample text for round-trip testing encryption modes. | |
524 | EXTRA_DIST += daftstory.h | |
525 | ||
526 | ## Clean the debris from the `modes' subdirectory. | |
527 | CLEANFILES += modes/*.to modes/*.$t | |
528 | ||
529 | ###----- That's all, folks -------------------------------------------------- |