Enum lpc55::bootloader::command::KeystoreOperation
source · [−]#[repr(u8)]
pub enum KeystoreOperation {
Enroll,
SetKey {
key: Key,
data: Vec<u8>,
},
GenerateKey {
key: Key,
len: u32,
},
WriteNonVolatile,
ReadNonVolatile,
WriteKeystore,
ReadKeystore,
}
Expand description
This is the interface definition to a somewhat limited bootloader API, that then operates on the actual PFR data and PUF periphreal.
The operations Enroll, SetKey, GenerateKey create activation codes or key codes, which the bootloader keeps in RAM and only writes to PFR once WriteNonVolatile is called. If this is not done, on reboot, the PUF is unenrolled again, or the keys are not set anymore.
It doesn’t however seem possible to set/generate new keys after reboot without
re-enrolling PUF, calling set/generate key results in a Generic(Fail)
. Calling
ReadNonVolatile does not help; the author does not understand the effect of this command.
Variants
Enroll
SetKey
GenerateKey
WriteNonVolatile
ReadNonVolatile
WriteKeystore
ReadKeystore
Trait Implementations
sourceimpl Clone for KeystoreOperation
impl Clone for KeystoreOperation
sourcefn clone(&self) -> KeystoreOperation
fn clone(&self) -> KeystoreOperation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for KeystoreOperation
impl Debug for KeystoreOperation
sourceimpl<'de> Deserialize<'de> for KeystoreOperation
impl<'de> Deserialize<'de> for KeystoreOperation
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<&KeystoreOperation> for u32
impl From<&KeystoreOperation> for u32
sourcefn from(operation: &KeystoreOperation) -> Self
fn from(operation: &KeystoreOperation) -> Self
Converts to this type from the input type.
sourceimpl Hash for KeystoreOperation
impl Hash for KeystoreOperation
sourceimpl Ord for KeystoreOperation
impl Ord for KeystoreOperation
sourcefn cmp(&self, other: &KeystoreOperation) -> Ordering
fn cmp(&self, other: &KeystoreOperation) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<KeystoreOperation> for KeystoreOperation
impl PartialEq<KeystoreOperation> for KeystoreOperation
sourcefn eq(&self, other: &KeystoreOperation) -> bool
fn eq(&self, other: &KeystoreOperation) -> bool
sourceimpl PartialOrd<KeystoreOperation> for KeystoreOperation
impl PartialOrd<KeystoreOperation> for KeystoreOperation
sourcefn partial_cmp(&self, other: &KeystoreOperation) -> Option<Ordering>
fn partial_cmp(&self, other: &KeystoreOperation) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl Serialize for KeystoreOperation
impl Serialize for KeystoreOperation
impl Eq for KeystoreOperation
impl StructuralEq for KeystoreOperation
impl StructuralPartialEq for KeystoreOperation
Auto Trait Implementations
impl RefUnwindSafe for KeystoreOperation
impl Send for KeystoreOperation
impl Sync for KeystoreOperation
impl Unpin for KeystoreOperation
impl UnwindSafe for KeystoreOperation
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.