> For the complete documentation index, see [llms.txt](https://cifer.gitbook.io/cifer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cifer.gitbook.io/cifer-docs/documentation/cifer-sdk/architecture-and-security.md).

# Architecture and security

Cifer separates authorization, public-key discovery, and protected cryptographic execution.

## Core components

| Component             | Responsibility                                                                              |
| --------------------- | ------------------------------------------------------------------------------------------- |
| **SecretsController** | On-chain ownership, delegates, secret state, fees, and events                               |
| **Blackbox**          | Payload encryption/decryption, public-key access, and asynchronous file jobs                |
| **Enclave cluster**   | Threshold key generation and protected private-key shard handling                           |
| **IPFS**              | Distribution of secret public keys                                                          |
| **Cifer SDK**         | Discovery, signing, transaction construction, retries, encoding, and typed integration APIs |

## Hybrid encryption

Cifer combines ML-KEM-768 with AES-256-GCM. ML-KEM establishes the shared secret; AES-GCM encrypts the application payload efficiently.

```mermaid
flowchart LR
    P[Plaintext] --> A[AES-256-GCM]
    K[ML-KEM-768 public key] --> E[Encapsulation]
    E --> A
    A --> O[Encrypted message]
    E --> C[Cifer envelope]
```

## Security boundaries

* Cifer is **quantum-resistant**, not “quantum-proof.”
* Authorization and key custody are different concerns.
* Signed requests include freshness data to reduce replay risk.
* Private application secrets and identity keys must still be protected by the integrator.
* The SDK does not replace secure software delivery, endpoint security, or operational monitoring.
* Pin releases and test upgrades while the SDK remains beta.


---

# 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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cifer.gitbook.io/cifer-docs/documentation/cifer-sdk/architecture-and-security.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
