[Cryptech-Commits] [core/hash/sha512] branch clock_speed updated: Adding message blocks for multi block tests.
git at cryptech.is
git at cryptech.is
Thu Apr 5 14:57:57 UTC 2018
This is an automated email from the git hooks/post-receive script.
joachim at secworks.se pushed a commit to branch clock_speed
in repository core/hash/sha512.
The following commit(s) were added to refs/heads/clock_speed by this push:
new 75248c0 Adding message blocks for multi block tests.
75248c0 is described below
commit 75248c00c275820b8499a8c938b4bf465be20812
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Thu Apr 5 16:57:44 2018 +0200
Adding message blocks for multi block tests.
---
src/model/python/sha512.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
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()
#
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list