symm/latinpoly-def.h: Implement Bernstein's `crypto_secretbox'.
[catacomb] / symm / chacha-poly1305.c
index f307e6b..657987e 100644 (file)
@@ -50,6 +50,12 @@ static int check_chacha12_poly1305(dstr *v)
   { return latinpoly_test(&chacha12_poly1305, v); }
 static int check_chacha8_poly1305(dstr *v)
   { return latinpoly_test(&chacha8_poly1305, v); }
+static int check_chacha20_naclbox(dstr *v)
+  { return latinpoly_test(&chacha20_naclbox, v); }
+static int check_chacha12_naclbox(dstr *v)
+  { return latinpoly_test(&chacha12_naclbox, v); }
+static int check_chacha8_naclbox(dstr *v)
+  { return latinpoly_test(&chacha8_naclbox, v); }
 
 static const test_chunk tests[] = {
   { "chacha20-poly1305", check_chacha20_poly1305,
@@ -58,6 +64,12 @@ static const test_chunk tests[] = {
     { &type_hex, &type_hex, &type_hex, &type_hex, &type_hex, &type_hex } },
   { "chacha8-poly1305", check_chacha8_poly1305,
     { &type_hex, &type_hex, &type_hex, &type_hex, &type_hex, &type_hex } },
+  { "chacha20-naclbox", check_chacha20_naclbox,
+    { &type_hex, &type_hex, &type_hex, &type_hex, &type_hex, &type_hex } },
+  { "chacha12-naclbox", check_chacha12_naclbox,
+    { &type_hex, &type_hex, &type_hex, &type_hex, &type_hex, &type_hex } },
+  { "chacha8-naclbox", check_chacha8_naclbox,
+    { &type_hex, &type_hex, &type_hex, &type_hex, &type_hex, &type_hex } },
   { 0, 0, { 0 } }
 #undef TEST
 };