What problem does it solve?
This Skill prevents common SQLCipher security and correctness failures by guiding you to set up encrypted SQLite databases with safe key management, strong key derivation, secure querying, and reliable migration and re-keying.
Core Features & Use Cases
- Key management & secure key derivation: Shows how to avoid hard-coded keys, derive strong encryption keys (e.g., PBKDF2 with high iteration counts), and source keys from secure providers like OS keychains.
- Encryption correctness & verification: Ensures encryption is actually active by validating database access after applying the key and configuring cipher settings.
- Re-keying, migration, and safe SQL execution: Provides patterns for rotating keys via
PRAGMA rekey, migrating from plain SQLite by export/import, and using parameterized queries to prevent SQL injection.
- Use Case: When adding at-rest encryption to an existing app that currently uses unencrypted SQLite, use this Skill to migrate data into a SQLCipher database, verify decryption correctness, and implement periodic key rotation without data loss.
Quick Start
Use the SQLCipher skill to generate a secure implementation plan and code patterns for encrypting a new database at 'data.db' using a key retrieved from your OS keychain and applying PRAGMA key, kdf_iter, and cipher settings before any other database operations.