Decryption Request Flow
The process of requesting decryption through Smart Contracts starts the same as every other FHE Operation Request 📌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:Step-by-Step Flow
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 for details on steps 1-4, which include:
- Integration with Cofhejs
- Requesting an FHE Operation
- Task Manager Processing
- Slim Listener Processing
FheOS server - Decryption Execution
The FheOS server handles decryption requests:
- Create execution thread on the fheOS server
-
FheOS server calls the threshold network with:
- The ciphertext to be decrypted
- Transaction hash from the host chain
- Original operation handle
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
FheOS Notifies the Result Processor with the decrypt result
After decryption is complete: 7️⃣
- Call appropriate callback function on the Result Processor
- The Result Processor publishes the result back to the TaskManager on the host chain