aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/model/python/sha512.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/model/python/sha512.py b/src/model/python/sha512.py
index 9e7cded..f25e6ae 100755
--- a/src/model/python/sha512.py
+++ b/src/model/python/sha512.py
@@ -295,6 +295,24 @@ def compare_digests(digest, expected):
print("Test case ok.")
+
+#-------------------------------------------------------------------
+# double_block_tests()
+#
+# NIST tests with dual block messages.
+#-------------------------------------------------------------------
+def double_block_tests():
+ TC_BLOCK1 = [0x6162636465666768, 0x6263646566676869, 0x636465666768696A, 0x6465666768696A6B,
+ 0x65666768696A6B6C, 0x666768696A6B6C6D, 0x6768696A6B6C6D6E, 0x68696A6B6C6D6E6F,
+ 0x696A6B6C6D6E6F70, 0x6A6B6C6D6E6F7071, 0x6B6C6D6E6F707172, 0x6C6D6E6F70717273,
+ 0x6D6E6F7071727374, 0x6E6F707172737475, 0x8000000000000000, 0x0000000000000000]
+
+ TC_BLOC2 = [0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
+ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
+ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
+ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000380]
+
+
#-------------------------------------------------------------------
# single_block_tests()
#