Privacy has been a long-standing concern in the Internet industry, and Web3 considers privacy to be a fundamental requirement, which has led to the development of technologies such as Zero-Knowledge Proofs (ZKP) and Secure Multi-Party Computation (MPC). However, recently, Fully Homomorphic Encryption (FHE) has also emerged in the market, potentially filling the gaps in existing privacy technologies and introducing new applications.
Introduction to Fully Homomorphic Encryption (FHE)
Concept: Performing calculations directly on encrypted data without decryption
Algebraic concept: f(x) + f(y) = f(x+y)
Case study
The Importance of Fully Homomorphic Encryption in Web3
FHE complements ZKP and MPC
Privacy applications in Web3
Implementation Project: Fhenix Network
Project introduction
Operating principle overview
Unlocking more privacy applications
Homomorphic Encryption (HE) is a cryptographic encryption technology that aims to enhance data computation security. In simple terms, when data is encrypted using HE functions, the encrypted data can be used for other computations without the need for decryption, thereby improving data computation security and privacy.
Based on the maturity of the technology and the differences in operations that can be performed, HE can be further divided into:
– Partially Homomorphic Encryption (PHE)
– Somewhat Homomorphic Encryption (SWHE)
– Fully Homomorphic Encryption (FHE)
Among these, FHE is the most mature technology and can perform more complex encrypted operations, making it suitable for commercialization. As a result, it has become a key technology of interest in the blockchain industry.
FHE ensures that data remains encrypted throughout the transmission, computation, and return processes, thereby protecting the confidentiality of the data. Unlike traditional methods, data encrypted using FHE does not need to be decrypted during the computation process. This allows telecom operators, cloud computing providers, and ad analysis companies to complete tasks without viewing plaintext data. The computed data (still in encrypted form) can then be returned to the clients, who can decrypt it to obtain the desired result.
FHE is beneficial for both third-party service providers and clients. For service providers, it reduces concerns about the storage of privacy data and allows for computation fees. For users, it enhances data security and privacy.
Data encrypted using FHE can undergo analysis or computation by third-party analysts while maintaining encryption. The results can only be decrypted by the users.
FHE allows users to encrypt data using FHE functions, such as encrypting data x and data y into f(x) and f(y), and then sending them externally. External calculators can compute f(x) + f(y) to obtain f(x+y) and return it to the users. The users, with the decryption function g, can obtain the result g(f(x+y)) = x+y. Throughout this process, the external party does not know the plaintext data but can still perform computations and submit the results to the data owner.
Homomorphic encryption has already been used in many applications:
– A French technology company utilizes FHE technology to assist hospitals in analyzing patient privacy data.
– The South Korean government uses FHE, MPC, and other privacy techniques for privacy survey applications.
– National Sun Yat-sen University utilizes homomorphic encryption to develop a “Privacy-protected and Secure Medical Data Warehousing System” project, enabling secure uploading of medical data to the cloud.
Web3’s existing Zero-Knowledge Proofs (ZKP), Secure Multi-Party Computation (MPC), Trusted Execution Environment (TEE), and FHE differ in their technical aspects. Why is there a need to introduce a new technology? Will it create new technological competition?
ZKP, FHE, MPC, and TEE are complementary technologies and have different use cases. Besides competition, they provide opportunities for combined innovation:
– ZKP provides relatively stronger privacy guarantees as “unencrypted” data never leaves the user’s device. Without the data owner’s permission, no one can perform any computations on this data. However, this also limits its composability. It is more suitable for verifying computations rather than running privacy-oriented smart contracts.
– FHE provides stronger composability but weaker privacy. If FHE needs to be used on the blockchain, it still requires a few entities under verification or mechanisms to possess the decryption keys to record transaction information on-chain. However, due to its composability and privacy features, there is still demand for its application on the chain.
– MPC provides an intermediate position between the above two methods. MPC completes the output without revealing the inputs, allowing computation on privacy data. It offers more composability than ZKP but is limited to a small number of participants. It is suitable for privacy computations with limited identity permissions, such as wallet key management.
– TEE provides decryption and computation in a secure environment and is relatively mature and efficient. However, it relies heavily on the security of the execution environment. It is suitable for applications with lower requirements for decentralization.
Each of these technologies has unique advantages. ZKP is suitable for verifying the authenticity of things, FHE is suitable for applications that require submitting private data to contracts, MPC is suitable for privacy computations with limited identity permissions, and TEE is suitable for applications with high-frequency computations and lower security requirements.
In the future, products combining multiple encryption technologies can be expected to meet various functional requirements.
For example, asset management tools can use ZKP to verify whether a user’s funds meet high net worth standards and use FHE to create asset change tables for users without transmitting individual asset data.
For the blockchain industry, Fully Homomorphic Encryption is also a complementary technology that strengthens the privacy shortcomings of blockchain. FHE allows smart contracts to handle ciphertexts without knowing the actual data, increasing the feasibility of applications with high privacy requirements.
Token transactions:
Encrypting transaction content can enhance user privacy and reduce MEV losses.
DAO voting:
Enables anonymous voting or public disclosure at specific times, reducing additional interference from public information.
Auctions:
Only disclose the final highest bid, reducing the disclosure of buyer bidding strategies.
Blockchain games:
By hiding transaction information and opponent player strategies, it creates a more realistic information asymmetry game.
To combine blockchain and Fully Homomorphic Encryption, besides the need for tools to encrypt user-signed transactions, there is a need for smart contracts and virtual machines that can quickly read Fully Homomorphic Encryption functions. Lastly, it is necessary to overcome how to validate transaction content by nodes.
The current solution is to build a virtual machine with native Fully Homomorphic Encryption operations. Fhenix Network claims to integrate FHE into a decentralized network within the Ethereum ecosystem. It aims to address the transparency issues of Ethereum and other EVM networks by introducing privacy features to stimulate broader applications.
Fhenix Network is an FHE Rollup within the Ethereum ecosystem, built on Arbitrum Nitro Fraud Proof to provide modular FHE functionality while supporting EVM compatibility. The choice of Optimistic Rollups is because the current technology is easier to implement, allowing for the rapid launch of FHE Layer2 for market testing.
Using the architecture of Arbitrum Nitro, Fhenix Network utilizes the WebAssembly virtual machine (WASM) for fraud proofs and FHE logic compilation. The FHE logic in the fheOS code repository, which includes the necessary packages for developers to implement FHE in smart contracts, such as TFHE-rs developed by partner Zama.
The decryption aspect, which is crucial in Fully Homomorphic Encryption, is handled by the Threshold Network (TSN) module in the design of Fhenix Network. When data needs to be decrypted, TSN is responsible for decrypting and returning the data.
Fully Homomorphic Encryption is not a recently developed technology, but as technology advances, it is increasingly seen by the encryption community as a potential privacy protection solution that complements existing encryption technologies such as ZKP and MPC. It has the potential for new applications, including privacy voting, blockchain games, and anti-MEV transfers. We can expect to see more interesting applications in the future.
FHE
Fhenix Network
MPC
TEE
ZKP
Further reading:
Secure and Friendly Web3 Services! Bitget Wallet Introduces MPC Wallet
Coinbase Launches Wallet as a Service, Making it Easy to Create and Integrate On-chain Wallets