[vault] Domi identity: the root key in the vault; v0.7.0 #9
Reference in New Issue
Block a user
Delete Branch "feature/domi-identity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Domi identity's root key in the vault (Fundamentum day 1). Version 0.7.0.
custos-vault::identity: a typestate for creating the identity (Enrollment::begin → show → confirm → import). The 24 words are shown once, three are typed back, then the root is imported and the entropy wiped. Importing before showing does not compile: there are threecompile_faildoctests, and I checked that each fails with E0599 "no method named …", not by accident.identity(root secret, public key, created, issued certs). Old vaults open as before.Vault::domi_root_public,domi_sign_cert(onlyTSC1 ‖ this root ‖ …, prefixed withtessera cert v1\0),domi_issued,domi_record,domi_created. Nothing returns the root secret.custos-wasm: adomi_pairop seals a phone's device public key and name to the waiting PC fordomi-pair:<id>.docs/IDENTITY.md(written first), plus a note indocs/FORMAT.md.Tests (release)
tests/identity.rs: 10. They cover the zero vector shared with Fundamentum (vCrwX9p4…), same mnemonic → same root, words shown before anything is imported, wrong words refused and retryable, one identity per vault, signing certs only, survival across save/open in v1 and v2, Debug redaction, and a locked public surface.compile_failorder traps.tests/factors.rs: +1 (a_phone_pairs_as_a_domi_device).Self-review: what could still be wrong
identitywhen it saves the vault, because readers ignore unknown members and do not round-trip them. I chose not to bump the vault version, since that would lock the phone's web vault out until the server is rebuilt. Every Custos that saves the vault must be ≥ 0.7.0, and the words recover the root anyway. This is documented in IDENTITY.md and FORMAT.md.tessera(for recovery and tests). A shared pinned vector guards against drift, but there are still two implementations.Enrollment::with_entropyis public, for vectors. Custos usesbegin(); nothing stops a careless caller from passing weak entropy.cargo fmtreflowed one older line inlib.rs.Not verified
domi_pairfor the browser.