[Cryptech-Commits] [user/js/keywrap] branch auto_zeroise updated: Fixed parameterized widths.
git at cryptech.is
git at cryptech.is
Fri Jan 11 14:12:00 UTC 2019
This is an automated email from the git hooks/post-receive script.
joachim at secworks.se pushed a commit to branch auto_zeroise
in repository user/js/keywrap.
The following commit(s) were added to refs/heads/auto_zeroise by this push:
new 3455dd0 Fixed parameterized widths.
3455dd0 is described below
commit 3455dd0940bb09e2f08c7951d3b10f415251af80
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Fri Jan 11 15:11:46 2019 +0100
Fixed parameterized widths.
---
src/rtl/keywrap.v | 4 ++--
src/rtl/keywrap_core.v | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/rtl/keywrap.v b/src/rtl/keywrap.v
index 73a861c..d6a2b5e 100644
--- a/src/rtl/keywrap.v
+++ b/src/rtl/keywrap.v
@@ -262,7 +262,7 @@ module keywrap #(parameter ADDR_BITS = 13)
end
if (rlen_we)
- rlen_reg <= write_data[12 : 0];
+ rlen_reg <= write_data[(RLEN_BITS - 1) : 0];
if (a0_we)
a0_reg <= write_data;
@@ -374,7 +374,7 @@ module keywrap #(parameter ADDR_BITS = 13)
api_rd_delay_new = timeout_reg;
if (address == {{PAD{1'h0}}, ADDR_RLEN})
- api_rd_delay_new = {19'h0, rlen_reg};
+ api_rd_delay_new = {{(32 - RLEN_BITS){1'h0}}, rlen_reg};
if (address == {{PAD{1'h0}}, ADDR_A0})
api_rd_delay_new = core_a_result[63 : 32];
diff --git a/src/rtl/keywrap_core.v b/src/rtl/keywrap_core.v
index 3da4a19..adb3099 100644
--- a/src/rtl/keywrap_core.v
+++ b/src/rtl/keywrap_core.v
@@ -285,7 +285,7 @@ module keywrap_core #(parameter MEM_BITS = 11)
core_addr = block_ctr_reg;
core_we = 1'h0;
- xor_val = (rlen * iteration_ctr_reg) + {51'h0, (block_ctr_reg + 1'h1)};
+ xor_val = (rlen * iteration_ctr_reg) + {53'h0, (block_ctr_reg + 1'h1)};
if (encdec)
aes_block = {a_reg, core_rd_data};
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list