An agent asks for its card. CRDCA checks that the card belongs to whoever publishes it, records it in a public log and signs it. After that, any verifier looks at the card and decides without calling CRDCA.

[[cadena]]

## 1. The SDK asks

You install the client and call `enroll` with the URL of your AgentCard:

```bash
pip install crdca
crdca enroll --card-url https://your-domain/.well-known/agent-card.json --nueva-clave
```

The SDK creates the agent key, or takes one from the KMS you point it to. It opens an ACME account with that key and requests an order with the `agentcard` profile. The other v1 profile is `delegator`: it is requested by a platform that certifies its customers' agents under its own namespace.

A certificate lasts at most 7 days. The SDK renews it at half life using the window ARI publishes, and issues one instance credential per replica: a 24-hour JWT, not a fourth X.509 level. The four client commands are `enroll`, `sign`, `renew` and `instance`, in the CLI and in the Python and TypeScript SDKs.

## 2. ACME validates a real challenge

CRDCA does not accept a card because the URL exists. It gives you a token and waits for you to prove that you control the name you are requesting. card-01 covers the card and dns-01 the domain of a platform.

In card-01 you publish the key authorization inside a card extension:

```json
{
  "capabilities": { "extensions": [ {
    "uri": "https://crdca.org/ext/acme-challenge/v1",
    "params": { "keyAuthorization": "<token>.<account-fingerprint>" }
  } ] }
}
```

The validator downloads the card from the exact SAN URL, over `https` only. It does not follow a redirect to another origin; same-origin redirects, up to three hops. And it does not trust a single network: it requires three networks with three distinct ASNs, three responses before deciding and a majority of two acceptances. A `timeout` is not a response, and two responses from the same ASN count as one.

In dns-01 a platform proves control of the domain its sub-CA will constrain. It publishes a single `TXT` under `_crdca-delegation.<domain>` with the value `<token>.<account-fingerprint>`. A `CNAME` does not count: it proves control of someone else's domain. The quorum is the same as card-01, measured by network and by ASN.

v2 adds two more challenges: `a2a-01` proves the key in a signed A2A message and `dns-persist-01` requires a persistent `TXT` with a window. They are not challenges of a v1 order.

::: nota What the origin validator compares
One normalisation for the SAN and for the request URL: lowercase host, effective port and path. A `query`, a `fragment` or `userinfo` produce `R07_SAN_MISMATCH`; they are not ignored.
:::

## 3. Issuance records the leaf before signing

With the challenge validated, the issuer computes the certificate leaf: a SHA-256 over the SAN URI, the leaf SPKI and the serial, with each field's length in `uint32be` in front.

The leaf does not depend on the signature, so it is recorded before the certificate exists. The issuance machine has eight states and nine transitions, and no edge goes from a green linter to signing without passing through the log. If something fails later, the serial is burned; it is not reused. Delivery carries the inclusion proof in `crdca_inclusion`, inside the JWS protected header and outside the payload: inside it would lose the signature's protection.

## 4. The log publishes tiles and a signed checkpoint

The log is append-only and publishes three static, read-only routes:

- `GET https://cdn.crdca.org/log/checkpoint`: the signed checkpoint.
- `GET https://cdn.crdca.org/log/tiles/{level}/{n}`: one full tile of 256 leaves.
- `GET https://cdn.crdca.org/inclusion/{hash}`: the inclusion proof for a leaf.

The checkpoint has five fields: `tree_size`, `root_hash`, `timestamp`, `kid` and an Ed25519 `signature`. `tree_size` never decreases. Tiles are immutable and retention is indefinite: no leaf is deleted. Freshness is 240 seconds over a 300-second cadence; a checkpoint older than that window is rejected.

## 5. The status list is signed every 300 seconds

A single writer publishes one fragment per 300-second cycle. It carries `version`, `publicado_en`, `secciones`, `hash_anterior` and `hash`, and is signed with JWS EdDSA by two distinct keys and two distinct signers.

There are three sections: classes, platforms and operators. A bit set to `1` means suspended; a bit set to `0`, active. The CDN copy lives 60 seconds and the verifier accepts a maximum age of 240. If the publisher does not respond there is no fallback copy: the verifier rejects with `R12_STATUS_SUSPENDED`.

An emergency suspension is published through two routes. The routine route waits for the cycle: 300 plus 240 for delivery, 540 seconds in the worst case. The on-call route runs out of turn: 240 plus 240, 480 seconds. In GA the goal is for a suspension to take effect in less than 900 seconds.

## 6. The verifier decides in one call

The verifier does not call CRDCA. It keeps two pieces cached: the trust package, refreshed hourly and valid for at most 3600 seconds, and the status fragment. With those it runs nine steps and returns a decision with one code per rejection.

The steps cover the allowed algorithm and the recomputed `kid`, the JWS signature, the `x5c` chain up to a current root, leaf conformance, the SAN against the origin, validity, the inclusion proof, the status list and, if the action requires it, the mandate.

::: medido What is measured
The middleware runs in two modes: `warn` records without blocking and `block` stops at the first rejection. The GA target is a cached verification under 1 ms at the 99th percentile.
:::

## 7. The human mandate travels separately from the agent

When an action needs a person's authorisation, the human signs an SD-JWT mandate. The `cnf` field binds that mandate to the agent's public key. It travels in the `CRDCA-Mandate` header or in the A2A message metadata.

CRDCA does not issue mandates and none of its roots appears as an issuer. The same middleware verifies it: subject, key binding, expiry, limits and whether the issuer is on its allowlist. Limits are checked per request: there is no shared state that accumulates amounts across mandates.

## What it guarantees and what it does not

It guarantees four things:

- The card you present is the one CRDCA validated at that URL, with that name and that key.
- No certificate leaves without being in the log, and the inclusion proof verifies against the signed checkpoint.
- A suspended class, platform or operator shows up in the signed fragment, with its version and hash.
- The verifier's decision is reproducible: every rejection has one of the fourteen contract codes and a step.

It does not guarantee the agent's reputation, that the company behind it exists, or which skills it may invoke. That belongs to OAuth, to each verifier's policy and to third parties. It also does not put CRDCA in the path of a conversation: the card and the mandate travel directly between the parties.

::: limite What still depends on hardware or people
The root does not yet live in a FIPS 140-3 level 3 HSM, the ceremony has no five custodians and two witnesses, and there is no physical second region. The details are in [Limits](/en/limits).
:::
