passkey library

Classes

PasskeyHintStore
The hints a device keeps per atSign beside the sealed @keys: the credential id of the passkey that last unlocked them and the enrollment id of this device's enrollment.
PasskeyKeyDeriver
Derives a PasskeyDerivation from a passkey PRF output.
PasskeyPort
A WebAuthn ceremony pair: registering a passkey and asserting with one, the assertion evaluating the prf extension with one input.
PasskeyPrf
The passkey ceremonies that yield a PRF output.
PasskeyVault
The passkey-derived identity of one atSign on one device: the record id and pointer namespace, a sealer for its records, and the seed of its APKAM signing key.
PrfEnvironment
The platform facilities PrfSupport reads and writes: the platform's own answer on passkey PRF support, and a recorded PRF miss.
PrfSecret
The 32-byte PRF output of a passkey assertion.
PrfSupport
Whether this platform can evaluate passkey PRF.
RecordSealer
Seals and opens record bodies under a key the caller never sees.
SetupLock
A named mutual-exclusion lock shared by every instance of the application that can set up the same atSign on one device.
UnknownCredentialSignal
A PasskeyPort that can tell the platform a passkey it holds is no longer wanted.

Enums

PasskeyRecordType
What a per-passkey record holds; part of its authenticated header.

Constants

passkeyDisplayNameMaxBytes → const int
The most UTF-8 bytes a passkey's display name may hold.
prfMissTtl → const Duration
How long a recorded PRF miss is honoured.
prfUnsupportedMessage → const String
The message shown when passkey PRF is unavailable.
recordAuthSeedLabel → const String
HKDF info label for the seed of the enrollment's ML-DSA-65 APKAM signing key.
recordIdLabel → const String
HKDF info label for the record id. Every label has the form at_auth/custody/<name>/v1; the info is <label>|<canonical atSign>.
recordNsLabel → const String
HKDF info label for the pointer namespace.
recordSealLabel → const String
HKDF info label for the key that seals records.

Functions

passkeyDisplayName(DateTime enrolledAt, String deviceName) → String
The display name of a passkey registered at enrolledAt from the device deviceName: enrolledAt in UTC to the minute, then \u00b7 and deviceName, as 2026-11-06 14:05Z \u00b7 Alice Mac.
recordPrfSalt() → Uint8List
The PRF eval input for every passkey: SHA-256 of atsign:keys:lookup:v1.
setupLockName(String prefix, String canonicalAtSign) → String
The lock name guarding first setup of canonicalAtSign, under the caller's prefix: <prefix>:<canonicalAtSign>.

Typedefs

PasskeyAssertion = ({Uint8List credentialId, Uint8List? prfFirst})
A passkey assertion: its credential id and the PRF first result when the authenticator returned one.
PasskeyCreation = ({Uint8List credentialId, bool? prfEnabled})
A registered passkey: its credential id and what the create ceremony said about the prf extension: true when prf.enabled is true or prf.results.first is present, false when prf.enabled is false, null when the extension result is absent.
PasskeyDerivation = ({Uint8List authSeed, String lookupHex, String ns, RecordSealer sealer})
The record id, pointer namespace, auth seed and record sealer derived from one passkey PRF output.
PasskeyRegistration = ({Uint8List credentialId, PrfSecret secret})
A registered passkey and its PRF output. The caller wipes secret after use.
PasskeyUnlock = ({Uint8List credentialId, PrfSecret secret})
An asserted passkey and its PRF output. The caller wipes secret after use.

Exceptions / Errors

PasskeyCeremonyException
Thrown by a PasskeyPort when a ceremony yields no credential: cancelled, timed out, or no passkey matched.
PasskeyRecordAuthenticationException
Thrown when a passkey record fails AES-GCM authentication under the passkey's sealer.
PrfUnavailableException
Thrown when the authenticator does not support or return a valid PRF result.
UnsupportedPasskeyRecordException
Thrown when a passkey record is malformed or of an unknown version, algorithm or KDF.