fhEVM-backend
WebsiteLibrariesSolutionsDevelopersSupport
  • Welcome to fhEVM
  • Getting Started
    • Quick start
    • fhEVM
      • fhEVM-native
        • geth integration
        • Executor
        • Configuration
      • fhEVM-coprocessor
        • Deploy initial contracts
        • geth integration
        • Coprocessor Backend
        • Configuration
    • Gateway
      • Configuration
    • TKMS
      • Use Zama's TKMS
      • Request the creation of a new private key
      • Application Smart Contract
      • Run a TKMS
  • Fundamentals
    • Overview
    • fhEVM
      • Contracts
      • Inputs
      • Symbolic Execution
      • fhEVM-native
        • Architecture
        • FHE Computation
        • Storage
        • Genesis
      • fhEVM-coprocessor
        • Architecture
        • FHE Computation
    • Gateway
      • Decryption
      • Reencryption
      • Inclusion proof
      • Decryption and reencryption request on TKMS
    • TKMS
      • Architecture
      • Blockchain
      • Threshold protocol
      • Zama's TKMS
    • Glossary
  • Guides
    • Node and gateway hardware
    • Run a benchmark
  • References
    • fhEVM API specifications
    • Gateway API specifications
  • Developer
    • Contributing
    • Development roadmap
    • Release note
    • Feature request
    • Bug report
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Fundamentals
  2. Gateway

Reencryption

PreviousDecryptionNextInclusion proof

Last updated 7 months ago

Was this helpful?

Reencryption is performed on the client side by calling the gateway service using the library. To do this, you need to provide a view function that returns the ciphertext to be reencrypted.

  1. The dApp retrieves the ciphertext from the view function (e.g., balanceOf).

  2. The dApp generates a keypair for the user and requests the user to sign the public key.

  3. The dApp calls the gateway, providing the ciphertext, public key, user address, contract address, and the user's signature.

  4. The dApp decrypts the received value with the private key.

fhevmjs