[Cryptech-Commits] [core/cipher/aes] branch master updated: Added a test case for AES with test vectors from processing NIST KWP keywrap operation. This verifies that we are using the AES core correctly in the keywrap core. But it is a new test vector for AES too.

git at cryptech.is git at cryptech.is
Wed Jul 4 13:03:14 UTC 2018


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

joachim at secworks.se pushed a commit to branch master
in repository core/cipher/aes.

The following commit(s) were added to refs/heads/master by this push:
     new fa155de  Added a test case for AES with test vectors from processing NIST KWP keywrap operation. This verifies that we are using the AES core correctly in the keywrap core. But it is a new test vector for AES too.
fa155de is described below

commit fa155de5469627ae0ff942ea452f2f92f169767c
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Wed Jul 4 15:02:26 2018 +0200

    Added a test case for AES with test vectors from processing NIST KWP keywrap operation. This verifies that we are using the AES core correctly in the keywrap core. But it is a new test vector for AES too.
---
 src/tb/tb_aes.v | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/tb/tb_aes.v b/src/tb/tb_aes.v
index 35fc1d9..1e229d9 100644
--- a/src/tb/tb_aes.v
+++ b/src/tb/tb_aes.v
@@ -531,6 +531,33 @@ module tb_aes();
   endtask // aes_test
 
 
+
+  //----------------------------------------------------------------
+  // nist_kwp_ae_128_test()
+  //
+  // Test that we can perform operations based on NIST KWP
+  // AE 128 test vectors.
+  //----------------------------------------------------------------
+  task nist_kwp_ae_128_test;
+    reg [255 : 0] kwp_key;
+    reg [127 : 0] kwp_plaintext;
+    reg [127 : 0] kwp_expected;
+
+    begin
+      kwp_key       = 256'hc03db3cc1416dcd1c069a195a8d77e3d00000000000000000000000000000000;
+      kwp_plaintext = 128'ha65959a60000001f46f87f58cdda4200;
+      kwp_expected  = 128'hd1bac797ff82fa4bde9f7490729fd0a7;
+
+      $display("");
+      $display("NIST KWP AE 128 bit test");
+
+      ecb_mode_single_block_test(8'h01, AES_ENCIPHER, kwp_key, AES_128_BIT_KEY,
+                                 kwp_plaintext, kwp_expected);
+    end
+  endtask // nist_kwp_ae_128_test
+
+
+
   //----------------------------------------------------------------
   // main
   //
@@ -548,6 +575,7 @@ module tb_aes();
       dump_dut_state();
 
       aes_test();
+      nist_kwp_ae_128_test();
 
       display_test_results();
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list