ArkStream Capital: Why do we invest in the FHE track?

ArkStream Capital
2024-05-27 17:00:17
Collection
Fully Homomorphic Encryption (FHE), regarded as one of the holy grails of cryptography, has unique properties that allow third parties to perform arbitrary computations and operations on encrypted data without decryption, thereby enabling composable on-chain privacy computing and bringing new possibilities to various fields and scenarios.

Preface

In the past, cryptographic technology has played a crucial role in the advancement of human civilization, especially in the fields of information security and privacy protection. It not only provides solid protection for data transmission and storage across various domains, but its asymmetric encryption public-private key system and hash functions were creatively integrated by Satoshi Nakamoto in 2008, leading to the design of a proof-of-work mechanism that solves 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 proofs (ZKP), multi-party computation (MPC), and fully homomorphic encryption (FHE) are the most prominent. These technologies have been widely applied in various scenarios, such as ZKP combined with Rollup solutions to address the "impossible triangle" problem of blockchain, and MPC combined with public-private key systems to promote mass adoption of user entry. As for fully homomorphic encryption (FHE), regarded as one of the holy grails of cryptography, its unique characteristics allow third parties to perform arbitrary computations and operations on encrypted data without decryption, thus enabling composable on-chain privacy computing and bringing 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. Firstly, HE stands for homomorphic encryption technology, whose core feature is to allow computations and operations on ciphertext that can directly map to plaintext, meaning the mathematical properties of the encrypted data remain unchanged. The "F" in FHE signifies that this homomorphism has reached a new height, allowing for unlimited computations and operations on encrypted data.

Image To aid understanding, we use the simplest linear function as an encryption algorithm and illustrate the additive and multiplicative homomorphism with single operations. Of course, actual FHE uses a series of more complex mathematical algorithms, and these algorithms have extremely high requirements for computational resources (CPU and memory). Image Although the mathematical principles of FHE are profound and complex, we will not delve into them here. It is worth mentioning that in the field of homomorphic encryption, besides FHE, there are also some partially homomorphic encryption and somewhat homomorphic encryption forms. Their main differences lie in the types of operations supported and the number of allowed computations, but they also provide possibilities for computing and operating on encrypted data. However, to keep the content concise, we will not discuss this in depth here.

In the FHE industry, although many well-known companies are involved in research and development, Microsoft and Zama stand out with their exceptional open-source products (code libraries), highlighting unparalleled usability and influence. They provide developers with stable and efficient FHE implementations, greatly promoting the continuous development and widespread application of FHE technology.

Microsoft's SEAL: A FHE library meticulously crafted by Microsoft Research, which not only supports fully homomorphic encryption but is also compatible with partially homomorphic encryption. SEAL offers an efficient C++ interface and significantly enhances computational performance and efficiency through the integration of numerous optimization algorithms and techniques.

Zama's TFHE: An open-source library focused on high-performance fully homomorphic encryption. TFHE provides services through a C language interface and employs a series of advanced optimization techniques and algorithms aimed at achieving faster computation speeds and lower resource consumption.

In the simplest terms, the operational process of experiencing FHE is roughly as follows:

  • Key Generation: Use the FHE library/framework to generate a pair of public and private keys.

  • Encrypt Data: Use the public key to encrypt the data that needs to be processed with FHE.

  • Perform Homomorphic Computation: Utilize the homomorphic computation functions provided by the FHE library to execute various computational operations on the encrypted data, such as addition, multiplication, etc.

  • Decrypt Results: When the computation results need to be viewed, authorized users use the private key to decrypt the results.

In the practice of FHE, the management scheme for the decryption key (generation, circulation, usage, etc.) is particularly critical. Since the results of computations and operations on encrypted data need to be decrypted for use at certain times and in certain scenarios, the decryption key becomes the core to ensuring the security and integrity of both the original and processed data. The management of the decryption key has many similarities with traditional key management, but due to the uniqueness of FHE, more rigorous and detailed strategies can also be designed.

For blockchain, due to its decentralized, transparent, and immutable characteristics, introducing threshold multi-party secure computation schemes (Threshold Multi-Party Computation, TMPC) is a highly promising option. This scheme allows multiple participants to jointly manage and control the decryption key, and data can only be successfully decrypted when a pre-set threshold number (i.e., the number of participants) is reached. This not only enhances the security of key management but also reduces the risk of a single node being compromised, providing strong guarantees for the application of FHE in blockchain environments.

Foundational fhEVM

