FHE 101 (Plain Language)

Fully Homomorphic Encryption lets a smart contract operate on encrypted values without revealing them on-chain.

Key ideas

  • 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.

The 3 permissions you will see

  • 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).

Public decryption

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.

Typical flow

  1. User encrypts input off-chain (bound to contract + user)

  2. Contract verifies the input proof and stores the ciphertext

  3. Contract grants permissions (allowThis / allow)

  4. Later, user or authorized party decrypts

Last updated