hashmacmode="$(HASHMACMODES)"
$(srcdir)/stubs.am: stubs.am.in Makefile.am
$(AM_V_GEN)$(multigen) -g $(srcdir)/stubs.am.in $(srcdir)/stubs.am \
- descr,hname,base="$(STUBS_HDR)" cname="$(STUBS_SRC)"
+ descr,hname,base="$(STUBS_HDR)" cname,cbase="$(STUBS_SRC)"
## Initialize lists of known classes.
ALL_CIPHERS = $(CIPHER_MODES)
if !CROSS_COMPILING
$(precomp)/symm/blowfish-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) blowfish-mktab$e
+ $(AM_V_at)$(MAKE) blowfish-mktab$(EXEEXT)
$(AM_V_GEN)./blowfish-mktab >$(precomp)/symm/blowfish-tab.c.new && \
mv $(precomp)/symm/blowfish-tab.c.new \
$(precomp)/symm/blowfish-tab.c
## Adams and Tavares' `CAST' block ciphers.
BLKCS += cast128 cast256
libsymm_la_SOURCES += cast-s.c cast-sk.c cast-base.h
-cast256.$t: t/cast256
+cast256.log: t/cast256
EXTRA_DIST += t/cast256.aes
MAINTAINERCLEANFILES += $(srcdir)/t/cast256
t/cast256: t/cast256.aes
if !CROSS_COMPILING
$(precomp)/symm/des-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) des-mktab$e
+ $(AM_V_at)$(MAKE) des-mktab$(EXEEXT)
$(AM_V_GEN)./des-mktab >$(precomp)/symm/des-tab.c.new && \
mv $(precomp)/symm/des-tab.c.new $(precomp)/symm/des-tab.c
endif
if !CROSS_COMPILING
$(precomp)/symm/mars-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) mars-mktab$e
+ $(AM_V_at)$(MAKE) mars-mktab$(EXEEXT)
$(AM_V_GEN)./mars-mktab >$(precomp)/symm/mars-tab.c.new && \
mv $(precomp)/symm/mars-tab.c.new $(precomp)/symm/mars-tab.c
endif
-mars.$t: t/mars
+mars.log: t/mars
EXTRA_DIST += t/mars.aes
MAINTAINERCLEANFILES += $(srcdir)/t/mars
t/mars: t/mars.aes
## Daemen and Rijmen's `Rijndael' block cipher, selected as AES.
BLKCS += rijndael rijndael192 rijndael256
libsymm_la_SOURCES += rijndael-base.h rijndael-base.c
+if CPUFAM_X86
+libsymm_la_SOURCES += rijndael-x86ish-aesni.S
+endif
+if CPUFAM_AMD64
+libsymm_la_SOURCES += rijndael-x86ish-aesni.S
+endif
+if HAVE_AS_ARMV8_CRYPTO
+if CPUFAM_ARMEL
+libsymm_la_SOURCES += rijndael-arm-crypto.S
+endif
+endif
+if CPUFAM_ARM64
+libsymm_la_SOURCES += rijndael-arm64-crypto.S
+endif
nodist_libsymm_la_SOURCES += ../precomp/symm/rijndael-tab.c
PRECOMPS += $(precomp)/symm/rijndael-tab.c
PRECOMP_PROGS += rijndael-mktab
if !CROSS_COMPILING
$(precomp)/symm/rijndael-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) rijndael-mktab$e
+ $(AM_V_at)$(MAKE) rijndael-mktab$(EXEEXT)
$(AM_V_GEN)./rijndael-mktab >$(precomp)/symm/rijndael-tab.c.new && \
mv $(precomp)/symm/rijndael-tab.c.new \
$(precomp)/symm/rijndael-tab.c
endif
-rijndael.$t: t/rijndael
+rijndael.log: t/rijndael
EXTRA_DIST += t/rijndael.aes
MAINTAINERCLEANFILES += $(srcdir)/t/rijndael
t/rijndael: t/rijndael.aes
PRECOMPS += $(precomp)/symm/safer-tab.c
PRECOMP_PROGS += safer-mktab
STUBS_HDR += SAFER-SK,safersk,safer
+STUBS_SRC += safersk,safer
if !CROSS_COMPILING
$(precomp)/symm/safer-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) safer-mktab$e
+ $(AM_V_at)$(MAKE) safer-mktab$(EXEEXT)
$(AM_V_GEN)./safer-mktab >$(precomp)/symm/safer-tab.c.new && \
mv $(precomp)/symm/safer-tab.c.new \
$(precomp)/symm/safer-tab.c
libsymm_la_SOURCES += serpent-sbox.h
check_PROGRAMS += serpent-check
TESTS += serpent-check
-serpent.$t: t/serpent
+serpent.log: t/serpent
EXTRA_DIST += t/serpent.aes
MAINTAINERCLEANFILES += $(srcdir)/t/serpent
t/serpent: t/serpent.aes
if !CROSS_COMPILING
$(precomp)/symm/square-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) square-mktab$e
+ $(AM_V_at)$(MAKE) square-mktab$(EXEEXT)
$(AM_V_GEN)./square-mktab >$(precomp)/symm/square-tab.c.new && \
mv $(precomp)/symm/square-tab.c.new \
$(precomp)/symm/square-tab.c
if !CROSS_COMPILING
$(precomp)/symm/twofish-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) twofish-mktab$e
+ $(AM_V_at)$(MAKE) twofish-mktab$(EXEEXT)
$(AM_V_GEN)./twofish-mktab >$(precomp)/symm/twofish-tab.c.new && \
mv $(precomp)/symm/twofish-tab.c.new \
$(precomp)/symm/twofish-tab.c
endif
-twofish.$t: t/twofish
+twofish.log: t/twofish
EXTRA_DIST += t/twofish.aes
MAINTAINERCLEANFILES += $(srcdir)/t/twofish
t/twofish: t/twofish.aes
## The National Security Agency's `SHA-2' suite.
HASHES += sha224 sha256
-HASHES += sha384 sha512
+HASHES += sha384 sha512 sha512/224 sha512/256
STUBS_HDR += SHA-224,sha224,sha256
STUBS_HDR += SHA-384,sha384,sha512
+STUBS_HDR += SHA-512/256,sha512-256,sha512
+STUBS_HDR += SHA-512/224,sha512-224,sha512
+STUBS_SRC += sha224,sha256
+STUBS_SRC += sha384,sha512
+STUBS_SRC += sha512-256,sha512
+STUBS_SRC += sha512-224,sha512
## Anderson and Biham's `Tiger' hash function.
HASHES += tiger
if !CROSS_COMPILING
$(precomp)/symm/tiger-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) tiger-mktab$e
+ $(AM_V_at)$(MAKE) tiger-mktab$(EXEEXT)
$(AM_V_GEN)./tiger-mktab >$(precomp)/symm/tiger-tab.c.new && \
mv $(precomp)/symm/tiger-tab.c.new \
$(precomp)/symm/tiger-tab.c
PRECOMPS += $(precomp)/symm/whirlpool-tab.c
PRECOMP_PROGS += whirlpool-mktab
STUBS_HDR += Whirlpool-256,whirlpool256,whirlpool
+STUBS_SRC += whirlpool256,whirlpool
if !CROSS_COMPILING
$(precomp)/symm/whirlpool-tab.c:
$(AM_V_at)$(MKDIR_P) $(precomp)/symm
- $(AM_V_at)$(MAKE) whirlpool-mktab$e
+ $(AM_V_at)$(MAKE) whirlpool-mktab$(EXEEXT)
$(AM_V_GEN)./whirlpool-mktab \
>$(precomp)/symm/whirlpool-tab.c.new && \
mv $(precomp)/symm/whirlpool-tab.c.new \
$(precomp)/symm/whirlpool-tab.c
endif
+## Bertoni, Daemen, Peeters, and Van Assche's `Keccak', selected as the basis
+## for SHA-3.
+pkginclude_HEADERS += keccak1600.h
+libsymm_la_SOURCES += keccak1600.c
+TESTS += keccak1600.t$(EXEEXT)
+EXTRA_DIST += t/keccak1600
+
+pkginclude_HEADERS += sha3.h
+libsymm_la_SOURCES += sha3.c
+
+HASHES += sha3-224 sha3-256 sha3-384 sha3-512
+STUBS_HDR += SHA3-224,sha3-224,sha3
+STUBS_HDR += SHA3-256,sha3-256,sha3
+STUBS_HDR += SHA3-384,sha3-384,sha3
+STUBS_HDR += SHA3-512,sha3-512,sha3
+STUBS_SRC += sha3-224,sha3
+STUBS_SRC += sha3-256,sha3
+STUBS_SRC += sha3-384,sha3
+STUBS_SRC += sha3-512,sha3
+
+STUBS_HDR += SHAKE128,shake128,sha3
+STUBS_HDR += SHAKE256,shake256,sha3
+
+STUBS_HDR += SHAKE128-XOF,shake128-xof,sha3
+STUBS_HDR += SHAKE256-XOF,shake256-xof,sha3
+
+STUBS_HDR += KMAC128,kmac128,sha3
+STUBS_HDR += KMAC256,kmac256,sha3
+
+ALL_HASHES += shake128 shake256
+ALL_CIPHERS += shake128-xof shake256-xof
+ALL_MACS += kmac128 kmac256
+
+TESTS += sha3.t$(EXEEXT)
+SHA3_TESTS = t/SHA3_224ShortMsg.rsp
+SHA3_TESTS += t/SHA3_224LongMsg.rsp
+SHA3_TESTS += t/SHA3_256ShortMsg.rsp
+SHA3_TESTS += t/SHA3_256LongMsg.rsp
+SHA3_TESTS += t/SHA3_384ShortMsg.rsp
+SHA3_TESTS += t/SHA3_384LongMsg.rsp
+SHA3_TESTS += t/SHA3_512ShortMsg.rsp
+SHA3_TESTS += t/SHA3_512LongMsg.rsp
+SHA3_TESTS += t/SHA3_224Monte.rsp
+SHA3_TESTS += t/SHA3_256Monte.rsp
+SHA3_TESTS += t/SHA3_384Monte.rsp
+SHA3_TESTS += t/SHA3_512Monte.rsp
+SHA3_TESTS += t/SHAKE128ShortMsg.rsp
+SHA3_TESTS += t/SHAKE128LongMsg.rsp
+SHA3_TESTS += t/SHAKE128VariableOut.rsp
+SHA3_TESTS += t/SHAKE256ShortMsg.rsp
+SHA3_TESTS += t/SHAKE256LongMsg.rsp
+SHA3_TESTS += t/SHAKE256VariableOut.rsp
+EXTRA_DIST += $(SHA3_TESTS) sha3-trans t/sha3.local t/sha3
+MAINTAINERCLEANFILES += $(srcdir)/t/sha3
+sha3.log: t/sha3
+$(srcdir)/t/sha3: $(SHA3_TESTS) sha3-trans t/sha3.local
+ $(AM_V_GEN)cd $(srcdir) && \
+ { ./sha3-trans $(SHA3_TESTS); \
+ cat t/sha3.local; } >t/sha3.new && \
+ mv t/sha3.new t/sha3
+
## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication.
HASHMACMODES += hmac
## Rivest's `RC4' stream cipher.
pkginclude_HEADERS += rc4.h
libsymm_la_SOURCES += rc4.c
-TESTS += rc4.$t
+TESTS += rc4.t$(EXEEXT)
EXTRA_DIST += t/rc4
ALL_CIPHERS += rc4
## Coppersmith and Rogaway's `SEAL' pseudorandom function.
pkginclude_HEADERS += seal.h
libsymm_la_SOURCES += seal.c
-TESTS += seal.$t
+TESTS += seal.t$(EXEEXT)
EXTRA_DIST += t/seal
ALL_CIPHERS += seal
EXTRA_DIST += salsa20-tvconv
pkginclude_HEADERS += salsa20.h salsa20-core.h
libsymm_la_SOURCES += salsa20.c
-TESTS += salsa20.$t
+if CPUFAM_X86
+libsymm_la_SOURCES += salsa20-x86ish-sse2.S
+endif
+if CPUFAM_AMD64
+libsymm_la_SOURCES += salsa20-x86ish-sse2.S
+endif
+if CPUFAM_ARMEL
+libsymm_la_SOURCES += salsa20-arm-neon.S
+endif
+if CPUFAM_ARM64
+libsymm_la_SOURCES += salsa20-arm64.S
+endif
+TESTS += salsa20.t$(EXEEXT)
ALL_CIPHERS += salsa20 salsa2012 salsa208
+ALL_CIPHERS += salsa20-ietf salsa2012-ietf salsa208-ietf
ALL_CIPHERS += xsalsa20 xsalsa2012 xsalsa208
STUBS_HDR += Salsa20/12,salsa2012,salsa20
STUBS_HDR += Salsa20/8,salsa208,salsa20
+STUBS_HDR += Salsa20-IETF,salsa20-ietf,salsa20
+STUBS_HDR += Salsa20/12-IETF,salsa2012-ietf,salsa20
+STUBS_HDR += Salsa20/8-IETF,salsa208-ietf,salsa20
STUBS_HDR += XSalsa20,xsalsa20,salsa20
STUBS_HDR += XSalsa20/12,xsalsa2012,salsa20
STUBS_HDR += XSalsa20/8,xsalsa208,salsa20
EXTRA_DIST += t/salsa20
MAINTAINERCLEANFILES += t/salsa20
-salsa20.$t: t/salsa20
+salsa20.log: t/salsa20
SALSA20_ESTREAM_TV = t/salsa20.estream
SALSA20_ESTREAM_TV += t/salsa2012.estream
SALSA20_ESTREAM_TV += t/salsa208.estream
## Bernstein's `ChaCha' stream cipher.
pkginclude_HEADERS += chacha.h chacha-core.h
libsymm_la_SOURCES += chacha.c
-TESTS += chacha.$t
+if CPUFAM_X86
+libsymm_la_SOURCES += chacha-x86ish-sse2.S
+endif
+if CPUFAM_AMD64
+libsymm_la_SOURCES += chacha-x86ish-sse2.S
+endif
+if CPUFAM_ARMEL
+libsymm_la_SOURCES += chacha-arm-neon.S
+endif
+if CPUFAM_ARM64
+libsymm_la_SOURCES += chacha-arm64.S
+endif
+TESTS += chacha.t$(EXEEXT)
EXTRA_DIST += t/chacha
ALL_CIPHERS += chacha20 chacha12 chacha8
+ALL_CIPHERS += chacha20-ietf chacha12-ietf chacha8-ietf
ALL_CIPHERS += xchacha20 xchacha12 xchacha8
STUBS_HDR += ChaCha20,chacha20,chacha
STUBS_HDR += ChaCha12,chacha12,chacha
STUBS_HDR += ChaCha8,chacha8,chacha
+STUBS_HDR += ChaCha20-IETF,chacha20-ietf,chacha
+STUBS_HDR += ChaCha12-IETF,chacha12-ietf,chacha
+STUBS_HDR += ChaCha8-IETF,chacha8-ietf,chacha
STUBS_HDR += XChaCha20,xchacha20,chacha
STUBS_HDR += XChaCha12,xchacha12,chacha
STUBS_HDR += XChaCha8,xchacha8,chacha
+## Bernstein's `Poly1305' message authentication code.
+pkginclude_HEADERS += poly1305.h
+libsymm_la_SOURCES += poly1305.c
+TESTS += poly1305.t$(EXEEXT)
+TESTS += poly1305-p11.t$(EXEEXT)
+EXTRA_DIST += t/poly1305
+
+check_PROGRAMS += poly1305-p11.t
+poly1305_p11_t_SOURCES = poly1305.c
+poly1305_p11_t_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_RIG -DSRCDIR="\"$(srcdir)\""
+poly1305_p11_t_CPPFLAGS += -DPOLY1305_IMPL=11
+poly1305_p11_t_LDFLAGS = $(TEST_LDFLAGS)
+poly1305_p11_t_LDADD = $(TEST_LIBS) $(top_builddir)/libcatacomb.la
+poly1305_p11_t_LDADD += $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
+
###--------------------------------------------------------------------------
### Autogenerated mode implementations.
modes/gen-stamp: Makefile.am
$(AM_V_at)$(MKDIR_P) $(srcdir)/modes
$(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \
- $(srcdir)/modes/@base-@mode.c \
+ $(srcdir)/modes/@{base:f}-@mode.c \
base="$(BLKCS)" mode="$(BLKCMODES)"
$(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
- $(srcdir)/modes/@base-@mode.h \
+ $(srcdir)/modes/@{base:f}-@mode.h \
base="$(BLKCS)" mode="$(BLKCMODES)"
$(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \
- $(srcdir)/modes/@base-@mode.c \
+ $(srcdir)/modes/@{base:f}-@mode.c \
base="$(HASHES)" mode="$(HASHMODES)"
$(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
- $(srcdir)/modes/@base-@mode.h \
+ $(srcdir)/modes/@{base:f}-@mode.h \
base="$(HASHES)" mode="$(HASHMODES)"
$(AM_V_at)touch $(srcdir)/modes/gen-stamp
$(AM_V_GEN)$(multigen) -g $(srcdir)/stub.h.in \
$(srcdir)/@name.h descr,name,base="$(STUBS_HDR)"
$(AM_V_GEN)$(multigen) -g $(srcdir)/stub.c.in \
- $(srcdir)/@name.c name="$(STUBS_SRC)"
+ $(srcdir)/@name.c name,base="$(STUBS_SRC)"
$(AM_V_at)touch $(srcdir)/stubs.gen-stamp
## Generated stub headers.
EXTRA_DIST += daftstory.h
## Clean the debris from the `modes' subdirectory.
-CLEANFILES += modes/*.to modes/*.$t
+CLEANFILES += modes/*.to modes/*.t$(EXEEXT)
###----- That's all, folks --------------------------------------------------