From the perspective of minimal invasiveness, the ideal way to implement FHE on the blockchain is to encapsulate it as a general smart contract code library to ensure portability and flexibility. However, this solution requires that the smart contract virtual machine must pre-support the specific instruction set for the complex mathematical operations and encryption operations required by FHE. If the virtual machine cannot meet these requirements, it will be necessary to delve into the core architecture of the virtual machine for customization and modification to accommodate the needs of FHE algorithms, thus achieving seamless integration.

As a widely adopted and long-validated virtual machine, EVM naturally becomes the preferred choice for implementing FHE. However, there are very few practitioners in this field, among which we again notice the open-source TFHE from Zama. It turns out that Zama not only provides the basic TFHE library but also, as a technology company focused on applying FHE technology in the fields of artificial intelligence and blockchain, has launched two important open-source products: Concrete ML and fhEVM. Concrete ML focuses on privacy-preserving machine learning. Through Concrete ML, data scientists and ML practitioners can train and infer machine learning models on sensitive data while protecting privacy, thus fully utilizing data resources without worrying about privacy breaches. The other product, fhEVM, supports privacy computing with fully homomorphic encryption in Solidity. fhEVM enables developers to use fully homomorphic encryption technology in Ethereum smart contracts, achieving privacy protection and secure computation.

Through reading the materials on fhEVM, we learn that the core features of fhEVM are:

  • fhEVM: At the non-EVM bytecode level, it provides operational support for FHE by integrating multiple pre-compiled contracts of different states from Zama's open-source FHE library in the form of embedded functions. Additionally, a specific EVM memory and storage area designed for FHE is created for storing, reading, writing, and verifying FHE ciphertext;

  • Decryption mechanism based on distributed threshold protocol design: Supports the asynchronous encryption mechanism for sharing decryption keys among multiple users and contracts using a threshold multi-party secure computation scheme, as well as global FHE keys and on-chain stored encrypted keys;

  • Solidity contract library that lowers the barrier for developers: Designed with FHE data types, operation types, decryption calls, and encrypted outputs;

Zama's fhEVM provides a solid starting point for FHE technology in blockchain applications, but considering that Zama primarily focuses on technological research and development, its solutions lean more towards the technical level, with relatively less consideration for engineering implementation and commercial applications. Therefore, fhEVM may encounter various unforeseen challenges in the process of being pushed towards practical applications, including but not limited to technical barriers and performance optimization issues.

Building the Ecosystem with FHE-Rollups

The fhEVM alone cannot constitute a project or a complete ecosystem; it is more like one of the diversified clients within the Ethereum ecosystem. To establish itself as an independent project, fhEVM must rely on a public chain-level architecture or adopt Layer2/Layer3 solutions. The development direction of FHE public chains inevitably needs to address how to reduce redundancy and waste of FHE computational resources among distributed validator nodes. In contrast, Layer2/Layer3 solutions, which exist as execution layers of public chains, can allocate computational work to a few nodes, significantly reducing the magnitude of computational overhead. For this reason, Fhenix, as a pioneer, actively explores the combination of fhEVM with Rollup technology, proposing to build an advanced FHE-Rollups Layer2 solution.

Considering that ZK Rollups technology involves complex ZKP mechanisms and requires enormous computational resources to generate the proofs needed for verification, directly implementing an FHE-Rollups solution based on ZK Rollups will face many challenges. Therefore, at this stage, compared to ZK Rollups, adopting the Optimistic Rollups solution as the technical choice for Fhenix would be more practical and efficient.

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, allowing FHE logic to be compiled into WebAssembly for secure execution. The core library, fheOS, provides all the functionalities needed to integrate FHE logic into smart contracts. The Threshold Service Network (TSN) is another important component that hosts the network keys for secret sharing, using specific algorithms to split them into multiple parts to ensure security, and is responsible for tasks such as decrypting data when necessary.

Image Based on the aforementioned technology stack, Fhenix has released its first public version, Fhenix Frontier. Although this early version has many limitations and missing features, it already provides comprehensive usage instructions for the smart contract code library, Solidity API, contract development toolchain (such as Hardhat/Remix), and front-end interaction JavaScript libraries. Developers and ecosystem project parties interested in this can refer to the official documentation for exploration.

Chain-Agnostic FHE Coprocessors

Building on FHE-Rollups, Fhenix cleverly introduces the Relay module, aimed at empowering various public chains, L2, and L3 networks to access FHE Coprocessors and utilize FHE functionalities. This means that even if the original Host Chain does not support FHE, it can now indirectly enjoy the powerful capabilities of FHE. However, since the proof challenge period for FHE-Rollups typically lasts up to 7 days, this somewhat limits the widespread application of FHE. To overcome this challenge, Fhenix collaborates with EigenLayer, using EigenLayer's Restaking mechanism to provide a faster and more convenient channel for the services of FHE Coprocessors, greatly enhancing the overall efficiency and flexibility of FHE Coprocessors.

