Skip to main content

Module node_identity

Module node_identity 

Source
Expand description

Node identity provider — native key management with HKDF purpose derivation.

Wraps a root Ed25519 signing key and derives purpose-keyed identities via HKDF. The root key comes from identity_store.rs (file-based) or OS keyring.

HKDF derivation: HKDF-SHA256(ikm=root_seed, info=purpose_bytes) → 32-byte Ed25519 seed. Same purpose always produces the same keypair from the same root.

Derived pubkeys are tracked automatically — resolve() recognizes both the root node pubkey and any purpose-derived pubkeys opened via identity_open().

Structs§

NodeIdentityProvider
Native identity provider backed by a root Ed25519 key.

Constants§

MESH_KEM_PURPOSE
HKDF purpose-label namespace for the node’s #mesh-kem hybrid keyAgreement identity (S1 / #552). Distinct from the Ed25519, JWT, and MESH_MLDSA_PURPOSE labels so the KEM identity is key-separated (PQUIP key separation). Each suite component derives an independent seed under a per-component sub-label "<MESH_KEM_PURPOSE>/<kem>".
MESH_MLDSA_PURPOSE
HKDF purpose label for the mesh ML-DSA-65 signing key (#157).

Functions§

derive_mesh_kem_recipient
Deterministically derive the node’s #mesh-kem hybrid-KEM recipient keypair (S1 / #552) from its persisted Ed25519 root key — the confidentiality-side parallel of derive_mesh_mldsa_key.
derive_mesh_mldsa_key
Deterministically derive the node’s mesh ML-DSA-65 signing key from its persisted Ed25519 root/signing key (#157).
derive_purpose_key
Derive a purpose-keyed Ed25519 signing key from a root key.
mesh_host_subject
Build the per-host mesh-peer subject for an enrolled host label (#328).