diff options
author | Paul Selkirk <paul@psgd.org> | 2021-06-06 23:01:11 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2021-06-07 15:37:06 -0400 |
commit | 8ef2a4e5f54c8623c98c396e378ec093629b849b (patch) | |
tree | 8b3d32e4af36dca5bb9b0ef36deb16067542364e /verilog_constants.h | |
parent | 93887dfe46225b4b7aafb63907ca26cce68c1510 (diff) |
Add support for the SHA-3 core.
Diffstat (limited to 'verilog_constants.h')
-rw-r--r-- | verilog_constants.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/verilog_constants.h b/verilog_constants.h index 4588c20..8db5e29 100644 --- a/verilog_constants.h +++ b/verilog_constants.h @@ -90,6 +90,19 @@ #define SHA512_MODE_SHA_512 (3 << 2) #define SHA512_MODE_MASK (3 << 2) +#define SHA3_ADDR_BLOCK (0x80) +#define SHA3_ADDR_DIGEST (0xC0) +#define SHA3_STATE_LEN bitsToBytes(1600) +#define SHA3_224_BLOCK_LEN bitsToBytes(1152) +#define SHA3_256_BLOCK_LEN bitsToBytes(1088) +#define SHA3_384_BLOCK_LEN bitsToBytes(832) +#define SHA3_512_BLOCK_LEN bitsToBytes(576) +#define SHA3_LENGTH_LEN bitsToBytes(0) +#define SHA3_224_DIGEST_LEN bitsToBytes(224) +#define SHA3_256_DIGEST_LEN bitsToBytes(256) +#define SHA3_384_DIGEST_LEN bitsToBytes(384) +#define SHA3_512_DIGEST_LEN bitsToBytes(512) + /* * RNG cores. */ |