Rearrange the file tree.
[u/mdw/catacomb] / symm / t / md4
diff --git a/symm/t/md4 b/symm/t/md4
new file mode 100644 (file)
index 0000000..0b78cc4
--- /dev/null
@@ -0,0 +1,57 @@
+# Test vectors for MD4 hash function
+
+# --- Basic hash function ---
+#
+# Test vectors from RFC1186 and some others I generated using the reference
+# implementation.
+
+md4 {
+  ""                   31d6cfe0d16ae931b73c59d7e0c089c0;
+  "a"                  bde52cb31de33e46245e05fbdbd6fb24;
+  "abc"                        a448017aaf21d8525fc10ae87aa6729d;
+  "message digest"     d9130a8164549fe818874806e1c7014b;
+  "abcdefghijklmnopqrstuvwxyz"
+                       d79e1c308aa5bbcdeea8ed63df412da9;
+  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
+                       043f8582f241db351ce627e153e7f0e4;
+}
+
+# --- HMAC mode ---
+#
+# No test vectors available.  The HMAC implementation has not been tested
+# against an external reference.  However, MD4 isn't strong enough to make
+# a realistic MAC anyway, and use of md4-mac is thoroughly deprecated.  The
+# HMAC code is autogenerated anyway, and ought to be reliable and correct.
+#
+# These test vectors are here to spot changes in behaviour rather than ensure
+# interoperability.
+
+md4-hmac {
+  "Hi There"
+       0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
+       90a79458f58f437e21f169cdba283da6;
+
+  "what do ya want for nothing?"
+       4a656665
+       be192c588a8e914d8a59b474a828128f;
+
+  "ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝ"
+       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+       75e5fb6e71ca6dcdd9fca269a9a3cd9c;
+
+  "ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"
+       0102030405060708090a0b0c0d0e0f10111213141516171819
+       fb14cddf9efe11ad24033fc70f37bb9e;
+
+  "Test With Truncation"
+       0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
+       6306262f9ba0e83f9ce3f15aafc23be8;
+
+  "Test Using Larger Than Block-Size Key - Hash Key First"
+       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+       545b8f2577657042df628fbb98430d5f;
+
+  "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"
+       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+       0192f3442ad5d1ea5268306ab0d4962e;
+}