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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.