symm/: Introduce the idea of MAC modes based on blockciphers.
[catacomb] / symm / Makefile.am
index 4441ecc..0de914f 100644 (file)
@@ -32,6 +32,11 @@ nodist_libsymm_la_SOURCES =
 
 TEST_LIBS               = libsymm.la
 
+noinst_LTLIBRARIES     += libsymmtest.la
+libsymmtest_la_SOURCES  =
+libsymmtest_la_CFLAGS   = $(AM_CFLAGS) -DSRCDIR=\"$(srcdir)\"
+TEST_LIBS              += libsymmtest.la
+
 VPATH                  += $(srcdir)/modes
 
 ###--------------------------------------------------------------------------
@@ -63,6 +68,7 @@ $(srcdir)/modes.am: modes.am.in Makefile.am
                blkc="$(BLKCS)" \
                        blkcmode="$(BLKCMODES)" \
                        blkcciphermode="$(BLKCCIPHERMODES)" \
+                       blkcmacmode="$(BLKCMACMODES)" \
                hash="$(HASHES)" \
                        hashmode="$(HASHMODES)" \
                        hashciphermode="$(HASHCIPHERMODES)" \
@@ -89,6 +95,9 @@ BLKCMODES              =
 BLKCCIPHERMODES                 =
 BLKCMODES              += $(BLKCCIPHERMODES)
 
+BLKCMACMODES            =
+BLKCMODES              += $(BLKCMACMODES)
+
 ## A tool for translating the AES-contest test vectors into a form our test
 ## rigs understand.
 EXTRA_DIST             += aes-trans
@@ -193,6 +202,9 @@ 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
@@ -477,6 +489,9 @@ 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
@@ -516,6 +531,9 @@ 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
@@ -583,6 +601,9 @@ MAINTAINERCLEANFILES        += $(GENMODES_H)
 pkginclude_HEADERS     += $(GENMODES_H)
 $(GENMODES_H): modes/gen-stamp
 
+## Additional test machinery.
+libsymmtest_la_SOURCES += modes-test.c modes-test.h
+
 ###--------------------------------------------------------------------------
 ### Autogenerated stub headers.
 
@@ -640,9 +661,13 @@ gmactab.c: gthingtab.c.in Makefile.am
 ## Run the test programs.
 TESTS                  += $(SYMM_TESTS)
 EXTRA_DIST             += $(SYMM_TEST_FILES)
+EXTRA_DIST             += $(REGRESSION_TEST_FILES)
 
-## A piece of sample text for round-trip testing encryption modes.
-EXTRA_DIST             += daftstory.h
+t/modes/%.regress:
+       $(MAKE) modes/$*.t && \
+               mkdir -p $(srcdir)/t/modes/ && \
+               modes/$*.t -o$(srcdir)/$@.new && \
+               mv $(srcdir)/$@.new $(srcdir)/$@
 
 ## Clean the debris from the `modes' subdirectory.
 CLEANFILES             += modes/*.to modes/*.t$(EXEEXT)