Skip to main content

encrypt_payload

Function encrypt_payload 

Source
pub(crate) fn encrypt_payload(
    plaintext: &[u8; 32],
    session_key: &[u8; 32],
) -> [u8; 32]
Expand description

XOR-encrypt a 32-byte plaintext with the session key.

The chip will XOR with the same TempKey to recover the plaintext.