> For the complete documentation index, see [llms.txt](https://docs.arcan.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arcan.finance/solidity/decryption.md).

# Decryption

Decryption is separate from the transfer. The coprocessor can add two ciphertexts without anyone learning the sum. Opening the sum is a later request, and only if the access list allows it.

There are two ways to open a handle.

## User decrypt

The account named on the handle asks the Arcan SDK to decrypt. The SDK sends the handle, the user, and the contract. The result comes back to that user. An explorer, a node, or another wallet does not receive it.

Use this for balances, salaries, and position size.

## Public decrypt

The contract first calls `FHE.makePubliclyDecryptable`. Anyone can then request the plaintext through the SDK. The cleartext can be submitted back on-chain with a decryption proof. `FHE.checkSignatures` checks that the proof matches the handle. The order of handles in the list must match the order used off-chain.

Use this for a value that is supposed to become public. Do not use it for a confidential balance.

`FHE.isPubliclyDecryptable` reads the flag. `FHE.isPublicDecryptionResultValid` is the read-only check. Prefer `checkSignatures` when the contract accepts the cleartext, and guard the call so the same proof cannot be applied twice.

## What the chain learns

A user decrypt does not write the number into Robinhood. A public decrypt writes the cleartext only if your contract submits it. Until then, the chain still holds a handle.

## Rights

`FHE.isUserDecryptable` is true only when both the user and the contract have persistent access to the handle. A transient grant is not enough to open the value after the transaction.

See [Opening a handle](/protocol/keys.md) for the service that performs the opening, and the [SDK decrypt guide](/sdk/decrypt.md) for the app code.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arcan.finance/solidity/decryption.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
