ArkStream Capital: Why We Invest in FHE
Date: June 4, 2024
Introduction
In the past, cryptographic technology has played a crucial role in the progress of human civilisation, particularly 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 combines asymmetric encryption public-private key systems and hash functions innovatively. This fusion was notably realised in 2008 by Satoshi Nakamoto, who designed the proof-of-work mechanism to solve the double-spending problem, leading to the birth of Bitcoin and the dawn of the blockchain industry.
As the blockchain industry continues to evolve and develop rapidly, a series of cutting-edge cryptographic technologies have emerged. Among these, zero-knowledge proofs (ZKP), multi-party computation (MPC), and fully homomorphic encryption (FHE) are the most prominent. These technologies are widely applied in multiple scenarios. For example, ZKP combined with Rollup solutions addresses the blockchain trilemma, while MPC with public-private key systems promotes large-scale user adoption. FHE, considered one of the holy grails of cryptography, allows third parties to perform an unlimited number of calculations on encrypted data without decrypting it. This capability enables composable on-chain privacy computation, bringing new possibilities to various fields and scenarios.
Quick Overview of FHE
When we mention FHE (Fully Homomorphic Encryption), it is essential to understand the meaning behind its name. Firstly, HE stands for homomorphic encryption technology, which allows computations and operations on ciphertexts that directly map to plaintexts, maintaining the mathematical properties of encrypted data. The “F” in FHE indicates that this homomorphism reaches a new level, permitting unlimited computations and operations on encrypted data.
To aid understanding, we use the simplest linear function as the encryption algorithm and explain additive and multiplicative homomorphism with single operations. In practice, however, FHE employs a series of more complex mathematical algorithms, demanding high computational resources (CPU and memory).
Although the mathematical principles of FHE are profound and complex, we will not delve into them deeply here. It is worth noting that besides FHE, there are partially homomorphic encryption and somewhat homomorphic encryption. They differ mainly in the types of operations supported and the number of allowed computations, yet they also enable the computation and operation of encrypted data. For simplicity, we will not discuss these in detail here.
Notable Contributions in FHE
Despite many renowned companies participating in FHE research and development, Microsoft and Zama stand out with their excellent open-source products (code libraries), showcasing unmatched usability and influence. They provide developers with stable and efficient FHE implementations, significantly advancing the development and widespread application of FHE technology.
Microsoft’s SEAL: Crafted by Microsoft Research, SEAL supports both fully homomorphic encryption and partially homomorphic encryption. SEAL offers efficient C++ interfaces and integrates numerous optimisation algorithms and techniques, significantly enhancing computational performance and efficiency.
Zama’s TFHE: An open-source library focused on high-performance fully homomorphic encryption. TFHE serves through a C language interface and employs advanced optimisation techniques and algorithms to achieve faster computation speeds and lower resource consumption.
The simplified steps to experience FHE operations are as follows:
1. Key Generation: Use an FHE library/framework to generate a pair of public and private keys.
2. Data Encryption: Encrypt the data requiring FHE computation processing using the public key.
3. Homomorphic Computation: Perform various computations, such as addition and multiplication, on the encrypted data using the FHE library’s homomorphic computation capabilities.
4. Decrypt Results: When viewing computation results, authorised users decrypt the results using the private key.
In the practice of FHE, the management of decryption keys (generation, transfer, and use) is crucial. Since the results of computations and operations on encrypted data need to be decrypted at certain times and scenarios, decryption keys become the core to ensuring the security and integrity of the original and processed data. The management scheme for decryption keys shares many similarities with traditional key management but can be designed with more rigorous and meticulous strategies due to FHE’s particularity.
For blockchain, given its decentralised, transparent, and immutable characteristics, introducing a threshold multi-party computation (TMPC) scheme is a highly promising choice. This scheme allows multiple participants to jointly manage and control decryption keys, ensuring data can only be decrypted when a preset threshold number of participants is met. This not only enhances the security of key management but also reduces the risk of a single node being compromised, providing robust support for the application of FHE in blockchain environments.
Laying the Foundation with fhEVM
From the perspective of minimal invasiveness, the ideal way to implement FHE on the blockchain is to encapsulate it into a general smart contract code library, ensuring lightweight and flexibility. However, this approach requires that the smart contract virtual machine must pre-support the specific instruction sets for complex mathematical operations and encryption operations required by FHE. If the virtual machine cannot meet these requirements, deep customisation and modification of the virtual machine’s core architecture are necessary to adapt to FHE algorithms, achieving seamless integration.
As a widely adopted and long-validated virtual machine, the EVM naturally becomes the first choice for implementing FHE. However, there are few practitioners in this field, and again, we note the open-source TFHE from Zama. Zama not only provides the foundational TFHE library but, as a tech company focused on applying FHE technology in artificial intelligence and blockchain, also introduces two significant open-source products: Concrete ML and fhEVM. Concrete ML focuses on machine learning privacy computation. Through Concrete ML, data scientists and ML practitioners can train and infer machine learning models on sensitive data while ensuring privacy, thus fully utilising data resources without worrying about privacy leaks. Another product, fhEVM, supports Solidity-based privacy computation. fhEVM allows developers to use fully homomorphic encryption technology within Ethereum smart contracts, achieving privacy protection and secure computation.
By reviewing fhEVM’s documentation, we understand the core features of fhEVM:
· fhEVM: Provides FHE operation support at the non-EVM bytecode level through embedded functions by integrating multiple precompiled contracts of different states from Zama’s open-source FHE library. Additionally, it creates a specific EVM memory and storage area for FHE ciphertext storage, reading, writing, and verification.
· Decryption Mechanism Based on Distributed Threshold Protocols: Supports the sharing of decryption keys among multiple users and contracts, using asynchronous encryption mechanisms with a global FHE key for encrypted data and on-chain stored encryption keys shared among multiple validators through a threshold multi-party computation scheme.
· Solidity Contract Library to Lower Developer Thresholds: Designs FHE-encrypted data types, operation types, decryption calls, and encrypted outputs.
Zama’s fhEVM provides a solid starting point for FHE technology in blockchain applications. However, considering Zama’s primary focus on technological research and development, its solutions lean towards technical aspects, with relatively less consideration for engineering implementation and commercial applications. Therefore, fhEVM might face various unforeseen challenges in practical application, including but not limited to technical barriers and performance optimisation issues.
Building an Ecosystem with FHE-Rollups
A standalone fhEVM cannot constitute a project or a complete ecosystem; it resembles a diverse client within the Ethereum ecosystem. To establish itself as an independent project, fhEVM must rely on a public chain-level architecture or adopt Layer 2/Layer 3 solutions. The development of FHE public chains inevitably involves addressing the issue of reducing the redundancy and waste of FHE computational resources among distributed validator nodes. In contrast, Layer 2/Layer 3 solutions, which exist as execution layers of public chains, can distribute computing work to fewer nodes, significantly reducing computational overhead. Consequently, Fhenix, as a pioneer, actively explores combining fhEVM with Rollup technology, proposing to build an advanced FHE-Rollups Layer 2 solution.
Considering that ZK Rollups technology involves complex ZKP mechanisms and requires enormous computational resources to generate proofs, combining these with the features of full FHE presents numerous challenges. Therefore, at the current stage, adopting an Optimistic Rollups solution for Fhenix’s technical choice is more practical and efficient compared to ZK Rollups.
Fhenix’s tech stack primarily includes the following key components:
· A Variant of Arbitrum Nitro’s Fraud Prover: It can perform fraud proofs in WebAssembly, allowing FHE logic to be compiled into WebAssembly for secure operation.
· Core Library fheOS: Provides all necessary functions to integrate FHE logic into smart contracts.
· Threshold Service Network (TSN): Hosts secret-shared network keys, ensuring security by splitting them into multiple parts using specific secret-sharing techniques and performing tasks such as data decryption when necessary.
Based on the above tech stack, Fhenix released its first public version, Fhenix Frontier. Despite being an early version with many limitations and missing features, it comprehensively provides usage instructions for the smart contract code library, Solidity API, contract development toolchains (like Hardhat/Remix), and front-end interactive JavaScript libraries. Developers and ecosystem project teams interested can explore the official documentation.
Chain-Agnostic FHE Coprocessors
On the foundation of FHE-Rollups, Fhenix cleverly introduces the Relay module, empowering various public chains, L2, and L3 networks to access FHE Coprocessors and use FHE functionality. This means that even if the original Host Chain does not support FHE, it can now indirectly benefit from FHE’s powerful features. However, due to the typical 7-day proof challenge period for FHE-Rollups, FHE’s widespread application is somewhat limited. To overcome this challenge, Fhenix collaborates with EigenLayer, utilising EigenLayer’s Restaking mechanism to provide a quicker and more convenient channel for FHE Coprocessor services, significantly enhancing the overall efficiency and flexibility of FHE Coprocessors.
The usage process for FHE Coprocessors is straightforward:
1. Application contracts on the Host Chain call the FHE Coprocessor to perform encrypted computation operations.
2. The Relay contract queues requests.
3. Relay nodes listen to the Relay contract and forward the calls to the dedicated Fhenix Rollup.
4. The FHE Rollup performs FHE computation operations.
5. The threshold network decrypts the output.
6. Relay nodes return the results and optimistic proof to the contract.
7. The contract verifies the optimistic proof and sends the results to the caller.
8. The application contract continues executing the contract based on the call results.
Fhenix Participation Guide
· Developers: Deeply study Fhenix’s documentation and develop your own FHE applications based on these documents to explore their potential in practical applications.
· Users: Try out the dApps provided by Fhenix’s FHE-Rollups to experience the data security and privacy protection brought by FHE.
· Researchers: We strongly recommend thoroughly reading Fhenix’s documentation, deeply understanding the principles, technical details, and application prospects of FHE to make more valuable contributions in your research field.
Best Application Scenarios for FHE
FHE technology shows broad application prospects, particularly in areas such as full-chain games, DeFi, and AI. We firmly believe it has significant 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 game economies, effectively preventing real-time manipulation and ensuring fairness and justice in games. Additionally, FHE can anonymise player activities, significantly reducing the risk of financial assets and personal information leakage, thus comprehensively protecting player privacy and security.
· DeFi/MEV: With the flourishing development of DeFi activities, many DeFi operations have become targets of MEV attacks in the dark forest. To address this challenge, FHE can effectively protect sensitive data in DeFi, such as holdings, liquidation lines, and trading slippage, while ensuring business logic computations are handled. By applying FHE, the health of on-chain DeFi can be significantly improved, greatly reducing the frequency of malicious MEV behaviours.
· AI: The training of AI models relies on datasets, and ensuring the security of individual sensitive data becomes a top priority when using individual data for training. Therefore, FHE technology becomes the ideal solution for training AI models on individual privacy data. It allows AI to process encrypted data, completing the training process without revealing any personal sensitive information.
Community Recognition of FHE
The development of technology is not solely reliant on its core features. Achieving technological maturity and sustained progress requires continuous academic research and an actively built community. In this regard, FHE is regarded as the holy grail of cryptography, with its potential and value widely recognised. In 2020, Vitalik Buterin highly endorsed and supported FHE technology in his article “Exploring Fully Homomorphic Encryption”. Recently, he reiterated his support on social media, reinforcing this stance and calling for more resources and efforts for FHE technology development. Correspondingly, new projects, non-profit research, and educational organisations continue to emerge, with sustained market funding injections. All these signals seem to indicate that a technological explosion is on the horizon.
Potential Early FHE Ecosystem
In the early development of the FHE ecosystem, besides the core foundational technology service company Zama and the highly regarded Fhenix project, a series of equally excellent projects are worth our deep understanding and attention:
· Sunscreen: Constructs an FHE compiler through self-developed means, supports FHE conversion for traditional programming languages, designs corresponding FHE ciphertext decentralised storage, and finally outputs FHE features for Web3 applications in the form of SDKs.
· Mind Network: Specialises in extending the security of AI and DePIN networks by combining EigenLayer’s Restaking mechanism into its FHE network.
· PADO Labs: Introduces zkFHE, a fusion of ZKP and FHE, and builds a decentralised computing network on top of it.
· Arcium: Formerly Solana’s privacy protocol Elusiv, recently transformed into a parallel confidential computing network combined with FHE.
· Inco Network: Based on Zama’s fhEVM, focuses on optimising FHE’s computational costs and efficiency, developing a complete Layer 1 ecosystem.
· Treat: Jointly created by the Shiba team and Zama, aims to extend the Shiba ecosystem’s FHE Layer 3.
· octra: An FHE network developed based on OCaml, AST, ReasonML, and C++, supporting isolated execution environments.
· BasedAI: A distributed network supporting FHE functionality introduction for LLM models.
· Encifher: Formerly BananaHQ, now renamed Rize Labs, focusing on FHEML.
· Privasea: An FHE network developed by the NuLink core team, adopting Zama’s Concrete ML framework to achieve data privacy protection during ML inference 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 dissemination across the ecosystem.
Due to space limitations, we could not list all the excellent projects in the FHE ecosystem. However, rest assured that this ecosystem is brimming with infinite potential and opportunities, deserving continuous in-depth exploration and discovery.
Conclusion
We are highly 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 applications in various fields to be enhanced by FHE technology. We firmly believe that this future, full of innovation and vitality, is just around the corner.
References
https://github.com/microsoft/SEAL
https://vitalik.eth.limo/general/2020/07/20/homomorphic.html
https://x.com/MessariCrypto/status/1720134959875457352
https://foresightnews.pro/article/detail/59947
ArkStream Capital is a venture capital firm specializing in early-stage investments in Web3 unicorns.
Founded by crypto experts with pedigrees from MIT, Stanford, Tencent, Google, and BlackRock, ArkStream leverages eight years of deep Web3 expertise to drive the zero-to-one growth of its portfolio companies.
ArkStream Capital is managing a portfolio of over 100 companies, including Aave, Flow, Sei, Manta, Fhenix, Merlin, Particle Network, and Space and Time.