Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

UseAlgorithms
Passkey signaturesES256, Ed25519, RS256 (COSE -7, -8, -257)
DPoP and device signaturesES256, Ed25519
ID tokens of other providers, client assertionsES256, Ed25519, RS256
ID tokens of this providerES256, or RS256 if the application adds an RSA key
Hash of tokens at restSHA-256 over 256 bits of entropy
DerivationHKDF-SHA256
MACHMAC-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

ValueUpper limit †
Ceremony5 minutes
First-party access token15 minutes
Browser session1 day idle, 7 days absolute
Native or CLI session, key-bound90 days idle
Connected-app access token1 hour
Connected-app refresh token90 days idle, one use
Invite7 days
Device code15 minutes
Fresh login15 minutes

An application MAY set shorter values. It cannot set longer ones.