summaryrefslogtreecommitdiff
path: root/testsuite/chacha-poly1305-test.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-02-12 22:19:47 +0100
committerNiels Möller <nisse@lysator.liu.se>2014-02-12 22:19:47 +0100
commit61925232a2b1fdca34fc179a626afa7931973437 (patch)
tree8f3a98238b5ad358d6dd2f8f1ca402e2864fa614 /testsuite/chacha-poly1305-test.c
parent130683715e3e06a91f83ed088cd921b8a54c1e52 (diff)
downloadnettle-61925232a2b1fdca34fc179a626afa7931973437.tar.gz
Implemented chacha-poly1305.
Diffstat (limited to 'testsuite/chacha-poly1305-test.c')
-rw-r--r--testsuite/chacha-poly1305-test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/chacha-poly1305-test.c b/testsuite/chacha-poly1305-test.c
new file mode 100644
index 00000000..2f320f32
--- /dev/null
+++ b/testsuite/chacha-poly1305-test.c
@@ -0,0 +1,16 @@
+#include "testutils.h"
+#include "nettle-internal.h"
+
+void
+test_main(void)
+{
+ /* From draft-agl-tls-chacha20poly1305-04 */
+ test_aead (&nettle_chacha_poly1305, NULL,
+ SHEX("4290bcb154173531f314af57f3be3b50"
+ "06da371ece272afa1b5dbdd1100a1007"), /* key */
+ SHEX("87e229d4500845a079c0"), /* auth data */
+ SHEX("86d09974840bded2a5ca"), /* plain text */
+ SHEX("e3e446f7ede9a19b62a4"), /* ciphertext */
+ SHEX("cd7cf67be39c794a"), /* nonce */
+ SHEX("677dabf4e3d24b876bb284753896e1d6")); /* tag */
+}