Inco Docs home page
Search...
⌘K
Ask AI
Feedback
Support
Search...
Navigation
Home
Quickstart
Solidity
JS SDK
Get Started
Introduction
Concepts Guide
Concepts Guide Introduction
Handles
Inputs
Operations
Control Flow
Access Control
Decryption
Reencryption
Best Practices
Architecture
Overview
Components
Decryption mechanisms
On this page
Re-encryption (View)
Onchain Decryption (Public Reveal)
Architecture
Decryption mechanisms
Inco provides two types of decryption mechanisms:
Re-encryption for decryption and viewing privately
Onchain Decryption for decrypting a ciphertext and revealing to the entire network
Re-encryption (View)
Used when a user wants to view their confidential data:
User signs an EIP-712 message proving ownership of their wallet
Client generates an ephemeral keypair
User sends decryption request with signed message and ephemeral public key
The decryption node verifies the signature and checks access control
The decryption node re-encrypts the data with the user’s ephemeral public key so that there’s no information leakage in transit
User decrypts the result with ephemeral private key
Onchain Decryption (Public Reveal)
Used when the result needs to be made available on-chain:
Smart contract calls e.asyncDecrypt(encryptedValue)
The decryption network monitors for decryption events
The decryption network query the ACL to verify permissions
Each decryption network node decrypts the value and sign the result
Relayer collects signatures and submits a callback to the contract
Smart contract verifies the signatures and uses the decrypted value
Was this page helpful?
Yes
No
Components
Assistant
Responses are generated using AI and may contain mistakes.