Skip to main content

Combining TEE and Blockchain

Combining TEE and Blockchain


This blog post will discuss the latest development in improving blockchain - using Trusted Execution Environments (TEE) to increase scalability and confidentiality.


Blockchain Background

For those who aren’t familiar with blockchain, here is a quick rundown of what is blockchain. 


Blockchain decentralizes and distributes data across a network of computers, functioning as distributed
ledgers. Each participant, or node on the network, has a copy of the stored data in a secure, distributed,
and shared database which eliminates the need for a centralized authority. Any changes or additions to
the database must be validated by the collective members before the entire network is updated. This
provides an unchangeable record and ensures data quality and integrity. 




Users are able to submit transactions, which are collected as a block and the network then distributes
and verifies the blocks and appends them to an irreversible chain.  Additionally, blockchains use
cryptographic signatures to ensure accuracy and create an immutable - or unchangeable - ledger. 


How does TEE play a role in this?

Normally, transactions are processed on the blockchain, which presents a scalability challenge
because every node in the chain needs to be informed of the transaction and update its copy of the
distributed ledger. This system ensures that transactions are transparent and the integrity is solid, but
it reduces the throughput - the speed at which transactions are processed - as well as confidentiality. 


A solution was proposed by Hyperledger Avalon, a fairly new Hyperledger project, a month ago.
The solution or at least the middle ground for this problem lies in performing some operations
“off-chain” using a combination of or simply one of the following: TEE, MPC (multi-party compute),
and ZK (zero-knowledge proofs). Due to the scope of this blog post, the latter two components will
not be discussed. The following image shows the structure.
When a transaction needs to be executed, the requester creates a Work Order which is passed into the
Trusted Compute Service where a worker performs the task. Afterward, a receipt is created which goes
to the chain.

Intel SGX capabilities such as code verification, execution isolation, and attestation verification can
help provide a reliable link between the main chain and off-chain compute resources. SGX’s prevention
of code modification or data disclosure allows blockchain data to be protected through encryption until
required for a transaction and verification of correct computation to be performed. Additionally, attestation
is important because trusted worker processes need to be vetted and cataloged within a registry that
includes their attestation information. 


Possible Drawbacks

A number of potential roadblocks have been considered.
  1. Centralized remote attestation service
    • To do a remote attestation, you must contact Intel’s cloud service
    • Not really decentralized
  2. SGX is disabled by default
    • Not a problem for computer-savvy people, but what about non-technical users of blockchain? 
    • Many mobile devices don’t have SGX
  3.  Unclear licensing and terms of use for SGX by Intel 
    • Intel themselves have supported Hyperledger Avalon, but it is unclear how they will respond to future business


References


Comments

Popular posts from this blog

Introduction to Meltdown and Escaping the Chrome Sandbox

R untime isolation and sandboxed environments are central to modern application security, but the most commonly used ones may not be as secure as we hope. Overview The general idea of isolated or sandboxed environments is to give a program a limited scope in which to operate. Instead of allowing a given program to use any of a machine’s resources, physical or virtual, you restrict its environment such that it can only access aspects of the system that the sandbox designer has decided are available for use by the program. This is not unlike putting your child in a literal sandbox with high walls – they are free to do whatever they want with all the sand, toys, and tools inside, but cannot interact with the environment outside. Isolation principles are in play at pretty much every aspect of modern computing. For example, last week a classmate wrote a blog on WannaCry, an exploit in Windows SMB older and unpatched versions of Windows. Without going into the detail...

Foreshadow: Breaking SGX Confidentiality

Attack Overview   Speculative execution  has been a widely reported and studied vulnerability that focuses on violating memory isolation. For a while Intel’s SGX was thought to be safe from speculative execution,  but  recent research has shown that  this  is not the case. The Foreshadow attack  is capable of violating  all security assumptions surrounding intel SGX and requires a true hardware level patch to fix.   Foreshadow is an extension upon Meltdown which allows SGX memory to sit unprotected in the cache. The key to defeating SGX’s protections lies in abusing the legacy permission checks which occur before SGX can implement its own protections. Originally, SGX was thought to be secure as when an invalid memory access occurs all data gets overwritten with a dummy value of –1. This behavior is called “abort page” semantics. In order to defeat this protection, we need to cause a “page fault”. A page fault is part of the legacy...

Remote Attestation

Introduction The number of information technologies, such as IoT devices and mobile Internet, are rising and therefore also the need for trustworthy computing environments. The digital community is seeing more and more threats to their secret information, threats such as computer viruses and malware. Any company or individual with sensitive information will want to be able to keep it in a secure environment that preserves the integrity, authenticity, confidentiality and reliability of the data. Not only does the information need to be secure in an individual server but will need to travel through trusted channels. While firewalls and virus defense mostly protect the server side of a computing platform, the client side is vulnerable, which is where trusted computing comes in.  There are many organizations that have attempted to establish a standard definition for trusted computing, but there are many different ways of understanding a trustworthy environment. The Trusted Compu...