fhevm-solidity  by zama-ai

Solidity library for confidential smart contracts using fully homomorphic encryption (FHE)

created 2 years ago
493 stars

Top 63.5% on sourcepulse

GitHubView on GitHub
Project Summary

This library provides a Solidity interface for fhevm, enabling developers to write confidential smart contracts on the EVM using Fully Homomorphic Encryption (FHE). It allows for end-to-end encrypted transactions and state, composability with existing dApps, and programmable privacy without requiring cryptographic expertise.

How It Works

fhevm leverages FHE to perform computations on encrypted data. Developers interact with this by using special euint data types within Solidity contracts to designate private states. The library handles the underlying FHE operations, allowing for encrypted arithmetic, comparisons, and conditional logic directly on-chain, while maintaining data availability and composability with public states.

Quick Start & Requirements

  • Install: Typically integrated into Solidity projects via standard toolchains.
  • Prerequisites: Requires a Solidity compiler and an EVM-compatible environment. Specific fhevm runtime setup details are in the documentation.
  • Resources: No explicit hardware requirements mentioned, but FHE operations are computationally intensive.
  • Links: 📃 Read white paper | 📒 Documentation | 💛 Community support

Highlighted Details

  • Enables confidential DeFi, gaming, and DID use cases by keeping sensitive data private on-chain.
  • Supports high-precision encrypted integers (up to 256 bits) with a full range of operators.
  • Features encrypted if-else conditionals and on-chain pseudo-random number generation.
  • Offers configurable decryption methods (threshold, centralized, KMS).

Maintenance & Community

  • Developed by Zama.
  • Community support available via provided links.
  • Links: 💛 Community support | 📚 FHE resources by Zama

Licensing & Compatibility

  • License: BSD-3-Clause-Clear.
  • Restrictions: Free for development, research, prototyping, and experimentation. Commercial use requires a separate patent license from Zama.

Limitations & Caveats

Commercial use of the open-source code is restricted and requires a paid patent license from Zama. The computational overhead of FHE operations may impact performance for complex or frequent computations.

Health Check
Last commit

1 month ago

Responsiveness

1+ week

Pull Requests (30d)
0
Issues (30d)
0
Star History
16 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.