Trusted Execution Environments

General Considerations

Secure-hardware cryptography has always been the ultimate level of security, especially for financial and military-grade applications, because modern cryptography is based on mathematical algorithms that will eventually be executed in hardware, either conventional electronic CPU, GPU, FPGA, ASIC, or unconventional Quantum, Optical, Neuromorphic and biological computers. They all follow the same concept of computation known as the Turing machine. Computation inside the Turing machine hardware, in the hands of experts, can be manipulated, so we need verifiable computation at the micro level (proof system), and a fault-tolerant system at the macro level (state replication, error correction). Moreover, there are methods to eavesdrop on the running computation in hardware, in that case, we need to secure the processing and storage inside the hardware. Normally it has been done in expensive special-purpose microchips and secure modules like SRAM-based PUF, HSM, and TPM.

Recently main CPU manufacturers started a new line of powerful general-purpose processors as Trusted Execution Environment (TEE) which are both computationally impenetrable and verifiable. TEEs promise integrity (the program being run is exactly the one specified by the user) and confidentiality (the data processed by the program is not leaked outside of the enclave) against an actively malicious adversary with control over the operating system.

TEEs use in Ternoa

Trusted Execution Environments (TEEs) are used in blockchain technology to provide a secure environment for code. A TEE is a secure hardware environment that isolates code execution from the main operating system, ensuring that code is executed securely and without interference.

The architecture proposed involves storage and retrieval of keys in a trusted execution environment (TEE) which is an off-chain component associated with the secret NFT solution. TEE programs running on processors such as SGX provide strong trust guarantees in terms of data privacy and verification of the programs running within them. This can be achieved through techniques such as remote attestation that gives assurance that the program running inside the enclave is running on genuine TEE hardware (such as SGX), and the programs have not been modified by the TEE node operators. Data storage on TEEs is also secured by sealing them with the secure keys associated with the TEE hardware and/or author of the TEE programs.

As an off-chain extension of Key Management, Secure Computation, and Confidential Storage for blockchains, there are at least five responsibilities of TEE :

  • Using the Remote Attestation mechanism to prove the genuinity of hardware and the codes running on it to be approved by blockchain validators and registered on the blockchain

  • Validation of the off-chain requests from the application, comparing to on-chain data (i.e NFT ownership)

  • Processing the application request in a secure environment (i.e sealing the secrets)

  • Providing the blockchain with verified off-chain data gathered from the application (i.e availability of encryption key for secure NFT)

  • Secure distributed backup and secure migration of secrets to other TEE machines

Last updated