> For the complete documentation index, see [llms.txt](https://docs.zama.org/protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zama.org/protocol/sdk/concepts/trust-boundary.md).

# Daemon trust model

Understand signing authority and credential access in Go and Rust daemon deployments.

The daemon is a trusted part of your application. It receives plaintext encryption inputs, decrypts outputs, and uses transport private keys, even when credentials live in application-owned storage.

## Signing authority

The wallet private key stays in your Go or Rust application, or its external signing service. The daemon sends signing requests to your application over the SDK context's signer channel. Your application decides whether to sign and returns a signature or an error.

{% hint style="danger" %}
**Your application must validate every typed-data request before signing it.** Check the domain name and version, `chainId`, `verifyingContract`, the expected signer, and `primaryType` against your own configuration. With that check in place, a compromised daemon cannot obtain a signature your application did not approve. Without it, your wallet signs whatever the daemon sends.

The built-in adapters (Go `NewEthereumSigner` and `NewPrivateKeySigner`, Rust `AlloySigner`) do not validate typed data. They check only the requested account and chain. Apply the same rule to contract writes: allow only the destinations and functions the SDK calls. [Validate signing requests](https://docs.zama.org/protocol/sdk/go-and-rust-guide/guides/attach-wallet.md#validate-signing-requests) lists the values to check.
{% endhint %}

A signed decryption permit authorizes the transport public key in its payload. The SDK creates and stores the corresponding private key. Keeping the wallet private key outside the daemon does not remove the daemon's access to decryption credentials or plaintext.

Delegation grant and revoke operations can broadcast transactions through your application's signer. Offline preparation returns transaction data for your application to sign and submit separately. Deleting local credentials does not invalidate previously issued signatures or revoke on-chain delegation.

## Socket access

{% hint style="warning" %}
Serve one trust domain per daemon. Every process with socket access can create SDK contexts and call credential-management operations. SDK contexts are not an authorization boundary.
{% endhint %}

The socket directory must belong to the daemon's UID and exclude group and other access. The application runs as that same UID. There is no TCP listener, application authentication, or per-context access control.

Processes with the same UID, host administrators, and operators with container control are outside this isolation boundary.

## Stored credentials

Treat credential stores and backups as sensitive material. The daemon does not add at-rest encryption to SQLite or the credential bytes sent to application-owned storage.

The SDK can protect stored transport keys using a derivation secret supplied by your application. Keep the required secret available when recreating SDK contexts. The daemon never stores the secret with the credentials, but it holds the secret in process memory while the SDK context is open. Set it up in [Configuration](https://docs.zama.org/protocol/sdk/guides/configuration.md).

Named SQLite stores require a local filesystem with reliable locking and a private volume per daemon. Application-owned storage can be shared across replicas, but credential coordination does not span daemons. Concurrent credential changes can race.

## Logs and diagnostics

The daemon emits SDK warning and error messages as plain text without their attached data objects. It does not log request payloads, signatures, keys, or balances. Your application controls its own logs; avoid logging plaintext, credentials, signing payloads, and secrets.

Apply these boundaries when you [deploy the daemon in production](https://docs.zama.org/protocol/sdk/go-and-rust-guide/operations/run-in-production.md).


---

# 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 by asking a question.

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

```
GET https://docs.zama.org/protocol/sdk/concepts/trust-boundary.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 `automate deployments from our CI pipeline` 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.
