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

# Remote attestation

> Verify that 0xkey enclave apps run on genuine AWS Nitro hardware with the expected measurements.

Remote attestation lets a remote verifier cryptographically check that an enclave
is a genuine AWS Nitro TEE and that its platform measurements (PCRs) and related
fields are intact.

## What you can verify

| Surface | API | Client helper | Proves |
| - | - | - | - |
| **Attestation document** | [`get_attestation`](https://docs.0xkey.io/api-reference/queries/get-attestation-document) | `verifyAttestationDocument` (`@0xkey-io/crypto`) | Nitro COSE Sign1 + cert chain to AWS Root CA; readable PCRs / `user_data` / ephemeral key |
| **Boot proof** | [`get_latest_boot_proof`](https://docs.0xkey.io/api-reference/queries/get-the-latest-boot-proof-for-an-app) | `verifyBootProof` / `verifyLatestBootProof` | Attestation **plus** quorum manifest / approvals (pivot binding) |
| **App proof** | [`get_app_proofs`](https://docs.0xkey.io/api-reference/queries/list-app-proofs-for-an-activity) | `verify` / app-proof helpers | Per-activity enclave attestation of app data |

For “is this real Nitro hardware?” use **attestation document**.\
For “is it running the pivot we approved?” use **boot proof**.

## How `get_attestation` works

Coordinator serves a raw AWS Nitro attestation document (COSE Sign1):

1. Short in-process cache (60s) per enclave app
2. Fresh NSM fetch via `qos_host` (live)
3. On live success: upsert the matching boot proof (keeps boot-proof queries consistent)
4. On live failure: latest stored `awsAttestationDocB64`
5. Never returns an empty success — typed errors instead

Accepted `enclaveType` values (case-insensitive): `signer`, `notarizer`,
`tls-fetcher` / `fetcher`, `evm-parser` / `transaction-parser` / `parser`,
`ump` / `policy-engine` / `policy` (Turnkey `ump` maps to 0xkey `policy-engine`).

See the full request/response contract on
[Get attestation document](https://docs.0xkey.io/api-reference/queries/get-attestation-document).

## Example

```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { ZeroXKey } from "@0xkey-io/sdk-server";
import { verifyAttestationDocument } from "@0xkey-io/crypto";

const client = new ZeroXKey({
  apiBaseUrl: "https://api.0xkey.io",
  apiPublicKey: process.env.API_PUBLIC_KEY,
  apiPrivateKey: process.env.API_PRIVATE_KEY,
  defaultOrganizationId: process.env.ORGANIZATION_ID,
});

const { attestationDocument } = await client.apiClient().getAttestationDocument({
  organizationId: process.env.ORGANIZATION_ID,
  enclaveType: "signer",
});

const bytes = Uint8Array.from(
  Buffer.from(attestationDocument, "base64"),
);
await verifyAttestationDocument(bytes);
```

## Trust chain (simplified)

```
AWS Nitro Root CA
  └── intermediate CA bundle (in attestation)
        └── enclave leaf cert
              └── COSE_Sign1 over attestation payload
                    ├── PCRs (image / kernel / …)
                    ├── user_data (QOS manifest digest)
                    └── public_key (ephemeral key for share posting)
```

## Related

* API: [Get attestation document](https://docs.0xkey.io/api-reference/queries/get-attestation-document)
* Roadmap status: [Roadmap](https://docs.0xkey.io/0xkey/roadmap.md) (attestation + boot/app proofs marked Supported)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.