[Cryptech-Commits] [sw/libhal] branch master updated: Reduce keywrap to 16 core blocks, to match how it's actually built now.

git at cryptech.is git at cryptech.is
Wed Mar 25 17:30:12 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 sw/libhal.

The following commit(s) were added to refs/heads/master by this push:
     new 6f8ac4f  Reduce keywrap to 16 core blocks, to match how it's actually built now.
6f8ac4f is described below

commit 6f8ac4f72ef2fb003038293a62e47edf6c962b36
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Wed Mar 25 13:28:59 2020 -0400

    Reduce keywrap to 16 core blocks, to match how it's actually built now.
---
 aes_keywrap.c       | 2 +-
 core.c              | 2 +-
 verilog_constants.h | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/aes_keywrap.c b/aes_keywrap.c
index d43a96f..3a5ce2e 100644
--- a/aes_keywrap.c
+++ b/aes_keywrap.c
@@ -198,7 +198,7 @@ static hal_error_t do_keywrap_core(const hal_core_t *core, uint8_t * const C, co
   if ((err = hal_io_read(core, KEYWRAP_ADDR_A0, C, 8)) != HAL_OK)
     return err;
 
-  /* read the data to R_DATA */
+  /* read the data from R_DATA */
   if ((err = hal_io_read(core, KEYWRAP_ADDR_R_DATA, C + 8, 8 * n)) != HAL_OK)
       return err;
 
diff --git a/core.c b/core.c
index 7e49d25..5d3b017 100644
--- a/core.c
+++ b/core.c
@@ -104,7 +104,7 @@ static inline hal_core_t *probe_cores(void)
     { "modexps6", 3 * CORE_SIZE }, /* ModexpS6 uses four slots */
     { "modexpa7", 7 * CORE_SIZE }, /* ModexpA7 uses eight slots */
     { "modexpng", 15 * CORE_SIZE }, /* ModexpNG uses 16 slots */
-    { "key wrap", 31 * CORE_SIZE }, /* keywrap uses 32 slots */
+    { "key wrap", 15 * CORE_SIZE }, /* keywrap uses 16 slots */
   };
 
   if (offsetof(hal_core_t, info) != 0)
diff --git a/verilog_constants.h b/verilog_constants.h
index db75294..9ed84d4 100644
--- a/verilog_constants.h
+++ b/verilog_constants.h
@@ -364,8 +364,8 @@
 #define KEYWRAP_ADDR_KEY6       (0x16)
 #define KEYWRAP_ADDR_KEY7       (0x17)
 
-#define KEYWRAP_ADDR_R_DATA     (0x1000)
-#define KEYWRAP_LEN_R_DATA      (0x1000)
+#define KEYWRAP_ADDR_R_DATA     (0x800)
+#define KEYWRAP_LEN_R_DATA      (0x800)
 
 #endif /* _VERILOG_CONSTANTS_H_ */
 

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


More information about the Commits mailing list