A fully offline, encrypted note-taking application for Windows with hardware-backed authentication.
- AES-256-GCM encryption — every note is encrypted with its own key; the vault is encrypted with a master key
- Windows Hello (TPM) authentication — no password to remember; biometrics or PIN via the TPM
- 24-word BIP-39 recovery key — printed on paper for PIN-change or Hello reset scenarios
- Per-note AAD binding — each note's ciphertext is cryptographically bound to its UUID; blobs cannot be swapped between notes
- Argon2id KDF — 64 MB / 3 iterations for recovery key derivation; GPU brute-force infeasible
- Atomic saves —
notes.encandconfig.jsonare written via temp-file + rename; crash-safe - Config HMAC-SHA256 integrity — tamper detection with constant-time comparison
- Memory locking — master key page locked via
VirtualLock; zeroized on drop - Auto-lock on idle — configurable timeout (default 5 min)
- Vault rollback detection — monotonic
vault_versioncounter protected by HMAC - Rate-limited recovery — exponential backoff (2 s → 60 s) with 10-attempt hard limit
| Property | Implementation |
|---|---|
| Encryption | AES-256-GCM with random 96-bit nonces |
| Key wrapping | AES-256-GCM + AAD role binding |
| Recovery KDF | Argon2id (64 MB, 3 iter, 1 lane) |
| Config integrity | HMAC-SHA256, canonical struct encoding, constant-time verify |
| Memory safety | zeroize + ZeroizeOnDrop on all key material |
| Auth | Windows Hello (TPM-backed) |
| Save atomicity | tempfile in same directory + persist() rename |
| Directory safety | Reparse point / symlink detection on data dir and save dir |
Not protected against: same-user malware, admin/SYSTEM memory dumps while unlocked, or nation-state memory scraping. This is a local-data threat model.
- Windows 10 / 11 (Windows Hello required)
- Rust stable toolchain (
rustup default stable)
git clone https://github.com/adikul1023/secnote.git
cd secnote
cargo build --release
# Binary at: target\release\secure-notes.execargo testA full adversarial red-team audit was conducted covering 23 vulnerabilities across cryptographic design, storage, memory safety, and logic. All findings have been remediated.
See VULNERABILITIES.md for the full report including fix details.
Every push runs:
cargo audit— known CVE check via RustSeccargo deny— license and source policycargo clippy -- -D warnings— lints as hard errorscargo test— unit tests (AAD binding, nonce uniqueness, HMAC tamper detection, vault size limits)
MIT — see LICENSE