Expand description
L8 identity: one ed25519 key per actor, signatures over op entries (DECISIONS.md D13, key-per-agent).
An actor’s id is the self-describing ContentHash of its public
key, so ids survive a future signature-scheme change the same way
content addresses survive a hash change (D6). The signature covers
choir_oplog::OpEntry::signing_hash — the entry with the signature
field blanked — and lands in the entry’s additive author_sig field,
so pre-L8 logs remain valid and verification is opt-in per deployment
until the daemon leaves localhost.
Trust policy (who may touch which workspace/ref) is a later layer; this crate only answers “is this entry really from that key”.
§Examples
use choir_identity::{ActorKey, Registry};
use choir_oplog::{OpEntry, FORMAT_VERSION};
let key = ActorKey::generate();
let mut registry = Registry::new();
registry.register(&key.public_key_bytes()).unwrap();
let mut entry = OpEntry {
format_version: FORMAT_VERSION,
parent: None,
seq: 0,
channel: "agent-1".into(),
payload: b"op".to_vec(),
witnesses: Vec::new(),
author_sig: None,
};
key.sign_entry(&mut entry);
assert_eq!(registry.verify_entry(&entry).unwrap(), key.actor_id());§Where this sits
docs/architecture.md is the map of the whole workspace.
This crate is L8, one ed25519 key per actor and the signatures over log entries.
It builds on choir_hash and choir_oplog.
Structs§
- Actor
Key - An actor’s signing keypair.
- Registry
- Known public keys, indexed by actor id. This is the verification side’s whole world: an unregistered key is an unknown author.
Enums§
- Identity
Error - Failure modes of signing and verification.
Constants§
- P256_
SPKI_ PREFIX - Prefix that turns a raw P-256 point into SubjectPublicKeyInfo DER.
Functions§
- p256_
point_ to_ spki - Wraps a raw uncompressed P-256 point as SubjectPublicKeyInfo DER.
- verify_
carried_ webauthn - Verifies a WebAuthn assertion against the credential key the signature carries (D45), for a reader holding no credential store.
- verify_
es256 - Verifies an ECDSA-P-256/SHA-256 signature, the scheme WebAuthn calls ES256 (COSE algorithm -7).
- verify_
webauthn_ assertion - Verifies a WebAuthn assertion and that it attests to
signing(D39). - webauthn_
challenge - The challenge bytes a browser must be given so that the assertion it returns attests to this submission (D39).