Struct lpc55::protected_flash::Keystore
source · [−]pub struct Keystore {
pub header: KeystoreHeader,
pub puf_discharge_time_milliseconds: u32,
pub activation_code: ActivationCode,
pub secure_boot_kek: Keycode,
pub user_key: Keycode,
pub unique_device_secret: Keycode,
pub prince_region_0: Keycode,
pub prince_region_1: Keycode,
pub prince_region_2: Keycode,
}
Expand description
All the keys :)
We “unroll” the prince_regions array to be able to serialize_with hex_serialize.
Fields
header: KeystoreHeader
The Excel spreadsheet says “Valid Key Sore Header : 0x95959595u”.
Empirically, this value 2509608341 appears as header in the PFR as soon as PUF is enrolled, regardless of number of key codes stored.
UM 11126 says: “Marker. A value of 0x95959595 means that Activation code is valid.”
puf_discharge_time_milliseconds: u32
Excel spreadsheet specifies this interpretation.
Seems this can’t be actually set anywhere.
activation_code: ActivationCode
1192 bytes of data, generated when PUF is enrolled.
secure_boot_kek: Keycode
KEK for secure boot, aka SBKEK.
This is an actual “key encryption key”. The SB2.1 container format uses two “random” firmware encryption and MAC keys, which are stored via AES keywrap with this SBKEK in the container.
user_key: Keycode
unique_device_secret: Keycode
Key intended for use with the “DICE” algorithm, which is a Microsoft standard to ensure devices and their firmware are authentic; based on symmetric cryptography.
prince_region_0: Keycode
Key used when PRINCE is activated for the first PRINCE region (first 256K flash)
prince_region_1: Keycode
Key used when PRINCE is activated for the first PRINCE region (second 256K flash)
prince_region_2: Keycode
Key used when PRINCE is activated for the first PRINCE region (last 128K flash, or more precisely, 119.5K – excluding PFR itself)
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Keystore
impl<'de> Deserialize<'de> for Keystore
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>,
sourceimpl Ord for Keystore
impl Ord for Keystore
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
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>,
sourceimpl PartialOrd<Keystore> for Keystore
impl PartialOrd<Keystore> for Keystore
sourcefn partial_cmp(&self, other: &Keystore) -> Option<Ordering>
fn partial_cmp(&self, other: &Keystore) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Keystore
impl Eq for Keystore
impl StructuralEq for Keystore
impl StructuralPartialEq for Keystore
Auto Trait Implementations
impl RefUnwindSafe for Keystore
impl Send for Keystore
impl Sync for Keystore
impl Unpin for Keystore
impl UnwindSafe for Keystore
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
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
key
and return true
if they are equal.