EncryptedDatabase
Phase 1: Database and storage layout design
Design the storage location for encrypted files and metadata schema in the database.
- Define file path structure
- Define metadata fields (filename, encryption method, key ID, etc.)
- Validate database connectivity
Functional Output: Database schema created and file storage path structured, ready for file insertion.
Phase 2: Asymmetric key generation and management
Implement key pair generation and secure storage for encryption and decryption.
- Generate public/private key pairs
- Store private keys securely
- Map keys to file metadata
Functional Output: Key pairs generated and associated with file entries in a secure and testable way.
Phase 3: File encryption and addition to database
Encrypt user-selected files and add entries to the database.
- Read file content
- Encrypt with asymmetric encryption using public key
- Store encrypted file and metadata in database
Functional Output: Files are encrypted, saved on disk, and registered in the database with correct metadata.
Phase 4: File retrieval and decryption
Implement reading and decryption of files from the database.
- Fetch encrypted file path and metadata
- Decrypt using associated private key
- Output original file content to user
Functional Output: User can retrieve and decrypt any stored file successfully.
Phase 5: File deletion and metadata cleanup
Add functionality to remove files and corresponding metadata.
- Delete encrypted file from disk
- Remove entry from database
- Ensure no residual data remains
Functional Output: Files and metadata are securely deleted with integrity checks.
Phase 6: Testing, error handling, and CLI interface
Add robust CLI, error handling, logging, and unit tests.
- Handle missing files, corrupted metadata, or key issues
- Implement clear CLI commands for add, read, delete
- Add logs and automated tests
Functional Output: Stable, test-validated CLI tool with encrypted file management and reliable error handling.