Implement memory protection for root key #6

Closed
opened 2026-02-14 11:34:29 +00:00 by Skipper · 0 comments
Owner

Implement hardened memory protection for the decrypted root key as described in ARCHITECTURE.md section 5.3.

Currently uses the memsafe crate as a placeholder. The code has a TODO to replace it with a custom implementation using mlock/VirtualProtect.

Requirements:

  • Prevent root key from being swapped to disk (mlock on Unix, VirtualLock on Windows)
  • Protect against memory dumps
  • Guard against hibernation file exposure
  • Zeroize key material on drop (already using zeroize crate)
  • Replace interim memsafe usage with custom mlock/VirtualProtect implementation
Implement hardened memory protection for the decrypted root key as described in ARCHITECTURE.md section 5.3. Currently uses the `memsafe` crate as a placeholder. The code has a TODO to replace it with a custom implementation using `mlock`/`VirtualProtect`. **Requirements:** - Prevent root key from being swapped to disk (mlock on Unix, VirtualLock on Windows) - Protect against memory dumps - Guard against hibernation file exposure - Zeroize key material on drop (already using `zeroize` crate) - Replace interim `memsafe` usage with custom `mlock`/`VirtualProtect` implementation
Skipper added the
Kind
Feature
label 2026-02-14 11:34:29 +00:00
Skipper added
Difficulty
High
3
Kind
Security
Priority
High
2
and removed
Kind
Feature
labels 2026-02-14 11:44:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#6