Foreword
Blockchains traditionally require that the same program be run by all the validators who use consensus to agree on execution results. Using all these validators to execute the same program is highly inefficient in terms of computation, cost, and duration - especially as the programs grow in size. What can be done instead is have another layer of “computation nodes” or “off-chain workers”, of which a handful are selected to run the programs in a TEE and then provide a proof of correct execution to the consensus validators, which takes much less time to verify than running the entire program. This is often referred to as off-chain computation with on-chain validation. Several blockchains have efficiently demonstrated increased throughput results by moving their computation off-chain and into TEE’s.
TEE’s can be used to create a confidential blockchain. Encrypted data signed by a private key goes into the TEE along with the smart contract, data is decrypted, processed by the smart contract, and then encrypted before it is sent out of the TEE. Only the private key of the transaction sender will be able to decrypt the resulting on-chain data. To others it will look completely random.
In many cases TEE’s are used for threshold encryption/decryption and signing for the validators. A key is split up into shares and then distributed among several signers. Each share is stored in the enclave so that it cannot be manipulated. The key shares are then combined into signing actions when transactions are submitted over the network.
TEE’s can be used for an oracle service to feed private off-chain data to smart contracts.
Last updated