fhEVM-confidential-smart-contracts-on-the-EVM-using-FHE

https://github.com/zama-ai/fhevm

fhEVM is a technology that enables confidential smart contracts on the EVM using fully homomorphic encryption (FHE).

  • Solidity integration: fhEVM contracts are simple solidity contracts that are built using traditional solidity toolchains.
  • Simple developer experience: Developers can use the euint data types to mark which part of their contracts should be private.
  • Programmable privacy: All the logic for access control of encrypted states is defined by developers in their smart contracts.
  • High precision encrypted integers : Up to 256 bits of precision for integers
  • Full range of operators : All typical operators are available: +-*/<>==, …
  • Encrypted if-else conditionals : Check conditions on encrypted states
  • On-chain PRNG : Generate secure randomness without using oracles
  • Configurable decryption : Threshold, centralized or KMS decryption
  • Unbounded compute Depth : Unlimited consecutive FHE operations
    Even Circle build a confidential ERC20 on fhEVM - https://github.com/Inco-fhevm/confidential-erc20-framework .
    Let’s deep dive in it:

    Decrypt and reencrypt

    On fhevm blockchain - ZAMA team built, private key is owned by a Key Management Service (KMS). If the plaintext value is needed at some point, there are two ways to obtain it. Both methods are handled by a service called the Gateway.
    fhevm allow explicit decryption requests for any encrypted type. The values are decrypted with the network private key.

    the detail implementation ==> https://docs.zama.ai/fhevm/guides/decrypt

Reencryption is performed on the client side by calling the gateway service using the fhevmjs library.

Zama has another project of FHE on AI — https://github.com/zama-ai/concrete-ml

confidential-erc20

https://www.inco.org/ and Circle publish a framework https://github.com/Inco-fhevm/confidential-erc20-framework which is leveraging on fhEVM:

  • conceals balances.
  • transaction amounts.
  • optional viewing and transfer rules to meet regulatory obligations or enhance programmatic risk management.
  • the counter parties addresses are published on public blockchain.
  • the private key is also configured as kms-service.