Skip to content

[feat] Implement WebAuthn PRF for Server-Side Encryption at Rest #570

Description

@secureprivate

Current Architecture:
The server-side SQLite mailbox currently utilizes a key derived from an IMAP password for encryption at rest. WebAuthn PRF is deployed for the client-side App Lock feature, but the server-side storage requires password transmission and retention in active memory for database decryption during web or IMAP sessions.

Proposed feature:
Integrate the WebAuthn PRF extension to derive the primary decryption key for the server-side SQLite mailboxes, enabling direct database unlocking via hardware authenticators for webmail access.

Technical rationale:

  • Zero-Knowledge Web Sessions: Deriving the key locally via PRF allows the web application to unlock the server database without transmitting or storing a plaintext password in the server's RAM.
  • Phishing Immunity: The hardware authenticator generates the key locally. Phishing domains cannot extract the underlying password or private key.
  • Cryptographic Domain Binding: The PRF extension binds the cryptographic salt to the specific relying party domain. Requests from spoofed domains generate mathematically invalid keys.
  • Separation of Concerns: Authentication (proving possession via cryptographic signature) is isolated from decryption (deriving the database key via PRF).

Implementation:

  1. Enable PRF key derivation to serve as the master key for the server-side ChaCha20-Poly1305 encryption.
  2. Restrict standard password-derived keys strictly as a fallback mechanism for legacy clients connecting via IMAP/POP3/SMTP protocols.
  3. Ensure the server only receives the derived key required to unlock the SQLite instance during active web sessions, discarding it upon session termination.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions