Skip to main content

parse_unblock_pin

Function parse_unblock_pin 

Source
pub fn parse_unblock_pin(
    payload: &[u8],
) -> Result<([u8; 8], [u8; 4], [u8; 32]), PayloadError>
Expand description

Parse the payload of CommandOpcode::UnblockPin.

Layout: puk (8) || new_pin (4) || io_key (32). The IO key is the 32-byte I/O Protection Key stored in slot 8, provided by the host from its local provisioning config. The firmware uses it to perform the encrypted write of the new PIN hash into slot 5; it is not stored.

Returns (puk, new_pin, io_key).

ยงErrors

See PayloadError.