Encryption¶
KelpMesh supports transparent Fernet encryption (AES-128-CBC + HMAC-SHA256) for project state and DuckDB databases.
Setup¶
# Generate an encryption key
kelpmesh scan generate-key
# Initialize a project with encryption
kelpmesh init my_project --encrypt
Environment Variable¶
Set the KELPMESH_ENCRYPTION_KEY environment variable:
# Linux/macOS
export KELPMESH_ENCRYPTION_KEY=your-generated-key-here
# Windows
set KELPMESH_ENCRYPTION_KEY=your-generated-key-here
How it works¶
- When
KELPMESH_ENCRYPTION_KEYis set and DuckDB >= 1.0 is available, the state database is encrypted at rest - The state database (
target/kelpmesh_state.duckdb) is transparently encrypted on close and decrypted on open - Encryption uses Fernet (AES-128-CBC + HMAC-SHA256) via the
cryptographypackage