Skip to main content

Module kdf

Module kdf 

Source
Expand description

HKDF-SHA256 derivation for domain-separated subkeys (S9 x Q39).

One root (the node key material) fans out into purpose-scoped subkeys; subkeys never cross-derive. The info strings are versioned and ruled in docs/Q39_CRYPTO_ERASURE_DESIGN.md §2 and docs/S9_SECURITY_BRIEF_2026-09-10.md §2.1 — do not invent new strings without updating both.

Constants§

GALAXY_DEK_INFO_PREFIX
Galaxy DEK-wrap KEK info-string prefix (wm/galaxy-dek/v1, Q39 §2/§3).
MESH_IDENTITY_INFO
Mesh node identity subkey (wm/mesh-identity/v1).
RECORD_ATTESTATION_INFO
Record-attestation signer subkey (wm/record-attestation/v1).
RELEASE_SIGNING_INFO
Release-artifact signing subkey (wm/release-signing/v1) — reserved, not yet wired.

Functions§

expand
HKDF-SHA256 expand into a caller-provided buffer (for non-32-byte outputs).
galaxy_dek_info
Info string (and AEAD AAD) binding a galaxy DEK wrap to its galaxy: wm/galaxy-dek/v1/<galaxy-db-name>.
hkdf32
HKDF-SHA256: derive 32 bytes from root material with a versioned info string.
root_bytes
Canonical root material from an environment/config value (S9 §2.1).