Struct lpc55::secure_binary::Reproducibility
source · [−]pub struct Reproducibility {
pub dek: [u8; 32],
pub mac: [u8; 32],
pub nonce: [u32; 4],
pub timestamp: u64,
pub sb_header_padding: [u8; 4],
}
Fields
dek: [u8; 32]
Encryption key for SB2.1 command sections.
If left out, [0u8; 32]
is used.
mac: [u8; 32]
MAC key for SB2.1 command sections.
If left out, [0u8; 32]
is used.
nonce: [u32; 4]
Nonce for the “AES-CTR-in-NXP-variant” encryption of the firmware.
If left out, all zeros are used.
This differs from vendor’s elftosb
, in order to ensure default
reproducibility, and we don’t have the encrypted firmware use case.
timestamp: u64
Timestamp in microseconds since 2000-01-01
If left out of configuration, when signing the product
version
of Firmware
is is interpreted as calver (i.e., minor version is
interpreted as days since 2020-01-01) and used. This is in contrast
to the vendor’s implementation, which uses “current” time, making the
build unreproducible.
sb_header_padding: [u8; 4]
NXP fills the last 4 bytes of Sb2Header
with random values.
For the non-private firmware case (where encryption is a farce, since SBKEK is well-known),
if this is left out, we use [0u8; 4]
. The configuration option exists to match elftosb
generated SB2.1 containers with ours (by copying their choice).
Trait Implementations
sourceimpl Clone for Reproducibility
impl Clone for Reproducibility
sourcefn clone(&self) -> Reproducibility
fn clone(&self) -> Reproducibility
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for Reproducibility
impl Debug for Reproducibility
sourceimpl Default for Reproducibility
impl Default for Reproducibility
sourcefn default() -> Reproducibility
fn default() -> Reproducibility
sourceimpl<'de> Deserialize<'de> for Reproducibility
impl<'de> Deserialize<'de> for Reproducibility
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 PartialEq<Reproducibility> for Reproducibility
impl PartialEq<Reproducibility> for Reproducibility
sourcefn eq(&self, other: &Reproducibility) -> bool
fn eq(&self, other: &Reproducibility) -> bool
sourceimpl Serialize for Reproducibility
impl Serialize for Reproducibility
impl Eq for Reproducibility
impl StructuralEq for Reproducibility
impl StructuralPartialEq for Reproducibility
Auto Trait Implementations
impl RefUnwindSafe for Reproducibility
impl Send for Reproducibility
impl Sync for Reproducibility
impl Unpin for Reproducibility
impl UnwindSafe for Reproducibility
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.