pub struct Config { /* private fields */ }Expand description
ECC peripheral configuration.
The default turns enhanced security on, where the chip supports it.
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_force_enable_reg_clock(self, force_enable_reg_clock: bool) -> Self
pub fn with_force_enable_reg_clock(self, force_enable_reg_clock: bool) -> Self
Assign the given value to the force_enable_reg_clock field.
Sourcepub fn force_enable_reg_clock(&self) -> bool
pub fn force_enable_reg_clock(&self) -> bool
Force-enables the register clock.
Sourcepub fn with_force_enable_mem_clock(self, force_enable_mem_clock: bool) -> Self
pub fn with_force_enable_mem_clock(self, force_enable_mem_clock: bool) -> Self
Assign the given value to the force_enable_mem_clock field.
Sourcepub fn force_enable_mem_clock(&self) -> bool
pub fn force_enable_mem_clock(&self) -> bool
Force-enables the memory clock.
Sourcepub fn with_enhanced_security(self, enhanced_security: bool) -> Self
pub fn with_enhanced_security(self, enhanced_security: bool) -> Self
Assign the given value to the enhanced_security field.
Sourcepub fn with_enhanced_security_none(self) -> Self
pub fn with_enhanced_security_none(self) -> Self
Set the value of enhanced_security to None.
Sourcepub fn enhanced_security(&self) -> Option<bool>
pub fn enhanced_security(&self) -> Option<bool>
Enables constant time operation and minimized power consumption variation for point-multiplication operations.
Turning it off makes a point multiplication faster by an amount that depends on the scalar’s bit pattern. The time then exposes the scalar to timing-based side-channel attacks. Turn it off only for a public scalar.
None enables the mode where the chip revision supports it. Where it does not, None
logs a warning and Some(true) is refused with
ConfigError::EnhancedSecurityUnsupported. A caller that needs constant time passes
true.
Default value: None.
Only available on chip revision 1.2 and above.
Trait Implementations§
impl Copy for Config
unstable only.impl Eq for Config
unstable only.impl StructuralPartialEq for Config
unstable only.Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)