Source: ArkStream Capital
Foreword
In the past, cryptography technology has played a pivotal role in the progress of human civilization, especially in the fields of information security and privacy protection. It not only provides solid protection for data transmission and storage in various fields, but also its asymmetric encryption public-private key system and hash function were creatively integrated by Satoshi Nakamoto in 2008 to design a proof-of-work mechanism to solve the double-spending problem, thus promoting the birth of Bitcoin, a revolutionary digital currency, and opening a new era for the blockchain industry.
With the continuous evolution and rapid development of the blockchain industry, a series of cutting-edge cryptographic technologies have emerged, among which zero-knowledge proof (ZKP), multi-party computing (MPC) and fully homomorphic encryption (FHE) are the most prominent. These technologies have been widely used in multiple scenarios, such as ZKP combined with Rollup to solve the "impossible triangle" problem of blockchain, and MPC combined with public-private key system to promote the large-scale application of user portals (Mass Adoption). As for FHE, which is regarded as one of the holy grails of cryptography, its unique characteristics enable third parties to perform any number of calculations and operations on encrypted data without decryption, thereby realizing composable on-chain privacy computing, bringing new possibilities to multiple fields and scenarios.
A Quick Overview of FHE
When we mention FHE (Fully Homomorphic Encryption), we can first understand the meaning behind its name. First of all, HE stands for homomorphic encryption technology, and its core feature is that it allows calculations and operations on ciphertext, and these operations can be directly mapped to plaintext, that is, keeping the mathematical properties of the encrypted data unchanged. The "F" in FHE means that this homomorphism has reached a new level, allowing unlimited calculations and operations on encrypted data.
To help understand, we choose the simplest linear function as the encryption algorithm, and combine single operations to illustrate addition homomorphism and multiplication homomorphism. Of course, the actual FHE uses a series of more complex mathematical algorithms, and these algorithms have extremely high requirements for computing resources (CPU and memory).
Although the mathematical principles of FHE are profound and complex, we will not expand on them here. It is worth mentioning that in the field of homomorphic encryption, in addition to FHE, there are two forms of partial homomorphic encryption and some homomorphic encryption. The main difference between them is the types of operations supported and the number of operations allowed, but they also provide the possibility of realizing the calculation and operation of encrypted data. However, in order to keep the content concise, we will not discuss it in depth here.
In the FHE industry, although many well-known companies are involved in research and development, Microsoft and Zama have demonstrated unparalleled availability and influence with their outstanding open source products (code libraries). They provide developers with stable and efficient FHE implementations, and these contributions have greatly promoted the continued development and widespread application of FHE technology.
Microsoft's SEAL: A FHE library carefully built by Microsoft Research that not only supports fully homomorphic encryption, but is also compatible with partially homomorphic encryption. SEAL provides an efficient C++ interface and significantly improves computing performance and efficiency by integrating numerous optimization algorithms and technologies.
Zama's TFHE: An open source library focused on high-performance fully homomorphic encryption. TFHE provides services through a C language interface and uses a series of advanced optimization techniques and algorithms to achieve faster computing speeds and lower resource consumption.
According to the most simplified idea, the operation process of experiencing FHE is roughly as follows:
Generate a key: Generate a pair of public and private keys using the FHE library/framework.
Encrypt data: Use the public key to encrypt the data that needs to be processed by FHE.
Perform homomorphic calculations: Use the homomorphic calculation function provided by the FHE library to perform various calculation operations on the encrypted data, such as addition and multiplication.
Decrypt results: When the calculation results need to be viewed, the legitimate user uses the private key to decrypt the calculation results.
In the practice of FHE, the management scheme of decryption keys (generation, circulation and use, etc.) is particularly critical. Since the calculation and operation results of encrypted data need to be decrypted for use at certain times and scenarios, the decryption key becomes the core of ensuring the security and integrity of the original data and processed data. Regarding the management of decryption keys, its scheme actually has many similarities with traditional key management, but given the particularity of FHE, a more rigorous and detailed strategy can also be designed.
For blockchain, due to its decentralized, transparent and tamper-proof characteristics, the introduction of a threshold multi-party secure computing scheme (TMPC) is a very promising option. This scheme allows multiple participants to jointly manage and control the decryption key. Only when the preset threshold number (i.e. the number of participants) is reached can the data be successfully decrypted. This not only improves the security of key management, but also reduces the risk of a single node being hacked, providing a strong guarantee for the application of FHE in the blockchain environment.
Laying the foundation fhEVM
From the perspective of minimal intrusion, the most ideal way to realize the application of FHE on the blockchain is to encapsulate it as a general smart contract code library to ensure portability and flexibility. However, the premise of this scheme is that the smart contract virtual machine must pre-support the specific instruction set of complex mathematical operations and cryptographic operations required by FHE. If the virtual machine cannot meet these requirements, it is necessary to deeply customize and transform the core architecture of the virtual machine to adapt to the needs of the FHE algorithm, so as to achieve its seamless integration.
As a widely adopted and long-proven virtual machine, EVM naturally becomes the first choice for implementing FHE. However, there are very few practitioners in this field. Among them, we once again noticed Zama, the company that open-sourced TFHE. It turns out that Zama not only provides the basic TFHE library, but also, as a technology company focusing on applying FHE technology to the fields of artificial intelligence and blockchain, has launched two important open source products: Concrete ML and fhEVM. Concrete ML focuses on machine learning privacy computing. With Concrete ML, data scientists and ML practitioners can train and infer machine learning models on sensitive data while protecting privacy, thereby making full use of data resources without worrying about privacy leakage. Another product, fhEVM, is a fully homomorphic EVM that supports Solidity to implement privacy computing. fhEVM enables developers to use fully homomorphic encryption technology in Ethereum smart contracts to achieve privacy protection and secure computing.
By reading the information about fhEVM, we learned that the core features of fhEVM are:
fhEVM: At the non-EVM bytecode level, in the form of embedded functions, it provides FHE operation support by integrating multiple precompiled contracts in different states of the Zama open source FHE library. In addition, a specific EVM memory and storage area is specially built for FHE to store, read, write and verify FHE ciphertext;
Decryption mechanism based on distributed threshold protocol design: support global FHE keys and on-chain storage encryption keys for mixed encrypted data between multiple users and multiple contracts, and asynchronous encryption mechanism for sharing decryption keys between multiple verifiers with threshold multi-party secure computing scheme;
Solidity contract library to reduce the threshold for developers: design FHE encryption data types, operation types, decryption calls and encryption outputs, etc.;
Zama's fhEVM provides a solid starting point for FHE technology in blockchain applications, but considering that Zama mainly focuses on technology research and development, its solutions are more inclined to the technical level, and there is relatively little thinking in engineering implementation and commercial application. Therefore, fhEVM may encounter various unexpected challenges in the process of pushing it to practical applications, including but not limited to technical barriers and performance optimization.
Building Ecosystem FHE-Rollups
The simple fhEVM itself cannot constitute a project or a complete ecosystem. It is more like one of the diverse clients in the Ethereum ecosystem. If it wants to be an independent project, fhEVM must rely on the public chain-level architecture or adopt Layer2/Layer3 solutions. The development direction of the FHE public chain inevitably has to solve how to reduce the redundancy and waste of FHE computing resources among distributed validator nodes. On the contrary, the Layer2/Layer3 solution, which exists as the execution layer of the public chain itself, can distribute the computing work to a few nodes, greatly reducing the order of magnitude of computing overhead. For this reason, Fhenix, as a pioneer, actively explores the combination of fhEVM and Rollup technology, and proposes to build an advanced FHE-Rollups-type Layer2 solution.
Considering that ZK Rollups technology involves complex ZKP mechanisms and requires huge computing resources to generate the proofs required for verification, combined with the characteristics of full FHE itself, directly implementing the FHE-Rollups solution based on ZK Rollups will face many challenges. Therefore, at this stage, it is more practical and efficient to use the Optimistic Rollups solution as Fhenix's technical choice compared to ZK Rollups.
Fhenix's technology stack mainly includes the following key components: a variant of Arbitrum Nitro's fraud prover, which can perform fraud proof in WebAssembly, so the FHE logic can be compiled into WebAssembly for safe operation. The core library fheOS provides all the functions required to integrate FHE logic into smart contracts. The Threshold Service Network (TSN) is another important component, which hosts the secret shared network key, splits it into multiple copies using a secret sharing technology with a specific algorithm to ensure security, and is responsible for tasks such as decrypting data when necessary.
Based on the above technology stack, Fhenix released its first public version, Fhenix Frontier. Although this is an early version with many limitations and missing features, it already provides comprehensive instructions for using the smart contract code base, Solidity API, contract development tool chain (such as Hardhat/Remix), front-end interactive JavaScript library, etc. Developers and ecological project parties interested in this can refer to the official documentation for exploration.
Chain-Agnostic's FHE Coprocessors
Based on FHE-Rollups, Fhenix cleverly introduced the Relay module, which aims to enable various public chains, L2 and L3 networks to access FHE Coprocessors and use FHE functions. This means that even if the original Host Chain does not support FHE, it can now indirectly enjoy the powerful functions of FHE. However, since the proof challenge period of FHE-Rollups is usually as long as 7 days, this has limited the widespread application of FHE to a certain extent. To overcome this challenge, Fhenix teamed up with EigenLayer to provide a faster and more convenient channel for FHE Coprocessors' services through EigenLayer's Restaking mechanism, greatly improving the efficiency and flexibility of the entire FHE Coprocessors.
The usage process of FHE Coprocessors is simple and clear:
The application contract calls FHE Coprocessor on the Host Chain to perform cryptographic calculation operations
The Relay contract queues the request
The Relay node listens to the Relay contract and forwards the call to the dedicated Fhenix Rollup
FHE Rollup performs FHE calculation operations
Threshold network decryption output
The Relay node returns the result and optimistic proof to the contract
The contract verifies the optimistic proof and sends the result to the caller
The application contract continues to execute the contract based on the call result
Fhenix Participation Guide
If you are a developer, you can study Fhenix's documentation in depth and develop your own FHE-based applications based on these documents to explore its potential in practical applications.
If you are a user, you may wish to try the dApps provided by Fhenix's FHE-Rollups to experience the data security and privacy protection brought by FHE.
If you are a researcher, it is strongly recommended that you read Fhenix's documentation carefully to gain a deeper understanding of the principles, technical details and application prospects of FHE, so as to make more valuable contributions in your research field.
Best Application Scenarios for FHE
FHE technology has shown a wide range of application prospects, especially in the fields of full-chain games, DeFi, and AI. We firmly believe that it has great development potential and broad application space in these fields:
Privacy-protected full-chain games: FHE technology provides strong encryption protection for financial transactions and player operations in the game economy, effectively preventing real-time manipulation and ensuring the fairness and justice of the game. At the same time, FHE can also anonymize player activities, significantly reducing the risk of leakage of players' financial assets and personal information, thereby protecting players' privacy security in all aspects.
DeFi/MEV: With the booming development of DeFi activities, many DeFi operations have become the target of MEV attacks in the dark forest. In order to solve this challenge, FHE can effectively protect sensitive data that is unwilling to be leaked in DeFi, such as position quantity, liquidation line, transaction slippage, etc., while ensuring the calculation and processing of business logic. By applying FHE, the health of on-chain DeFi can be significantly improved, thereby greatly reducing the frequency of bad MEV behavior.
AI: The training of AI models depends on data sets. When it comes to using individual data for training, ensuring the security of individual sensitive data becomes the primary premise. To this end, FHE technology has become an ideal solution for AI model training individual privacy data. It allows AI to process on encrypted data, thereby completing the training process without leaking any personal sensitive information.
Community Recognition of FHE
The development of technology cannot be achieved solely by its hard-core characteristics. To achieve the maturity and continuous progress of technology, it must rely on the continuous improvement of academic research and development and the active construction of community power. In this regard, FHE is called the holy grail of the cryptographic community, and its potential and value have long been widely recognized. In 2020, Vitalik Buterin highly recognized and supported FHE technology in the article "Exploring Fully Homomorphic Encryption". Recently, he spoke out again on social media, which undoubtedly re-reinforced this position and called for more resources and power for the development of FHE technology. Correspondingly, the emergence of new projects, non-profit research and education organizations, and the continuous injection of market funds all seem to indicate that the prelude to a technological explosion is about to sound.
Potential FHE Early Ecosystem
In the early stages of the development of the FHE ecosystem, in addition to the core basic technology service company Zama and the highly anticipated Fhenix project, there are a series of equally outstanding projects that deserve our in-depth understanding and attention:
Sunscreen: An FHE compiler built through self-development, supporting FHE conversion in traditional programming languages, designing corresponding FHE ciphertext decentralized storage, and finally outputting FHE features for Web3 applications in the form of SDK
Mind Network: Combined with EigenLayer's Restaking mechanism, a FHE network specifically designed to expand security for AI and DePIN networks
PADO Labs: Launched zkFHE, which integrates ZKP and FHE, and built a decentralized computing network on it
Arcium: Formerly Solana’s privacy protocol Elusiv, it has recently transformed into a parallel confidential computing network combined with FHE
Inco Network: Based on Zama’s fhEVM, it focuses on optimizing the computing cost and efficiency of FHE, and then developing a complete ecological Layer1
Treat: Created by the Shiba team and Zama, it is committed to extending the FHE Layer3 of the Shiba ecosystem
octra: An FHE network that supports isolated execution environments developed based on OCaml, AST, ReasonML and C++
BasedAI: A distributed network that supports the introduction of FHE functions for LLM models
Encifher: Formerly BananaHQ, now renamed Rize Labs, is working on FHEML around FHE
Privasea: The FHE network built by the NuLink core team uses Zama's Concrete ML framework to achieve data privacy protection in the ML reasoning process in the AI field
For non-profit research and educational institutions, we strongly recommend FHE.org and FHE Onchain, which provide valuable resources for academic research and education popularization of the entire ecosystem.
Due to limited space, we have not been able to list all the excellent projects in the FHE ecosystem. But please believe that this ecosystem contains unlimited potential and opportunities, which is worth our continued in-depth exploration and discovery.
Summary
We are optimistic about the prospects of FHE technology and have high expectations for the Fhenix project. Once the Fhenix mainnet is released and officially launched, we expect that applications in different fields will be enhanced by FHE technology. We firmly believe that this innovative and vibrant future is just around the corner.
References
https://zama.ai/
https://github.com/microsoft/SEAL
https://www.fhenix.io/
https://mindnetwork.xyz/
https://www.inco.org/
https://x.com/treatsforShib
https://docs.octra.org/
https://x.com/encifherio
https://www.getbased.ai/
https://www.privasea.ai/
https://x.com/fhe_org
https://x.com/FHEOnchain
https://vitalik.eth.limo/general/2020/07/20/homomorphic.html
https://x.com/MessariCrypto/status/1720134959875457352
https://foresightnews.pro/article/detail/59947