I am exploring the encryption of Trusted Applications (TAs) for the Jetson AGX Orin using OP-TEE, with a specific focus on understanding the role of the OEM_K1 fuse key in this process. After studying the OP-TEE source code, Nvidia’s documentation (on Optee, secure boot, disk encryption etc..), and relevant forum threads, I still need clarification on certain details to ensure a secure and correct implementation.
Setup and Use Case:
In my current theoretical scenario, Bob owns a Jetson AGX Orin DevKit, and Alice needs to send him an encrypted TA. Alice aims to protect the algorithms within the TA from being reverse-engineered by Bob. The key question is: with what key should Alice encrypt and sign the TA so that Bob can run it on his Jetson AGX Orin DevKit? Put another way, what key should Bob share with Alice for her to encrypt and sign the TA?
(For simplicity, let’s set aside the fact that since Bob fused the OEM_K1 key, he knows it and could theoretically decrypt the TA offline. The focus here is on the encryption process within OP-TEE. Assume both Bob and Alice are honest actors with zero malicious intent whatsoever)
So far, I’ve reviewed:
- Encryption of a TA using HUK
- Purpose of OEM_K2 for Orin AGX
- Secure Boot — NVIDIA Jetson Linux Developer Guide 1 documentation
- OP-TEE: Open Portable Trusted Execution Environment — NVIDIA Jetson Linux Developer Guide 1 documentation
- Disk Encryption — NVIDIA Jetson Linux Developer Guide 1 documentation
- Trusted Applications — OP-TEE documentation documentation and Trusted Applications — OP-TEE documentation documentation
- How to encrypt a .ta file? · Issue #7112 · OP-TEE/optee_os · GitHub
Current Understanding:
- TAs are encrypted using a symmetric key (
TA_ENC_KEY
), which OP-TEE either uses directly or derives from theOEM_K1
fuse key at runtime. - The encryption process follows a “sign-then-encrypt-then-MAC” workflow, resulting in a
.ta
file stored in the REE filesystem. - The
OEM_K1
is a 256-bit AES key burned into the Jetson AGX Orin’s fuses, specified in big-endian hexadecimal format, as outlined in the Secure Boot documentation.
However, I remain uncertain whether the OEM_K1
key is used directly as TA_ENC_KEY or if some derivation OEM_K1
needs to be done to use it as TA_ENC_KEY
to encrypt the TA. This hinges on how OP-TEE on the Jetson AGX Orin handles the key—does it use OEM_K1
directly, or does it perform some derivation and use the derived key to decrypt the TA?
Specific Questions in the Alice and Bob Scenario:
- Burning OEM_K1: Bob follows the Secure Boot documentation and burns a randomly generated 256-bit AES key into
OEM_K1
usingodmfuse.sh
. - Key Sharing: What key should Bob share with Alice so she can encrypt the TA file? Is it the 256-bit AES key fused into OEM_K1, or a key derived from
OEM_K1
? - Derivation Process: If derivation is required, what is the derivation method? This is critical, as if OP-TEE is performing this derivation and using this to decrypt the TA, Bob also needs to do the same derivation on the OEM_K1 and send this derived key to Alice.
Clarity on this query would be highly appreciated! Thank you!