Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions get-started/introduction/what-is-cofhe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ description: "A high-level introduction to CoFHE. Fhenix's Fully Homomorphic Enc

**CoFHE is an FHE coprocessor that lets any blockchain run computations on encrypted data.**

This makes confidentiality just another Solidity feature. There's no migration to a specialized FHE chain, no new toolchain, and no cryptography to implement yourself. CoFHE handles the heavy FHE math offchain; your contract only ever touches lightweight *handles* to encrypted values, so code stays familiar. Values are encrypted. Everything else feels like ordinary development.
This makes confidentiality another Solidity feature. There's no migration to a specialized FHE chain, no new toolchain, and no cryptography to implement yourself. CoFHE handles the heavy FHE math offchain; your contract only ever touches lightweight *handles* to encrypted values, so code stays familiar. Values are encrypted. Everything else feels like ordinary development.

## Why a coprocessor?

The coprocessor model adds confidentiality without changing how applications are built, same Solidity, same chains, same tooling, with encrypted values as just another type to work with.
The coprocessor model adds confidentiality without changing how applications are built, same Solidity, same chains, same tooling, with encrypted values as another type to work with.

- **No migration**: CoFHE attaches to existing blockchains. Confidential contracts deploy to the networks already in use, not a dedicated FHE L1.
- **Familiar code**: contracts pass around lightweight *handles* (references to ciphertexts) rather than the ciphertexts themselves, so they read like normal Solidity. FHE operations add some gas overhead, but the onchain footprint stays small and predictable.
- **No cryptography to implement**: the heavy FHE math runs offchain on the CoFHE server, which is built to do it efficiently. A contract calls `FHE.add`; CoFHE does the rest.
- **Trust-minimized by default**: decryption is never in one party's hands. A Threshold Network performs it through multi-party computation.
- **No cryptography to implement**: the heavy FHE math runs offchain in the [compute pipeline](/deep-dive/cofhe-components/compute-pipeline). A contract calls `FHE.add`; CoFHE does the rest.
- **Trust-minimized by default**: no machine holds the decryption key whole. Its shares sit with independent partners, and each partner releases its share only to a [Teecryptor](/deep-dive/cofhe-components/teecryptor) enclave that the TEE (Trusted Execution Environment) hardware has attested. Teecryptor reassembles the key in memory and never stores it.

## What CoFHE lets you build

Expand All @@ -34,15 +34,15 @@ Every CoFHE application follows the same three-phase lifecycle: **encrypt to com
<Steps>

<Step title="Encrypt (client-side)">
The user's plaintext is encrypted in the client using the [`@cofhe/sdk`](/client-sdk/introduction/overview), bundled with a zero-knowledge proof that the input is well-formed, and submitted to CoFHE. The blockchain only ever receives an encrypted handle, never the raw value.
The [`@cofhe/sdk`](/client-sdk/introduction/overview) encrypts the user's plaintext in the client. It attaches a zero-knowledge proof that the input is well-formed, then submits both to CoFHE. The blockchain only ever receives an encrypted handle, never the raw value.
</Step>

<Step title="Compute (onchain handle, offchain math)">
The smart contract uses [`FHE.sol`](/fhe-library/introduction/overview) to operate on encrypted handles, adding, comparing, selecting, as if they were ordinary numbers. Each operation deterministically derives a new result handle and is recorded onchain; the CoFHE server independently computes the matching ciphertext offchain. Nothing returns to the contract, and plaintext is never exposed at any point.
The smart contract uses [`FHE.sol`](/fhe-library/introduction/overview) to operate on encrypted handles, adding, comparing, selecting, as if they were ordinary numbers. Each operation deterministically derives a new result handle and is recorded onchain. The compute pipeline picks up that record, and the FHE Engine computes the matching ciphertext offchain. Nothing returns to the contract, and plaintext is never exposed at any point.
</Step>

<Step title="Decrypt (optional, gated by ACPs)">
When an authorized user wants a result, they present a signed [Access Control Permission](/client-sdk/guides/acps). The Threshold Network decrypts via multi-party computation, either re-encrypting the value so only that user can read it (for display), or returning a verifiable plaintext with a signature (for onchain use).
When an authorized user wants a result, they present a signed [Access Control Permission](/client-sdk/guides/acps). Teecryptor checks that permission against the onchain access list, then decrypts inside its enclave. It either seals the value so only that user can read it (for display), or returns a signed plaintext a contract can verify (for onchain use).
</Step>

</Steps>
Expand All @@ -64,7 +64,7 @@ sequenceDiagram
Note over Contract,CoFHE: Compute
Contract->>Contract: FHE.add / FHE.lt / FHE.select ...
Contract->>Contract: derive result handle (deterministic)
Note over Contract,CoFHE: operation emitted onchain nothing returns to the contract
Note over Contract,CoFHE: operation emitted onchain, nothing returns to the contract
CoFHE->>CoFHE: pick up operation, compute ciphertext for the same handle

Note over User,CoFHE: Decrypt
Expand All @@ -89,7 +89,7 @@ Developers only interact directly with **two** parts of CoFHE; the rest runs beh

| Component | Role |
| --- | --- |
| **Task Manager** | Onchain gateway that validates FHE requests and enforces access control |
| **TaskManager** | Onchain gateway that validates FHE requests and enforces access control |
| **FHE Engine** | Picks up onchain task events, validates and orders them, executes the FHE operations on encrypted data, and commits results |
| **Teecryptor** | Decrypts inside a hardware-attested TEE, after checking permissions and commitments |
| **Registries** | Track ciphertexts and record result commitments so integrity can be verified before any decryption |
Expand All @@ -100,8 +100,8 @@ For a component-by-component breakdown, see the [CoFHE Architecture deep dive](/

- **Encrypted end-to-end**: values are encrypted client-side and stay encrypted through computation; only handles touch the chain.
- **Verified inputs**: zero-knowledge proofs ensure every encrypted input is well-formed before it enters the system.
- **Verified results**: the coprocessor commits to each result onchain, and the Threshold Network checks integrity before it will decrypt anything.
- **No single point of trust for decryption**: decryption requires the Threshold Network's multi-party computation, gated by signed ACPs.
- **Verified results**: the coprocessor commits to each result onchain, and Teecryptor checks the ciphertext against that commitment before it decrypts anything.
- **Gated decryption**: nothing is decrypted without a signed ACP and a matching onchain grant. Teecryptor fails closed when either is missing.

## Next steps

Expand Down
Loading