By Ray ArkStream Capital

Preface In the past, cryptography technology has played an important role in the progress of human civilization, especially in the field 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 ushering in 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 the Rollup solution to solve the "impossible triangle" problem of the blockchain, and MPC combined with the 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, which brings new possibilities to multiple fields and scenarios.   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 whole new level, allowing unlimited calculations and operations on encrypted data.
To help understand, we choose the simplest linear function as the encryption algorithm, and explain the addition homomorphism and multiplication homomorphism in combination with a single operation. 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 go into more details here. It is worth mentioning that in the field of homomorphic encryption, in addition to FHE, there are also two forms of partially homomorphic encryption and somewhat homomorphic encryption. Their main difference lies in the types of operations they support and the number of operations allowed, but they also provide the possibility to implement calculations and operations on encrypted data. However, in order to keep the content concise, we will not discuss it in depth here. In the FHE industry, although there are many well-known companies involved in research and development, Microsoft and Zama highlight unparalleled usability and influence with their excellent open source products (code bases). 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: an FHE library carefully built by Microsoft Research, which 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: is an open source library focusing on high-performance fully homomorphic encryption. TFHE provides services through a C language interface and uses a series of advanced optimization technologies and algorithms to achieve faster computing speed and lower resource consumption. According to the most simplified idea, the operation process of experiencing FHE is roughly as follows:

  • Generate keys: Generate a pair of public and private keys using the FHE library/framework.

  • Encrypted data: Use the public key to encrypt the data that needs to be processed by FHE calculations.

  • Perform homomorphic computation: Use the homomorphic computation function provided by the FHE library to perform various computational operations on encrypted data, such as addition and multiplication.

  • Decryption result: When the calculation result needs to be viewed, the legitimate user uses the private key to decrypt the calculation result.

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 to ensure the security and integrity of original 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 decentralization, transparency, and immutability, 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.

 

 

fhEVM lays the foundation

 

From the perspective of minimal intrusion, the ideal way to implement FHE on the blockchain is to encapsulate it as a general smart contract code base to ensure portability and flexibility. However, the premise of this solution 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 fhEVM documentation, we learned that the core features of fhEVM are:

 

  • fhEVM: At the non-EVM bytecode level, it provides FHE support in the form of embedded functions 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 created specifically for FHE to store, read, write, and verify FHE ciphertext;

  • Decryption mechanism based on distributed threshold protocol design: supports global FHE keys and on-chain storage of encryption keys for mixed encrypted data between multiple users and multiple contracts, and asynchronous encryption mechanism for sharing decryption keys between multiple validators using a threshold multi-party secure computation scheme;

  • Solidity contract library that lowers the threshold for developers to use: FHE encryption data types, operation types, decryption calls, and encryption outputs are designed;

Zama’s fhEVM provides a solid starting point for FHE technology in blockchain applications, but considering that Zama focuses mainly on technology research and development, its solutions are more technical, with relatively little consideration given to engineering implementation and commercial applications. Therefore, fhEVM may encounter various unexpected challenges in the process of being promoted to practical applications, including but not limited to technical barriers and performance optimization.

 

Building an Ecosystem of FHE-Rollups

 

The pure fhEVM itself cannot constitute a project or a complete ecosystem on its own. It is more like one of the diverse clients in the Ethereum ecosystem. If it wants to be established as 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 computing work to a small number of 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, compared with ZK Rollups, it is more practical and efficient to use the Optimistic Rollups solution as Fhenix's technical choice.

 

Fhenix’s technology stack mainly includes the following key components: A variant of Arbitrum Nitro’s fraud prover, which can perform fraud proofs in WebAssembly, so 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 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 functions, it has provided comprehensive instructions for the use of 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 的 FHE Coprocessors 

 

Based on FHE-Rollups, Fhenix cleverly introduced the Relay module, which aims to enable various public chains, L2 and L3 networks, so that they can 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. In order to overcome this challenge, Fhenix teamed up with EigenLayer to provide a faster and more convenient channel for the services of FHE Coprocessors through EigenLayer's Restaking mechanism, greatly improving the efficiency and flexibility of the entire FHE Coprocessors.

 

 

 

The workflow for using FHE Coprocessors is straightforward:

 

  1. The application contract calls FHE Coprocessor on the Host Chain to perform cryptographic calculations

  2. Relay contract queue request

  3. The Relay node listens to the Relay contract and forwards the call to the dedicated Fhenix Rollup

  4. FHE Rollup performs FHE computation operations

  5. Threshold network decryption output

  6. The relay node sends the result and optimistic proof back to the contract

  7. The contract verifies the optimistic proof and sends the result to the caller

  8. Apply the contract and continue to execute the contract based on the call result

 


 

 

 

Fhenix Participation Guide

If you are a developer, you can delve into Fhenix’s documentation and develop your own FHE-based applications based on these documents to explore its potential in real-world applications.

 

If you are a user, you might as well 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 highly recommended that you read Fhenix's documentation carefully to gain a deeper understanding of the principles, technical details, and application prospects of FHE so that you can make more valuable contributions in your research field.

 

FHE Best Practices

 

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 huge development potential and broad application space in these fields:

 

  • Privacy-protected full-chain games: FHE technology provides strong encryption guarantees for financial transactions and player operations in the game economy, effectively preventing real-time manipulation and ensuring the fairness and impartiality 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 fully protecting players’ privacy and security.

  • 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 business logic calculation and processing. By applying FHE, the health of on-chain DeFi can be significantly improved, significantly 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. For this reason, FHE technology has become an ideal solution for training AI models with 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 his article "Exploring Fully Homomorphic Encryption". Recently, he spoke again on social media, which undoubtedly re-strengthened 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 educational 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 infrastructure 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 conversions from 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 extend security for AI and DePIN networks

 

PADO Labs: Launching zkFHE, a decentralized computing network that combines ZKP and FHE

 

**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, focusing on optimizing the computational cost and efficiency of FHE, and then developing a complete ecological Layer1

 

Treat: jointly created by the Shiba team and Zama, dedicated to extending the FHE Layer3 of the Shiba ecosystem

 

octra: FHE network with isolated execution environment based on OCaml, AST, ReasonML and C++

 

BasedAI: Distributed network supporting the introduction of FHE capabilities for LLM models

 

Encifher: Formerly BananaHQ, now renamed Rize Labs, is working on FHEML around FHE

 

Privasea: A FHE network built by the NuLink core team, using Zama’s Concrete ML framework, designed to achieve data privacy protection during ML reasoning 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 educational popularization of the entire ecosystem.

 

Due to limited space, we are unable 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 development.

 

 

 

 

Summarize

 

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