Skip to main content

Module vault

Module vault 

Source
Expand description

Protected local vaults (E16.2).

Keys are stored as KeyRef (slot + generation), never as exported raw key bytes on this path. A digest in a slot is a handle, not a secret dump.

§What this module cannot enforce (E16.7)

Remote wipe and attestation cannot guarantee safety after endpoint compromise or seizure. An unlocked or coerced device can disclose accessible plaintext. Crash dumps must omit key material (crash_dump_redacted is true when crash_dump_allowed is false). Hardware-backed references are reported only when a real token exists; this Linux CI path does not fake a TPM.

Structs§

KeyRef
Slot + generation handle. Not raw key bytes.
LocalVault
SealedProfileBlob
Catalog profile sealed under a wrap key. Ciphertext is not a key dump.
VaultSlot

Constants§

NOTIFICATION_PREVIEW_MAX_BYTES
Maximum notification preview size. Not a full payload.
SEALED_PROFILE_PLAIN_LEN
profile_u8 + control_count + catalog digest.
VAULT_SLOTS

Functions§

crash_dump_redacted
True when dumps must not include key material (crash_dump_allowed is false).
hardware_key_ref_supported
Hardware-backed KeyRef support. Presence of /dev/tpm0 is not enough: this crate has no TPM token binding and must not fake one.
load_key_ref
Loads key_ref; error when absent/invalid.
load_ref
Load the stored digest. Denied if the vault/slot is locked; Expired if now is at or past the slot deadline. Generation mismatch is stale.
lock
Irreversible local lock. There is no unlock / backdoor API.
notification_preview_max_bytes
notification-preview-max size in bytes.
open_profile_blob
Open a sealed catalog profile. Wrong key is CryptoFailure (fail closed).
require_hardware_backed_p4
P4-with-hardware-token requirement. Unsupported hardware is unavailable, never a silent software downgrade.
seal_profile_blob
Seal a catalog profile. Locked vaults fail closed. Zero keys are Malformed.
store_ref
Store a key reference digest. Raw secret bytes are not accepted here.