Skip to main content

derive_session_key

Function derive_session_key 

Source
pub(crate) fn derive_session_key(
    io_key: &[u8; 32],
    nonce_input: &[u8; 32],
    io_slot: u8,
    chip_serial: &[u8; 9],
) -> [u8; 32]
Expand description

Compute the TempKey value that the chip ends up with after a Nonce(passthrough, nonce_input) followed by GenDig(zone=Data, key_id=io_slot).

io_key is the 32-byte value stored in the I/O Protection slot (slot 8 by convention in this project).

nonce_input is the 32-byte passthrough nonce that was loaded into TempKey before the GenDig.

io_slot is the slot index of the I/O Protection Key (e.g. 8).

chip_serial is the 9-byte serial number of the chip.