Secure Storage
Applies to the Jetson AGX Xavier series, the Jetson Xavier NX series, the Jetson AGX Orin series, the Jetson Orin NX series, and the Jetson Orin Nano series.
Secure Storage in Jetson Linux
The Jetson Linux implementation of Secure Storage is provided by OP-TEE. Secure Storage is a solution to store general-purpose data and key material and guarantees confidentiality and integrity of the data stored and the atomicity of the operations that modifies the storage. Atomicity means that either the entire operation completes successfully or no write is done.
There are currently two Secure Storage implementations in OP-TEE:
REE FS: This is a Secure Storage solution, which relies on the normal world (REE) file system. The default setting of current Jetson Linux release is to use this solution.
RPMB: This is a Secure Storage solution, which uses the Replay Protected Memory Block (RPMB) partition of an eMMC device. The current Jetson Linux release supports RPMB for the Jetson AGX Xavier series, the Jetson Xavier NX (eMMC version) series, and the Jetson AGX Orin series. In the current release, the Jetson Orin NX series and the Jetson Orin Nano series do not support RPMB.
For more details about Secure Storage implementation in OP-TEE, refer to: Secure Storage in OP-TEE.
SSK and HUK
There are three types of keys used by the OP-TEE key manager:
The Secure Storage Key (SSK)
The TA Storage Key (TSK)
The File Encryption Key (FEK)
SSK is a per-device key and is generated and stored in secure memory when OP-TEE is booting. SSK is used to derive the TA Storage Key (TSK).
The SSK creation requires a Hardware Unique Key (HUK), which depends on the platform implementation. Refer to HUK in OP-TEE for more information.
Jetson Linux provides a HUK implementation, and it is calculated by using the NIST-SP-800-108 algorithm:
HUK = NIST-SP-800-108(key, context, label)
Where:
key is the EKB_RK. The OP-TEE document has a detailed description about EKB_RK.
context is the ECID of the Jetson device.
label is “tee-hw-unique-key”.
The algorithm and the parameters have been included for demonstration purposes only. You can change them according to your requirements.
RPMB Key Management
The RPMB key management has two parts:
RPMB key provision: You can generate your own RPMB key and burn it to the eMMC using tools you prefer. Jetson Linux supports the Factory Secure Key Provisioning (FSKP) method, which provision the RPMB key in a more secure way. Contact NVIDIA technical support for more information.
RPMB key generation in OP-TEE: To create RPMB data frames, a RPMB key is needed in OP-TEE. This key must be exactly the same as the one that was provisioned to the eMMC device. The algorithm in current Jetson Linux to generate the RPMB key is:
RPMB key = AES-CBC(source, key, iv)
Where:
source: The source key for AES encryption. In current Jetson Linux release, it is:
static uint8_t rollbackkeysrc[TEGRA_SE_AES_BLOCK_SIZE * 2] = { 0x81, 0x2A, 0x01, 0x43, 0x6B, 0x7C, 0x19, 0xAA, 0xFF, 0x22, 0x38, 0x82, 0x0A, 0x67, 0x74, 0x08, 0x30, 0x06, 0xCA, 0x11, 0x41, 0x49, 0x80, 0xED, 0xE7, 0xBB, 0x61, 0x01, 0x2F, 0x56, 0x9D, 0xD3 };
key: This is the AES encryption key. For the Jetson AGX Xavier series and the Jetson Xavier NX series, this is a key, which is burned into the
KEK1
fuse. For the Jetson AGX Orin, this is a key that is burned into theOEM_K1
fuse.iv: This is the initial vector. In current Jetson Linux release, it is:
static uint8_t rollbackkeyiv[TEGRA_SE_AES_IV_SIZE] = { 'n', 'v', '-', 's', 't', 'o', 'r', 'a', 'g', 'e', '-', 'd', 'u', 'm', 'm', 'y' };