Implement key hierarchy and encryption at rest #5

Closed
opened 2026-02-14 11:33:43 +00:00 by Skipper · 1 comment
Owner

Implement the three-layer key hierarchy and AEAD encryption at rest as described in ARCHITECTURE.md section 4.

The aead_encrypted table and arbiter_settings.root_key_id FK exist in the DB, and chacha20poly1305 is a dependency, but no encryption logic is implemented yet.

Requirements:

  • User key derived from password (e.g. Argon2)
  • Root key encrypted by user key, stored in aead_encrypted
  • Wallet keys encrypted by root key, stored in aead_encrypted
  • Password rotation re-encrypts only the root key
  • Root key rotation re-encrypts all wallet keys
  • Symmetric AEAD encryption using ChaCha20-Poly1305
  • Encryption scheme versioned via schema_version column for future migration
Implement the three-layer key hierarchy and AEAD encryption at rest as described in ARCHITECTURE.md section 4. The `aead_encrypted` table and `arbiter_settings.root_key_id` FK exist in the DB, and `chacha20poly1305` is a dependency, but no encryption logic is implemented yet. **Requirements:** - User key derived from password (e.g. Argon2) - Root key encrypted by user key, stored in `aead_encrypted` - Wallet keys encrypted by root key, stored in `aead_encrypted` - Password rotation re-encrypts only the root key - Root key rotation re-encrypts all wallet keys - Symmetric AEAD encryption using ChaCha20-Poly1305 - Encryption scheme versioned via `schema_version` column for future migration
Skipper added the
Kind
Feature
label 2026-02-14 11:33:43 +00:00
Skipper added the
Difficulty
High
3
label 2026-02-14 11:38:48 +00:00
Skipper added
Kind
Security
Priority
Critical
1
and removed
Kind
Feature
labels 2026-02-14 11:44:16 +00:00
Author
Owner

Done, but no rotation

Done, but no rotation
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#5