From 8ef2a4e5f54c8623c98c396e378ec093629b849b Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Sun, 6 Jun 2021 23:01:11 -0400 Subject: Add support for the SHA-3 core. --- verilog_constants.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'verilog_constants.h') 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. */ -- cgit v1.2.3