Skip to main content

derive_mesh_kem_recipient

Function derive_mesh_kem_recipient 

Source
pub fn derive_mesh_kem_recipient(
    ed25519_key: &SigningKey,
) -> Result<RecipientKeypair>
Expand description

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.

Each suite component gets an independent HKDF-derived seed under a distinct per-component sub-label ("<MESH_KEM_PURPOSE>/<kem>"), so the X25519 and ML-KEM-768 legs are independent of each other and key-separated from the Ed25519 identity and the #mesh-mldsa key. Stable across restarts (no key file). The published crate::crypto::hybrid_kem::RecipientPublic is what peers anchor in their crate::crypto::hybrid_kem::KemTrustStore (resolved from the DID keyAgreement set).