00 Conventions
Encodings
- Time is an integer: seconds since the Unix epoch. There are no leap seconds.
- Binary values in JSON and URLs are base64url without padding. A decoder MUST reject padding, other characters and non-zero trailing bits.
- JSON that is signed, hashed or compared is canonical (RFC 8785). A parser MUST reject duplicate members.
- A parser MUST reject trailing data. Each format has a maximum size, and a parser checks it first.
- Random values have at least 128 bits. Tokens and challenges have 256 bits.
Profile AC1
A profile is a fixed set. A deployment runs one profile. There is no negotiation inside a profile.
| Use | Algorithms |
|---|---|
| Passkey signatures | ES256, Ed25519, RS256 (COSE -7, -8, -257) |
| DPoP and device signatures | ES256, Ed25519 |
| ID tokens of other providers, client assertions | ES256, Ed25519, RS256 |
| ID tokens of this provider | ES256, or RS256 if the application adds an RSA key |
| Hash of tokens at rest | SHA-256 over 256 bits of entropy |
| Derivation | HKDF-SHA256 |
| MAC | HMAC-SHA256 |
Encryption (e2ee) | XChaCha20-Poly1305; HPKE X25519, HKDF-SHA256, ChaCha20-Poly1305 |
The key fixes the algorithm. A verifier MUST NOT take the algorithm from a message: it compares the message’s alg
with the key’s and rejects a difference. alg: none and symmetric alg values are always rejected.
ECDSA: keys are uncompressed P-256 points on the curve. Ed25519: verification is strict, and small-order keys are rejected. RSA: 2048 to 4096 bits, exponent 65537, PKCS #1 v1.5 with SHA-256. Only passkeys and other parties use RSA: this profile never makes an RSA key for a user, a device or a session.
Labels
Every derivation, MAC and signature has a label <namespace>/<purpose>. The application sets the namespace once, for
example example/v1. Two purposes never share a label.
input(label, parts…) = label || for each part: u32_be(len) || part
Server keys
The server holds one 32-byte master key. Nonce, ceremony and cookie keys are derived from it. Provider signing keys are
separate, have a kid, and rotate with an overlap that is longer than the longest token.
Errors
A refusal has a stable code. The text for a person is the application’s. Two refusals that would let a caller learn if an account exists MUST have the same code, the same shape and comparable work.
Upper limits
| Value | Upper limit † |
|---|---|
| Ceremony | 5 minutes |
| First-party access token | 15 minutes |
| Browser session | 1 day idle, 7 days absolute |
| Native or CLI session, key-bound | 90 days idle |
| Connected-app access token | 1 hour |
| Connected-app refresh token | 90 days idle, one use |
| Invite | 7 days |
| Device code | 15 minutes |
| Fresh login | 15 minutes |
An application MAY set shorter values. It cannot set longer ones.