FHE 101 (Plain Language)
Last updated
Fully Homomorphic Encryption lets a smart contract operate on encrypted values without revealing them on-chain.
Encrypted values are bound to a contract and a user.
Input proofs show the encrypted input matches the expected contract + signer.
Permissions are required to decrypt results.
FHE.allowThis(value) lets the contract operate on the ciphertext later.
FHE.allow(value, user) lets a user decrypt.
FHE.allowTransient(value, contract) grants one-transaction permission (useful for multi-contract flows).
Some examples opt in to public decryption using FHE.makePubliclyDecryptable. This is only safe if the value is meant to be public after an on-chain proof step.
User encrypts input off-chain (bound to contract + user)
Contract verifies the input proof and stores the ciphertext
Contract grants permissions (allowThis / allow)
Later, user or authorized party decrypts
Last updated