fhevm-public-decryption
Installation
SKILL.md
FHE Public Decryption
Use this skill when a contract needs to USE plaintext onchain, not just show it to a user. Public decryption is a two-step process: the contract marks an encrypted result for decryption, then a second transaction submits the proven plaintext back. This is the only safe way to bridge encrypted computation into plaintext onchain actions.
When To Use
- Implementing unwrap flows (confidential token to public ERC20)
- Building settlement logic that releases public assets based on encrypted computation
- Designing any flow where the contract must act on a plaintext value
- Reviewing code that converts encrypted results into onchain plaintext actions
- Debugging two-step flows where the finalization transaction fails
Core Mental Model
A contract cannot read encrypted values. It computes on them but cannot extract plaintext synchronously. To act on a result, it must: