Blockchain Node Smart Contract Privacy in Trusted Execution Environment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current blockchain systems, such as Ethereum, face privacy issues due to the use of a single encryption key for all accounts, allowing attackers to analyze account relationships and behaviors by preserving the data structure of the Merkle Patricia tree (MPT).
Innovation Solution
Processing blockchain data in a trusted execution environment (TEE) where smart contract operations are executed, allowing data retrieval and updates within the TEE, and storing the MPT in ciphertext to hide its structure, ensuring that only authorized nodes can access the encrypted world state.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the same encryption key is used for all accounts to preserve the MPT data structure, then the Merkle root can be calculated consistently by all blockchain nodes, but the data structure of the world state cannot be hidden and privacy information may be analyzed by attackers
Solution Approach 1:
The patent divides the encryption approach by account type: externally owned accounts use one encryption key while contract accounts use another encryption key. This segmentation allows different parts of the system to have different encryption properties, enabling both consistent Merkle root calculation for externally owned accounts and hidden data structure for contract accounts.
Solution Approach 2:
The patent applies different encryption keys to different locations (account types) in the system. Externally owned accounts use the first encryption key to maintain MPT structure, while contract accounts use the second encryption key to hide their data structure, achieving local optimization of encryption properties.
2Reliability
If encryption is applied to protect account privacy, then account information security is improved, but the data structure of the world state remains exposed and cannot be fully hidden
Solution Approach 1:
The patent segments the world state into two parts: externally owned accounts that maintain visible MPT structure for efficient verification, and contract accounts that use alternative encryption to hide their data structure. This segmentation allows partial information hiding while preserving necessary transparency.
Solution Approach 2:
The patent changes the encryption parameter (encryption key) based on account type. By using different encryption keys for different account types, the system transforms the uniform encryption approach into a differentiated approach that provides both security and structural hiding where needed.
3Ease of manufacture
If a single encryption key is used across all accounts, then implementation simplicity is maintained, but privacy protection effectiveness is reduced due to analyzable account relationships
Solution Approach 1:
The patent divides the account space into two segments (externally owned accounts and contract accounts) with different encryption keys. This segmentation increases privacy protection effectiveness by preventing attackers from analyzing relationships across all accounts with a single key, while keeping the implementation relatively simple through clear account type differentiation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage media, for processing blockchain data under a trusted execution environment (TEE). One of the methods includes receiving, by a blockchain node, a request to execute one or more software instructions in a TEE executing on the blockchain node; determining, by a virtual machine in the TEE, data associated with one or more blockchain accounts to execute the one or more software instructions based on the request; traversing, by the virtual machine, a global state of a blockchain stored in the TEE to locate the data; and executing, by the virtual machine, the one or more software instructions based on the data.