Implement AEAD-ChaCha20-Poly1305.
This implementation is based off the description in RFC 7539.
The ChaCha20 code is also updated to provide a means of generating
keystream blocks with arbitrary counter values. This is used to
generated the one-time Poly1305 key in the AEAD construction.
diff --git a/tests/Makefile b/tests/Makefile
index 90b2028..4a23e64 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -45,7 +45,8 @@
LOCAL_LDFLAGS += -lz
endif
-APPS = test_suite_aes.ecb$(EXEXT) test_suite_aes.cbc$(EXEXT) \
+APPS = test_suite_aead_chacha20_poly1305$(EXEXT) \
+ test_suite_aes.ecb$(EXEXT) test_suite_aes.cbc$(EXEXT) \
test_suite_aes.cfb$(EXEXT) test_suite_aes.rest$(EXEXT) \
test_suite_arc4$(EXEXT) test_suite_asn1write$(EXEXT) \
test_suite_base64$(EXEXT) test_suite_blowfish$(EXEXT) \
@@ -203,6 +204,11 @@
echo " Gen $@"
perl scripts/generate_code.pl suites $* $*
+
+test_suite_aead_chacha20_poly1305$(EXEXT): test_suite_aead_chacha20_poly1305.c $(DEP)
+ echo " CC $<"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+
test_suite_aes.ecb$(EXEXT): test_suite_aes.ecb.c $(DEP)
echo " CC $<"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@