Struct atsamd_hal::aes::Ctype
source · [−]pub struct Ctype(pub u8);
Expand description
Hardware Countermeasures against Differential Power Analysis Attacks
The AES module features four types of hardware countermeasures that are useful for protecting data against differential power analysis attacks:
- Type 1: Randomly add one cycle to data processing
- Type 2: Randomly add one cycle to data processing (other version)
- Type 3: Add a random number of clock cycles to data processing, subject to a maximum of 11/13/15 clock cycles for key sizes of 128/192/256 bits
- Type 4: Add random spurious power consumption during data processing
By default, all countermeasures are enabled, but require a write in DRNGSEED register to be effective.
The countermeasures use random numbers generated by a deterministic random number generator embedded in AES module.
The seed for the random number generator is written to the RANDSEED register.
Note: also that a new seed must be written after a change in the keysize.
Note: that enabling countermeasures reduces AES module’s throughput. In short, the throughput is highest with all the countermeasures disabled.
Tuple Fields
0: u8
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ctype
impl Send for Ctype
impl Sync for Ctype
impl Unpin for Ctype
impl UnwindSafe for Ctype
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more