Skip to main content

ChipOptions

Struct ChipOptions 

Source
pub struct ChipOptions {
    pub io_key_enabled: bool,
    pub io_key_in_slot: u8,
    pub aes_enabled: bool,
    pub kdf_aes_enabled: bool,
    pub ecdh_output_protection: OutputProtectionState,
    pub kdf_output_protection: OutputProtectionState,
    pub kdf_iv_enabled: bool,
    pub kdf_iv_location_at: usize,
    pub kdf_iv_str: [u8; 2],
}
Expand description

structure that stores data for options supported by the chip

Fields§

§io_key_enabled: bool

If true, then the protection functions are enabled via the secret key stored in the slot indicated by io_key_in_slot. If false, the security functions are disabled and fields ‘io_key_in_slot’, ‘ecdh_output_protection’ and ‘kdf_output_protection’ are irrelevant (only relevant for the ATECC608x chip)

§io_key_in_slot: u8

slot number where the key for encrypting transmission between chip and host is placed

§aes_enabled: bool

flag, on-chip availability, AES function

§kdf_aes_enabled: bool

flag, on-chip availability, AES functionality for KDF command

§ecdh_output_protection: OutputProtectionState

restrictions on the way the ECDH command result can be used

§kdf_output_protection: OutputProtectionState

restrictions on the way the KDF command result can be used

§kdf_iv_enabled: bool

availability flag of the special function of the IV KDF command

§kdf_iv_location_at: usize

place in message where special data bytes must be placed when calling function IV of the KDF command

§kdf_iv_str: [u8; 2]

two bytes of data that must be included in message when calling function IV of the KDF command

Trait Implementations§

Source§

impl Clone for ChipOptions

Source§

fn clone(&self) -> ChipOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ChipOptions

Source§

impl Debug for ChipOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ChipOptions

Source§

fn default() -> ChipOptions

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ChipOptions

Source§

fn eq(&self, other: &ChipOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ChipOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V