Skip to content

vox-identity API Reference (generated)

Crate: vox-identity · Version: 0.6.0 · Target: Library (lib.rs)

Identity primitives: signing keys, trust ledger entries.

Vox identity: per-user keypair, signing challenges, trust ledger.

DependencyKind
vox-cryptoNormal
ModuleDescription
challenge—
ephemeralPer-job ephemeral Ed25519 subkey for result attestation (P5-T6).
identity—
pairing_x25519Per-pairing X25519 key derivation for JWE encryption (P5-T10).
storage—
trust—
Dependency Topology, diagram 17 nodes, 6 edges: vox-identity → vox-crypto; vox-cli → vox-identity; vox-cli-research → vox-identity; vox-gui → vox-identity; vox-plugin-populi-mesh → vox-identity; vox-populi → vox-identityvox-identityvox-cryptovox-clivox-cli-researchvox-guivox-plugin-populi-meshvox-populi
Diagram source
graph {
direction: right
node vox_identity: "vox-identity"
node vox_crypto: "vox-crypto"
vox_identity -> vox_crypto
node vox_cli: "vox-cli"
vox_cli -> vox_identity
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_identity
node vox_gui: "vox-gui"
vox_gui -> vox_identity
node vox_plugin_populi_mesh: "vox-plugin-populi-mesh"
vox_plugin_populi_mesh -> vox_identity
node vox_populi: "vox-populi"
vox_populi -> vox_identity
}
Consumer CrateRole
vox-cliDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-guiDirect workspace dependent
vox-plugin-populi-meshDirect workspace dependent
vox-populiDirect workspace dependent
KindSymbolSignatureSourceDescription
fnchallenge::generate_challengepub fn generate_challenge() -> [u8; 32]crates/vox-identity/src/challenge.rs#L4-L8—
fnchallenge::verify_challenge_responsepub fn verify_challenge_response(crates/vox-identity/src/challenge.rs#L10—
structephemeral::EphemeralSignerpub struct EphemeralSignercrates/vox-identity/src/ephemeral.rs#L12-L16A short-lived Ed25519 keypair generated once per submitted job. The public key is embedded in the signed Attestation envelope so verifiers can check the result signature without trusting a long-lived node key.
fnephemeral::newpub fn new() -> Selfcrates/vox-identity/src/ephemeral.rs#L20-L24Generate a fresh ephemeral signing keypair.
fnephemeral::signpub fn sign(&self, msg: &[u8]) -> [u8; 64]crates/vox-identity/src/ephemeral.rs#L27-L29Sign msg and return the raw 64-byte Ed25519 signature.
fnephemeral::verifying_keypub fn verifying_key(&self) -> VerifyingKeycrates/vox-identity/src/ephemeral.rs#L32-L34Return the corresponding verifying key for this ephemeral keypair.
structidentity::NodeIdentitypub struct NodeIdentitycrates/vox-identity/src/identity.rs#L5-L9—
fnidentity::generatepub fn generate() -> Selfcrates/vox-identity/src/identity.rs#L20-L31—
fnidentity::from_keyspub fn from_keys(signing_key: SigningKey, verifying_key: VerifyingKey) -> Selfcrates/vox-identity/src/identity.rs#L33-L43—
fnidentity::node_idpub fn node_id(&self) -> &strcrates/vox-identity/src/identity.rs#L45-L47—
fnidentity::signing_keypub fn signing_key(&self) -> &SigningKeycrates/vox-identity/src/identity.rs#L49-L51—
fnidentity::sign_challengepub fn sign_challenge(&self, nonce: &[u8]) -> [u8; 64]crates/vox-identity/src/identity.rs#L53-L55—
fnidentity::pubkey_hexpub fn pubkey_hex(&self) -> Stringcrates/vox-identity/src/identity.rs#L58-L60Full hex-encoded Ed25519 public key (32 bytes → 64 hex chars).
fnidentity::fingerprintpub fn fingerprint(&self) -> Stringcrates/vox-identity/src/identity.rs#L64-L83Short, human-readable fingerprint of the public key, e.g. ed25519:7f:42:9b…2a:11 — head 3 + tail 2 bytes of the hex pubkey.
structpairing_x25519::PairingKeypub struct PairingKeycrates/vox-identity/src/pairing_x25519.rs#L13-L17A per-pairing X25519 keypair for ECDH-based JWE key derivation.
fnpairing_x25519::generatepub fn generate() -> Selfcrates/vox-identity/src/pairing_x25519.rs#L21-L25Generate a fresh random X25519 keypair for a new pairing.
fnpairing_x25519::from_bytespub fn from_bytes(sk_bytes: [u8; 32], pubkey_bytes: [u8; 32]) -> Selfcrates/vox-identity/src/pairing_x25519.rs#L30-L35Reconstruct a PairingKey from stored secret-key bytes. The caller is responsible for keeping sk_bytes secret.
fnpairing_x25519::shared_secretpub fn shared_secret(&self, their_pubkey: &[u8; 32]) -> [u8; 32]crates/vox-identity/src/pairing_x25519.rs#L41-L46Derive the 32-byte shared secret via X25519 ECDH with their_pubkey. Both parties compute the same secret when each uses their own private key and the other’s public key.
fnstorage::identity_key_pathpub fn identity_key_path() -> PathBufcrates/vox-identity/src/storage.rs#L9-L14—
fnstorage::save_identitypub fn save_identity(identity: &NodeIdentity, password: &str) -> Result<()>crates/vox-identity/src/storage.rs#L25-L27—
fnstorage::save_identity_atpub fn save_identity_at(crates/vox-identity/src/storage.rs#L31Encrypt and persist identity to an explicit path. Path-parameterized so callers (and tests) can target a location other than ~/.vox/identity.key.enc.
fnstorage::load_identitypub fn load_identity(password: &str) -> Result<NodeIdentity>crates/vox-identity/src/storage.rs#L75-L77—
fnstorage::load_identity_atpub fn load_identity_at(password: &str, path: &std::path::Path) -> Result<NodeIdentity>crates/vox-identity/src/storage.rs#L80-L112Decrypt and load an identity from an explicit path.
fnstorage::identity_existspub fn identity_exists() -> boolcrates/vox-identity/src/storage.rs#L115-L117Whether a local node identity exists on disk.
fnstorage::rotate_identitypub fn rotate_identity(password: &str) -> Result<NodeIdentity>crates/vox-identity/src/storage.rs#L125-L127Rotate the local node identity: verify password unlocks the existing file (when present), generate a fresh Ed25519 keypair, and re-encrypt it under the SAME password at the canonical path. Returns the new identity. Rotation requires the master password by design — the signing key is only ever stored Argon2-encrypted, so there is no passwordless rotation path.
fnstorage::rotate_identity_atpub fn rotate_identity_at(password: &str, path: &std::path::Path) -> Result<NodeIdentity>crates/vox-identity/src/storage.rs#L130-L144Path-parameterized rotation (see [rotate_identity]). Hermetic for tests.
structtrust::TrustedNodepub struct TrustedNodecrates/vox-identity/src/trust.rs#L8-L13—
fntrust::node_idpub fn node_id(&self) -> &strcrates/vox-identity/src/trust.rs#L16-L18—
structtrust::TrustedNodeRegistrypub struct TrustedNodeRegistrycrates/vox-identity/src/trust.rs#L27-L30Registry of Ed25519-pubkey-to-node-id trust bindings. Two modes: - File-backed (new()): persists to ~/.vox/trusted_nodes.json. - In-memory (default() / new_in_memory()): no disk I/O; suitable for tests and for the P5-T1b verifier path that receives nodes via A2A handshake.
fntrust::newpub fn new() -> Selfcrates/vox-identity/src/trust.rs#L34-L42File-backed registry rooted at ~/.vox/trusted_nodes.json.
fntrust::atpub fn at(path: PathBuf) -> Selfcrates/vox-identity/src/trust.rs#L45-L50File-backed registry rooted at an explicit path (tests, alternate roots).
fntrust::new_in_memorypub fn new_in_memory() -> Selfcrates/vox-identity/src/trust.rs#L56-L61Pure in-memory registry — no disk I/O. Note: add and remove are no-ops here (nothing is persisted); use upsert to populate one, or at if you need writes to be readable back.
fntrust::addpub fn add(&self, node_id: String, pubkey_hex: String, label: Option<String>) -> Result<()>crates/vox-identity/src/trust.rs#L92-L105Add or update a node. For file-backed registries this persists to disk.
fntrust::upsertpub fn upsert(&mut self, node_id: &str, pubkey_hex: &str)crates/vox-identity/src/trust.rs#L108-L119In-place upsert for in-memory registries (and tests). Does not persist.
fntrust::lookup_by_pubkey_hexpub fn lookup_by_pubkey_hex(&self, pubkey_hex: &str) -> Option<TrustedNode>crates/vox-identity/src/trust.rs#L126-L137Look up a trusted node by its Ed25519 pubkey hex. Searches in-memory cache first, then the file-backed store (if any). An empty pubkey_hex never matches — otherwise a stored row with a blank key would authenticate any keyless caller.
fntrust::removepub fn remove(&self, node_id: &str) -> Result<bool>crates/vox-identity/src/trust.rs#L139-L146—
fntrust::is_trustedpub fn is_trusted(&self, node_id: &str) -> Result<bool>crates/vox-identity/src/trust.rs#L148-L154—
fntrust::listpub fn list(&self) -> Result<Vec<TrustedNode>>crates/vox-identity/src/trust.rs#L156-L161—