|
void | ExpectMessageByte (const uint8_t *message, const size_t size) |
| Set mmio write expectation for 8 bits data size. More...
|
|
void | ExpectMessageInt32 (const uint8_t *message, const size_t size) |
| Set mmio write expectation for 32 bits data size considering an alignment of 32 bits. More...
|
|
void | ExpectConfig (void) |
|
void | ExpectKey (const dif_kmac_key_t &key) |
|
void | ExpectPrefix (const uint32_t *prefix_regs, uint32_t size) |
|
void | ExpectEntropySeed (const uint32_t *seed) |
|
uint32_t | GetRateBits (uint32_t security_level) |
|
uint32_t | GetRateWords (uint32_t security_level) |
|
MockDevice & | dev () |
|
|
static constexpr std::array< uint8_t, 17 > | kMsg |
|
Definition at line 120 of file dif_kmac_unittest.cc.
◆ dif_kmac_unittest::KmacTest::ConfigRegister
struct dif_kmac_unittest::KmacTest::ConfigRegister |
Definition at line 135 of file dif_kmac_unittest.cc.
Data Fields |
bool |
enable |
|
bool |
enable_unsupported_mode_strength |
|
bool |
entropy_fast_process |
|
uint16_t |
entropy_hash_threshold |
|
uint8_t |
entropy_mode |
|
uint16_t |
entropy_prescaler |
|
bool |
entropy_ready |
|
uint16_t |
entropy_wait_timer |
|
uint8_t |
key_strength |
|
uint8_t |
mode |
|
bool |
msg_big_endian |
|
bool |
msg_mask |
|
bool |
sideload |
|
bool |
state_big_endian |
|
◆ ExpectMessageByte()
void dif_kmac_unittest::KmacTest::ExpectMessageByte |
( |
const uint8_t * |
message, |
|
|
const size_t |
size |
|
) |
| |
|
inlineprotected |
Set mmio write expectation for 8 bits data size.
- Parameters
-
message | Buffer with the data. |
size | Len of the buffer. |
Definition at line 160 of file dif_kmac_unittest.cc.
◆ ExpectMessageInt32()
void dif_kmac_unittest::KmacTest::ExpectMessageInt32 |
( |
const uint8_t * |
message, |
|
|
const size_t |
size |
|
) |
| |
|
inlineprotected |
Set mmio write expectation for 32 bits data size considering an alignment of 32 bits.
- Parameters
-
message | Buffer with the data. |
size | Len of the buffer. |
Definition at line 173 of file dif_kmac_unittest.cc.
◆ kMsg
constexpr std::array< uint8_t, 17 > dif_kmac_unittest::KmacTest::kMsg |
|
staticconstexprprotected |
Initial value:= {
0xa7, 0x48, 0x47, 0x93, 0x0a, 0x03, 0xab, 0xee, 0xa4,
0x73, 0xe1, 0xf3, 0xdc, 0x30, 0xb8, 0x88, 0x15}
Definition at line 131 of file dif_kmac_unittest.cc.
◆ op_state_
Initial value:= {
.squeezing = false,
.append_d = false,
.offset = 0,
.r = 0,
.d = 0,
}
Definition at line 123 of file dif_kmac_unittest.cc.