63 void maskSubKeys(
const sub_keys_t subKeys, sub_keys_t maskedSubKeys)
const;
void invReMaskState(state_t state) const
(Inverse) re-mask the state after every MixCol step.
void init()
Initialize the masks & the masked inverse S-Box.
RNG mRNG
Random-Number-Generator.
Definition: masking.h:134
void invMaskState(state_t state) const
(Inverse) mask the state before the first AddRoundKey step.
Structure for masks. Masks always come in pairs, with an input & output mask.
Definition: masking.h:107
uint8_t mInvMaskedSBox[SBOX_BYTES]
Inverse S-Box with masked values.
Definition: masking.h:116
void maskSubKeys(const sub_keys_t subKeys, sub_keys_t maskedSubKeys) const
Mask the subKeys & store the masked keys in maskedSubKeys.
uint8_t input
Input mask.
Definition: masking.h:109
void initInvMaskedSBox(uint8_t maskedSBox[], const mask_t &subByteMask) const
Compute the (inverse) masked S-Box.
mask_t mMixColMasks[4]
4 MixCol input & output masks.
Definition: masking.h:132
uint8_t getInvMaskedSBoxValue(const uint8_t index) const
Get a value of the (inverse) masked S-Box at a specific index.
Definition: masking.h:97
Class that provides a random number generator. The RNG can be seeded by reading noise from an unused ...
Definition: rng.h:26
Masking class that provides functionality for masking and unmasking AES-decryption.
Definition: masking.h:36
void invUnMaskState(state_t state) const
(Inverse) un-mask the state after the last AddRoundKey step.
Masking()=default
Construct a new Masking object.
mask_t mSubByteMask
SubByte input & output mask.
Definition: masking.h:124
uint8_t output
Output mask.
Definition: masking.h:110
Logger class that outputs logs over USART.
Definition: logger.h:26
void initMixColInputMask(mask_t mixColMasks[]) const
Compute masks m_i, i=1..4, by performing a MixCol operation on masks m_i'.
Logger mLog
Logger.
Definition: masking.h:136