> ## Documentation Index
> Fetch the complete documentation index at: https://cofhe-docs.fhenix.zone/llms.txt
> Use this file to discover all available pages before exploring further.

# Decryption Request Flow

> Complete flow of a decryption request in the CoFHE ecosystem through smart contracts

# Decryption Request Flow

The process of requesting decryption through Smart Contracts starts the same as every other [FHE Operation Request](/deep-dive/data-flows/fhe-operation-request-flow) 📌steps 1-4

Here we'll continue from FheOS server handling such request as follows:

## Flow Diagram

The following diagram illustrates the complete flow of an FHE Decryption request in the CoFHE ecosystem:

<Frame>
  <img src="https://mintcdn.com/fhenix/QsDx0SV0x2gd-xtZ/images/Decryption%20Transactions.svg?fit=max&auto=format&n=QsDx0SV0x2gd-xtZ&q=85&s=81277fe8b30b325b010ed18b9e1d14ed" alt="End-to-end flow of an FHE Decryption request through the CoFHE system components" width="2695" height="1305" data-path="images/Decryption Transactions.svg" />
</Frame>

*Figure 1: End-to-end flow of an FHE Decryption request through the CoFHE system components*

## Step-by-Step Flow

<Steps>
  <Step title="Steps 1-4 - FHE Operation Request">
    The decryption request follows the same initial steps as a standard FHE operation request:

    1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣

    Refer to [FHE Operation Request Flow](/deep-dive/data-flows/fhe-operation-request-flow) for details on steps 1-4, which include:

    * Integration with the Client SDK
    * Requesting an FHE Operation
    * Task Manager Processing
    * Slim Listener Processing
  </Step>

  <Step title="FheOS server - Decryption Execution">
    The FheOS server handles decryption requests:

    1. **Create execution thread** on the fheOS server

    2. **FheOS server calls the threshold network** with:
       * The ciphertext to be decrypted
       * Transaction hash from the host chain
       * Original operation handle
  </Step>

  <Step title="Threshold network security protocol">
    The Threshold Network performs secure decryption:

    * Verify the host chain requested the desired decryption
    * Retrieve the actual ciphertext hash from private storage
    * Validate ciphertext hash integrity
    * Perform secure decryption
  </Step>

  <Step title="Result Delivery">
    After decryption is complete: 7️⃣

    * The Threshold Network returns the plaintext along with an **ECDSA signature** to the client (via the Client SDK)
    * The client (or any relayer) calls `FHE.publishDecryptResult(ctHash, result, signature)` or `FHE.verifyDecryptResult(ctHash, result, signature)` on-chain
    * The on-chain contract verifies the signature before accepting the result

    <Note>
      This enables permissionless result delivery — anyone holding a valid signature can publish. This is useful for client-driven settlement or relayer patterns.
    </Note>
  </Step>
</Steps>
