[Cryptech-Commits] [core/util/keywrap] 26/95: Fixed bugs in the API decoding logic.

git at cryptech.is git at cryptech.is
Wed Mar 25 17:18:25 UTC 2020


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

paul at psgd.org pushed a commit to branch master
in repository core/util/keywrap.

commit 7fe900da33635fd343a7ba585624a77f5dfd79af
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Fri Jun 29 10:46:35 2018 +0200

    Fixed bugs in the API decoding logic.
---
 src/rtl/keywrap.v | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/rtl/keywrap.v b/src/rtl/keywrap.v
index 3c3ddc1..54bc547 100644
--- a/src/rtl/keywrap.v
+++ b/src/rtl/keywrap.v
@@ -265,10 +265,10 @@ module keywrap(
               if (address == ADDR_RLEN)
                 config_we = 1'h1;
 
-              if (ADDR_A_LSB)
+              if (address == ADDR_A_LSB)
                 a0_we = 1'h1;
 
-              if (ADDR_A_MSB)
+              if (address == ADDR_A_MSB)
                 a1_we = 1'h1;
 
               if ((address >= ADDR_KEY0) && (address <= ADDR_KEY7))
@@ -295,10 +295,10 @@ module keywrap(
                   end
               endcase // case (address)
 
-              if (ADDR_A_LSB)
+              if (address == ADDR_A_LSB)
                 tmp_read_data = core_a_result[31 : 0];
 
-              if (ADDR_A_MSB)
+              if (address == ADDR_A_MSB)
                 tmp_read_data = core_a_result[63 : 32];
 
               if (address == ADDR_READ_DATA)



More information about the Commits mailing list