mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
1.1 KiB
1.1 KiB
id, title, status, assignee, parent, priority, tags, whitepaper
| id | title | status | assignee | parent | priority | tags | whitepaper | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| SEC-002 | SQLCipher for At-Rest Library Encryption | To Do | james | SEC-000 | High |
|
Section 8.1 |
Description
Implement transparent, at-rest encryption for all library databases (.sdlibrary/database.db) using SQLCipher. Keys should be derived from a user-provided password using PBKDF2 to protect against brute-force attacks.
Implementation Steps
- Integrate a
SQLCiphercompatible Rust crate (e.g.,sqlx-sqlcipher). - Modify the
Database::openandDatabase::createmethods to accept an optional password. - Implement key derivation logic using
PBKDF2with a unique, stored salt for each library. - Develop the CLI/UI flow for prompting for and managing library passwords.
Acceptance Criteria
- A new library created with a password has its
database.dbfile encrypted. - The application can successfully connect to and query an encrypted database with the correct password.
- An attempt to open an encrypted database without a password fails with a clear error.