Expand description
Cryptographic identity for Joy’s Trust Model.
Auth provides passphrase-derived Ed25519 identity keys using Argon2id for key derivation. This is the Trustship pillar of AI Governance: it answers “who is this?” with cryptographic proof rather than self-declaration.
Key hierarchy:
Passphrase + Salt --[Argon2id]--> DerivedKey --[Ed25519]--> KeypairCryptographic primitives (KDF, AEAD, Ed25519, key wrapping) live in
the joy-crypt crate (ADR-039 §“Crate boundary and dependency
direction”). This module owns the identity application layer:
sessions, tokens, OTPs, attestations, and the project.yaml schema.
Modules§
- attestation
- Per-member attestation signing and verification.
- delegation
- Per-(operator, AI) delegation key derivation.
- otp
- One-time password generation and verification for member onboarding.
- seed
- Wrapped-seed identity helpers (ADR-039).
- session
- Session management for authenticated Joy operations.
- token
- AI delegation tokens with dual signatures (ADR-023, refined by ADR-033 and ADR-041).
Structs§
- Derived
Key - 32-byte derived key material. Zeroed on drop.
- Identity
Keypair - Ed25519 signing keypair. Private key is zeroed on drop (handled by
ed25519-dalek’s internalZeroize). - Public
Key - Ed25519 verification key. Stored in project.yaml as hex.
- Salt
- Random 32-byte salt. Stored per-member in project.yaml as hex.
- Unlocked
Identity - Result of unlocking a member’s identity from a passphrase.
Constants§
- MIN_
PASSPHRASE_ WORDS - Minimum word count for a Joy passphrase. Diceware-style with Argon2id parameters Joy ships, three well-chosen words still give substantial brute-force resistance for the local-key-derivation threat model. See JOY-0171-50.
Functions§
- derive_
key - Derive 32 bytes of key material from a passphrase and salt using Argon2id.
- generate_
salt - Generate a random 32-byte salt.
- unlock_
identity - Verify a passphrase against a member entry and return the resulting
IdentityKeypairand seed. Handles both the wrapped-seed model (ADR-039) and the legacy model where the Argon2id-derived key is the Ed25519 seed. - validate_
passphrase - Validate that a passphrase has at least
MIN_PASSPHRASE_WORDSwhitespace-separated words.