The usage process of FHE Coprocessors is simple and clear:

  1. The application contract calls the FHE Coprocessor on the Host Chain to perform encrypted computation operations.

  2. The Relay contract queues the request.

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

  4. The FHE Rollup executes the FHE computation operation.

  5. The threshold network decrypts the output.

  6. The Relay node returns the results and optimistic proofs to the contract.

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

  8. The application contract continues to execute based on the call results.

    Image

Fhenix Participation Guide

If you are a developer, you can delve into the documentation of Fhenix and develop your own FHE applications based on these documents to explore its potential in practical applications.

If you are a user, you might want to try out the dApps provided by Fhenix's FHE-Rollups and experience the data security and privacy protection brought by FHE.

If you are a researcher, we strongly recommend that you carefully read the documentation of Fhenix 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.

Best Application Scenarios for FHE

FHE technology demonstrates a wide range of application prospects, especially in full-chain gaming, DeFi, and AI. We firmly believe that it has enormous development potential and broad application space in these fields:

  • Privacy-Preserving Full-Chain Gaming: FHE technology provides strong encryption protection for financial transactions and player operations within the gaming economy, effectively preventing real-time manipulation and ensuring fairness and justice in games. At the same time, FHE can anonymize player activities, significantly reducing the risk of financial asset and personal information leakage, thus comprehensively protecting players' privacy.

  • DeFi/MEV: With the booming development of DeFi activities, many DeFi operations have become targets for MEV attacks in the dark forest. To address this challenge, FHE can effectively protect sensitive data in DeFi that should not be disclosed, such as position sizes, liquidation lines, and transaction slippage, while ensuring the processing of business logic computations. By applying FHE, the health of on-chain DeFi can be significantly improved, greatly reducing the frequency of undesirable MEV behaviors.

  • AI: The training of AI models relies on datasets, and when it involves using individual data for training, ensuring the security of sensitive individual data becomes a primary prerequisite. For this reason, FHE technology is an ideal solution for training individual privacy data in AI models, allowing AI to process encrypted data and complete the training process without disclosing any personal sensitive information.

Community Recognition of FHE

The development of technology cannot be achieved solely through its hardcore features. To achieve maturity and continuous progress in technology, it must rely on ongoing academic research and actively constructed community power. In this regard, FHE is regarded as 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 reiterated his stance on social media, undoubtedly reinforcing this position and calling for more resources and efforts for the development of FHE technology. Correspondingly, new projects, non-profit research, and educational organizations continue to emerge, with market funding being continuously injected, all seemingly indicating that a technological explosion is about to begin.

Image

Promising Early Ecosystem of FHE

In the early development of the FHE ecosystem, in addition to the core foundational technology service company Zama and the highly regarded Fhenix project, there are also a series of equally outstanding projects worth our in-depth understanding and attention:

  • Sunscreen: An FHE compiler built through self-research, supporting traditional programming languages for FHE conversion, designing corresponding decentralized storage for FHE ciphertext, and finally outputting FHE features for Web3 applications in the form of SDK.

  • Mind Network: An FHE network that combines EigenLayer's Restaking mechanism, specifically designed to expand security for AI and DePIN networks.

  • PADO Labs: Launched zkFHE, which integrates ZKP and FHE, and builds a decentralized computing network on it.

  • Arcium: Formerly known as Solana's privacy protocol Elusiv, recently transformed into a parallel confidential computing network incorporating FHE.

  • Inco Network: Based on Zama's fhEVM, focused on optimizing the computational cost and efficiency of FHE, thereby developing a complete Layer1 ecosystem.

  • Treat: Co-created by the Shiba team and Zama, dedicated to extending the Shiba ecosystem with FHE Layer3.

  • octra: An FHE network developed based on OCaml, AST, ReasonML, and C++ that supports isolated execution environments.

  • BasedAI: A distributed network that supports introducing FHE capabilities for LLM models.

  • Encifher: Formerly known as BananaHQ, now renamed Rize Labs, focusing on FHEML around FHE.

  • Privasea: An FHE network built by the core team of NuLink, using Zama's Concrete ML framework, aimed at achieving data privacy protection in AI's ML inference process.

For non-profit research and educational institutions, we strongly recommend FHE.org and FHE Onchain, which provide valuable resources for academic research and educational outreach for the entire ecosystem.

Due to space limitations, we have not been able to list all the excellent projects in the FHE ecosystem. But please believe that this ecosystem contains infinite potential and opportunities, worthy of our continuous exploration and discovery.

Image

Conclusion

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 anticipate that applications in various fields will be enhanced due to 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

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators