What is Fully Homomorphic Encryption (FHE)? How can privacy computing change the blockchain application ecosystem?

share
What is Fully Homomorphic Encryption (FHE)? How can privacy computing change the blockchain application ecosystem?

Privacy has long been a concern in the internet industry, and Web3 considers privacy a priority, driving the practical development of technologies such as Zero-Knowledge Proofs (ZKP) and Secure Multiparty Computation (MPC). However, Fully Homomorphic Encryption (FHE) technology has also gradually entered the market in recent times, potentially filling gaps in existing privacy technologies and introducing new applications.

Introduction to Fully Homomorphic Encryption (FHE)

Application Concept: Perform calculations on encrypted data without decryption

Fully Homomorphic Encryption (FHE) is a cryptographic encryption technology designed to enhance data computation security. In simple terms, data encrypted by an FHE function can be used for other calculations without the need for decryption, thereby improving the security and privacy of data computation.

Based on the maturity of the technology and the operations that can be performed, it can be further categorized into:

  • Partially Homomorphic Encryption (PHE)
  • Somewhat Homomorphic Encryption (SWHE)
  • Fully Homomorphic Encryption (FHE)

Fully Homomorphic Encryption technology is relatively mature and capable of performing more complex encrypted computations, making it commercially viable. As a result, it has become a key technology of interest in the blockchain industry.

FHE ensures that data remains encrypted throughout transmission, computation, and return processes, safeguarding data confidentiality. Unlike traditional methods, data encrypted with FHE does not require decryption during computation, ensuring that telecommunications providers, cloud computing providers, and advertising analysis providers can complete tasks without viewing plaintext data. After completing the computation, the data is returned to the customer in encrypted form, allowing the customer to decrypt it to obtain the desired results.

FHE benefits both third-party service providers and customers. For service providers, it reduces concerns about storing private data and enables them to charge for computations. For users, it enhances data security and privacy.

Algebraic Concept: fx + fy = fx+y

Fully Homomorphic Encryption allows users to encrypt data using the FHE function, such as encrypting data x and data y to become fx and fy, and then sending it externally.

External calculators can compute fx+y through fx + fy and return the result fx+y to the user. The user, having the decryption function g, obtains the result gfx+y = x+y.

During this process, external parties do not know the plaintext data but can still complete the computation and submit it to the data owner.

Case Studies

Homomorphic encryption has already been applied in various scenarios:

  • A French tech company uses FHE technology to assist hospitals in analyzing patient privacy data.
  • The South Korean government uses FHE, MPC, and other privacy technologies to conduct privacy survey application experiments.
  • National Sun Yat-sen University utilizes homomorphic encryption to develop a "Medical Data Warehouse System with Privacy Protection and Secure Data Mining" project, aiming to provide rapid medical services by securely uploading medical data to the cloud.

The Importance of Fully Homomorphic Encryption in Web3

FHE Complements ZKP and MPC Gaps

What are the differences between Zero-knowledge proof (ZKP), Secure Multi-Party Computation (MPC), Trusted Execution Environment (TEE), and FHE in the Web3 industry? Why is there a need to introduce a new technology? Will this lead to new technological competition?

ZKP, FHE, MPC, and TEE are complementary technologies with different use cases. Apart from competition, they offer more opportunities for combined innovation:

  • ZKP provides relatively strong privacy guarantees because in this framework, "unencrypted" data never leaves the user's device. Without the data owner's permission, no one can perform any calculations on this data. However, it lacks composability and is more suitable for verifying computations rather than running privacy-focused smart contracts.
  • FHE offers strong composability but weaker privacy. If FHE is to be used on the blockchain, verifiers or a minority under the mechanism still need decryption keys to record transaction information on the chain. Nevertheless, its composability and privacy features create demand for on-chain applications.
  • MPC provides an intermediary position between the above two methods. MPC completes outputs without revealing inputs, allowing computation on private data. It offers more composability than ZKP but is limited to a small number of participants. It is suitable for wallet private key management.
  • TEE allows transactions to be decrypted and computed in a secure environment. While the technology is mature and efficient, it heavily depends on the security of the execution environment. It is suitable for applications with lower demands for decentralization.

Each of these technologies has unique advantages. ZKP is suitable for verifying truth, FHE is suitable for scenarios where private data needs to be submitted for contract computations, MPC is suitable for privacy computations with limited identity permission, and TEE is suitable for applications requiring high-frequency computation with lower security demands.

In the future, products combining multiple encryption technologies are expected to emerge to meet various functional requirements.

For example, asset management tools can use ZKP to verify a user's fund amount meets high net worth standards while creating asset change tables for users using FHE without transmitting individual asset data.

Privacy Web3 Applications

Fully Homomorphic Encryption also serves as a complementary technology in the blockchain industry, strengthening the privacy shortcomings of blockchain. FHE enables smart contracts to handle ciphertext without knowing the actual data, enhancing the feasibility of applications with high privacy requirements.

  • Token Transactions: By encrypting transaction content, user privacy is enhanced, and Miner Extractable Value (MEV) losses can be reduced.
  • DAO Voting: Achieve anonymous voting or specific time-based public voting, reducing additional interference from public information.
  • Auctions: Only disclose the final highest bid to reduce revealing bidding strategies.
  • On-chain Games: By hiding transaction information and opponent player strategies, create a more realistic game with asymmetric information.

Opinion| How on-chain games bring real asymmetric information games in the game

Implementation Project: Fhenix Network

Combining blockchain and fully homomorphic encryption requires tools for encrypting transactions when users sign them, smart contracts and virtual machines capable of quickly reading fully homomorphic encryption functions, and overcoming how nodes verify transaction content.

Project Overview

The current solution involves creating a virtual machine with native fully homomorphic encryption operations, and Fhenix Network claims to integrate FHE into a decentralized network. It aims to address the issue of Ethereum and other EVM networks being overly transparent by introducing privacy features to encourage broader applications.

Fhenix Network is an FHE Rollup in the Ethereum ecosystem, built on Arbitrum Nitro fraud proof to provide modular FHE functionality while supporting EVM compatibility. The choice of Optimistic Rollups is due to the ease of current technology implementation, allowing for the rapid launch of FHE Layer2 for market testing.

Operating Principle Overview

Through the structure of Arbitrum Nitro, Fhenix Network uses WebAssembly virtual machine (WASM) for fraud proofs and FHE logic compilation. It runs securely on WASM rather than on EVM.

The core FHE logic of Fhenix Network is located in the fheOS codebase, containing the packages developers need to implement FHE into smart contracts. For example, TFHE-rs is constructed by the partner Zama.

Modular Architecture of Fhenix Network

The most critical decryption aspect of fully homomorphic encryption in the design of Fhenix Network is managed by the Threshold Network (TSN) module. When data requires decryption, TSN decrypts and returns the data.

Unlocking More Privacy Applications

While fully homomorphic encryption is not a recently developed technology, advancements in technology have increasingly positioned it as a potential privacy solution, filling gaps in existing encryption technologies such as ZKP and MPC. Potential new applications include privacy voting, on-chain games, anti-MEV transfers, and more. Expect to see more interesting applications in the future.