Class that implements 2 hiding techniques: dummy-ops & shuffling.
Definition hiding.h:32
void dummyOp()
Perform a dummy NOP operation a random number of times.
RNG mRNG
Random number generator.
Definition hiding.h:78
void init()
Initialize AES hiding operations.
static constexpr uint8_t NUMBER_OPS
The number of operations before which the dummy ops are executed.
Definition hiding.h:69
void shuffleSBoxAccess(uint8_t indices[])
Shuffle the S-Box access.
uint8_t mNoOpCounter
Counter for the number of dummy ops per round.
Definition hiding.h:71
Hiding()=default
Construct a new Hiding object.
static uint8_t DEFAULT_INV_SBOX_INDICES[STATE_BYTES]
Array that contains values from 0 to 15.
Definition hiding.h:75
uint8_t mNumbersDummyOps[NUMBER_OPS]
Array of random numbers, which specify the number of dummy ops per round.
Definition hiding.h:70
void shuffleArray(uint8_t array[], const uint8_t size)
Shuffle an array using the Fisher-Yates shuffle.
static constexpr uint8_t MAX_NUMBER_NO_OPS
The maximum number of NOPs per AES execution. It is important that this number stays the same for eve...
Definition hiding.h:68
Class that provides a random number generator. The RNG can be seeded by reading noise from an unused ...
Definition rng.h:27