diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tb/tb_aes.v | 28 |
1 files changed, 28 insertions, 0 deletions
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(); |