pub struct OwnerBlock {Show 15 fields
pub header: TlvHeader,
pub config_version: u32,
pub sram_exec: SramExecMode,
pub ownership_key_alg: OwnershipKeyAlg,
pub update_mode: OwnershipUpdateMode,
pub min_security_version_bl0: MinSecurityVersion,
pub lock_constraint: u32,
pub device_id: [u32; 8],
pub reserved: [u32; 16],
pub owner_key: KeyMaterial,
pub activate_key: KeyMaterial,
pub unlock_key: KeyMaterial,
pub data: Vec<OwnerConfigItem>,
pub signature: EcdsaRawSignature,
pub seal: Vec<u8>,
}Expand description
Describes the owner configuration and key material.
Fields§
§header: TlvHeaderHeader identifying this struct.
config_version: u32Configuraion version (monotonically increasing per owner).
sram_exec: SramExecModeWhether the owner wants to permit code execution in SRAM.
ownership_key_alg: OwnershipKeyAlgThe key algorithm of the ownership keys.
update_mode: OwnershipUpdateModeOwnership update mode.
min_security_version_bl0: MinSecurityVersionSet the minimum security version to this value.
lock_constraint: u32The device ID locking constraint.
device_id: [u32; 8]The device ID to which this config applies.
reserved: [u32; 16]§owner_key: KeyMaterialThe owner identity key.
activate_key: KeyMaterialThe owner activation key.
unlock_key: KeyMaterialThe owner unlock key.
data: Vec<OwnerConfigItem>A list of other configuration items (application keys, flash configuration, etc).
signature: EcdsaRawSignatureA signature over this block with the owner key.
seal: Vec<u8>A sealing value that locks a configuration to a particular device.
Implementations§
Source§impl OwnerBlock
impl OwnerBlock
pub const SIZE: usize = 2_048usize
pub const DATA_SIZE: usize = 1_536usize
pub const SIGNATURE_OFFSET: usize = 1_952usize
pub fn default_header() -> TlvHeader
pub fn basic() -> Self
pub fn write(&self, dest: &mut impl Write) -> Result<()>
pub fn read(src: &mut impl Read, header: TlvHeader) -> Result<Self>
pub fn sign(&mut self, key: &EcdsaPrivateKey) -> Result<()>
pub fn is_default_constraint(d: &[u32; 8]) -> bool
pub fn default_constraint() -> [u32; 8]
Trait Implementations§
Source§impl Annotate for OwnerBlock
impl Annotate for OwnerBlock
Source§impl Debug for OwnerBlock
impl Debug for OwnerBlock
Source§impl Default for OwnerBlock
impl Default for OwnerBlock
Source§impl<'de> Deserialize<'de> for OwnerBlock
impl<'de> Deserialize<'de> for OwnerBlock
Source§fn 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
Auto Trait Implementations§
impl Freeze for OwnerBlock
impl RefUnwindSafe for OwnerBlock
impl Send for OwnerBlock
impl Sync for OwnerBlock
impl Unpin for OwnerBlock
impl UnwindSafe for OwnerBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more