[Cryptech-Commits] [test/novena_base] 01/01: Adding NIST test vectors for single and dual block sha256 tests. Adding function stubs for tests.

git at cryptech.is git at cryptech.is
Wed Feb 4 16:58:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

joachim at secworks.se pushed a commit to branch sha256_core
in repository test/novena_base.

commit d9e90335c5ba49c63f3e86acc72d401ac5138de9
Author: Joachim Strömbergson <joachim at secworks.se>
Date:   Wed Feb 4 17:58:51 2015 +0100

    Adding NIST test vectors for single and dual block sha256 tests. Adding function stubs for tests.
---
 sw/test-sha256/test-sha256.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/sw/test-sha256/test-sha256.c b/sw/test-sha256/test-sha256.c
index 9b0fa1d..d87a902 100644
--- a/sw/test-sha256/test-sha256.c
+++ b/sw/test-sha256/test-sha256.c
@@ -65,6 +65,31 @@
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
+void test_single_block()
+{
+  // Single block test vector as specified by NIST.
+  //tc0 = 512'h61626380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018;
+  //res0 = 256'hBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD;
+
+
+}
+
+
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void test_dual_block()
+{
+  // Dual block test vectors as specified by NIST.
+ // tc1_0 = 512'h6162636462636465636465666465666765666768666768696768696A68696A6B696A6B6C6A6B6C6D6B6C6D6E6C6D6E6F6D6E6F706E6F70718000000000000000;
+ // res1_0 = 256'h85E655D6417A17953363376A624CDE5C76E09589CAC5F811CC4B32C1F20E533A;
+ // tc1_1 = 512'h000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001C0;
+ // res1_1 = 256'h248D6A61D20638B8E5C026930C3E6039A33CE45964FF2167F6ECEDD419DB06C1;
+
+
+}
+
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 void test_sha256()
 {
   unsigned int write_addr;



More information about the Commits mailing list