How Dim Notes Protects Your Data

Last updated · v1.4This page explains the technical mechanisms behind Dim Notes' encryption and security model. It is written for users who want to verify our claims rather than take them on faith.

TL;DR

Notes are encrypted on your device — we only see scrambled text and have no way to read them. If you lose your PIN, your recovery codes unlock everything; without them, the data stays scrambled.

Architecture Overview

Dim Notes uses a client-server architecture where encryption and decryption happen exclusively in your browser or app — never on our servers. The server stores only ciphertext: we can see that it is there, but it is scrambled and we have no way to decrypt it.

The data flow for a note looks like this:

YOUR DEVICE

Plaintext note
typed in the editor
AES-256-GCM encrypt
key derived from your PIN — stays on device
Ciphertext
opaque blob, ready to send

OUR SERVER · HTTPS — only ciphertext

Ciphertext + IVs
stored in Neon DB — we only see scrambled data
Timestamps + metadata
color labels, pinned/archived flags
No key here
we cannot decrypt your data

The Content Encryption Key (CEK) lives only on your device while your session is unlocked. It is never sent to our servers in raw form. The server stores a copy of your CEK that has itself been encrypted with a key derived from your PIN — so even that stored copy is opaque to us.

Encryption Implementation

All encryption runs on your device, never on our servers. Note content is encrypted with AES-256-GCM using @noble/ciphers, and keys are derived with Argon2id using @noble/hashes. Both are audited, dependency-free implementations. We use Argon2id rather than the Web Crypto API's PBKDF2 because it is memory-hard, which makes brute-forcing a short PIN far more expensive. Randomness comes from the platform CSPRNG (crypto.getRandomValues()). Share links use their own separate key, explained in Section 7.

Algorithm
AES-256-GCM — 256-bit key, authenticated encryption with additional data. GCM provides both confidentiality and integrity: a tampered ciphertext fails to decrypt rather than producing garbage output.
Initialization vector
96-bit (12 bytes), generated fresh from crypto.getRandomValues() on every encrypt call. Never reused.
Encrypted
Note title, note body, and file attachments (both contents and filenames). These leave your device only as ciphertext. Attachments uploaded before end-to-end filename encryption shipped may still have their original filename stored in plaintext; their contents were always encrypted.
Not encrypted
Colour labels, timestamps, and whether a note is pinned or archived. See Section 6 for the full breakdown.
Randomness
Platform CSPRNG, for both your notes and share links.

File attachments are encrypted client-side with the same AES-256-GCM scheme as notes, using the same per-account CEK, before being uploaded to cloud storage — both the file contents and the original filename. The server stores only the ciphertext bytes, an IV, and the encrypted filename; it can read neither the file nor its name.

Key Derivation & Storage

Dim Notes uses a two-key system: a Content Encryption Key (CEK) that encrypts your data, and a Key Encryption Key (KEK) that protects the CEK.

CEK — Content Encryption Key

A 256-bit random AES key generated once when you first set up encryption. This key encrypts all your notes and attachments. It is stored on our server only in wrapped (encrypted) form. We never see the raw CEK.

KEK — Key Encryption Key

Derived from your PIN on your device using Argon2id with m=65,536 (64 MiB), t=3, p=1 and a 256-bit random salt. Argon2id is the OWASP-recommended algorithm for password-based key derivation — its memory-hard design makes offline brute-force attacks using GPUs or ASICs significantly more expensive than PBKDF2 or bcrypt. The KEK itself never leaves your device and is never stored anywhere.

When you enter your PIN to unlock, your device derives the KEK locally, uses it to unwrap the CEK from the server, and holds the CEK in memory for the duration of your unlock session. When the session expires or you lock manually, the CEK is discarded from memory.

Your PIN never leaves your device — not even on unlock. To prove you know it, the client sends only a one-way proof (a SHA-256 hash of your derived key), which the server checks against a stored scrypt hash. The proof cannot be reversed to your PIN or your key, so a server that logged every request would still be unable to unwrap the CEK.

Authentication Layers

Dim Notes has two separate authentication layers that operate independently.

Layer 1 — Account Login

Standard account authentication. Supports email + password, Google OAuth, and Microsoft OAuth. This layer controls who can access your account. New accounts need a password of at least 12 characters. Session tokens are managed via httpOnly cookies. Dim Notes never handles your OAuth provider credentials.

Layer 2 — Note Unlock (Encryption Gate)

A second gate that controls access to note content. Being logged in is not enough — you must also pass the unlock step before your notes are decrypted. This layer is independent of Layer 1; even if your account session is valid, a locked Dim Notes session hides all note content.

Unlock methods (you choose one at signup):

TOTP
Time-based one-time password via Google Authenticator or any compatible app. First unlock per session only.
Email OTP
Email verified once during setup; all subsequent unlocks use your PIN.
PIN
A 6-digit PIN set by you (PINs set before November 2026 may be 4 or 5 digits and keep working). Required alongside TOTP/Email OTP to derive the encryption key. Always available as a fallback.

Auto-lock: Your session automatically locks after a period of inactivity. There is no imposed default — you pick the interval in the first step of setup (5 minutes, 15 minutes, 30 minutes, 1 hour, or Never), and can change it at any time in Settings. After the initial unlock, re-locking always requires your PIN or biometrics — not a new TOTP or email code — to avoid constant interruptions.

Recovery Codes

When you enable encryption, Dim Notes generates 10 single-use recovery codes in the format XXXX-XXXX-XXXX. These are the only way to recover your encrypted notes if you lose access to your PIN and your primary unlock method.

  • Using a code decrypts its CEK backup and immediately marks the code as consumed. It cannot be reused.
  • Recovery codes are presented to you once at setup. If you lose them without saving copies, they are gone.
  • We cannot reset your PIN, restore your recovery codes, or recover your encryption key. This is intentional — it means a server breach cannot compromise your data.

Zero-Knowledge Architecture

"Zero-knowledge" means we designed the system so that our servers cannot read your note content, even if compelled to by law enforcement, even if our database is breached.

WE CANNOT READ

  • ✓ Note titles
  • ✓ Note body content
  • ✓ File attachment contents
  • ✓ Folder names
  • ✓ Tag names
  • ✓ Your raw PIN or recovery codes
  • ✓ Your encryption key (CEK)

WE CAN SEE

  • — Your account email
  • — Note count and storage usage
  • — Timestamps (created/updated)
  • — Color labels
  • — Whether notes are pinned or archived

Folder and tag names are encrypted using the same AES-256-GCM scheme as note content. They are decrypted client-side after you unlock your notes. While locked, folder and tag names are not visible — even on your own device.

What We Don't Do

  • No cloud AI. Your notes are never sent to a third-party AI service or used to train models. Any AI-assisted feature runs entirely on your device — the content never leaves it.
  • No cloud speech recognition. Dictation is transcribed entirely on your device, as you speak. Audio is never uploaded; only the resulting text enters your note, where it is encrypted like everything else.
  • No analytics on note content. Usage analytics (PostHog) track app-level events like "note created" — never what is inside a note.
  • No advertising, no ad networks, no tracking pixels.
  • No selling data. We are a subscription product. Our revenue comes from you, not from your data.
  • No third-party access to note content. Our infrastructure vendors (Neon, Cloudflare, Hetzner) receive only the encrypted ciphertext stored on their hardware — the same blobs we cannot read.

Known Limitations

We believe honesty about limitations is more useful than pretending they don't exist.

  • Metadata is visible. Note count, storage usage, timestamps, color labels, and whether notes are pinned or archived are stored in plaintext. This reveals usage patterns even without access to content.
  • PIN strength matters. The security of your encryption depends on the strength of your PIN. New PINs must be 6 digits, which gives 1,000,000 possible values; Argon2id (m=65,536 KiB — 64 MiB — t=3) makes trying them slow. Avoid easy patterns like 123456 or a birthday. If you still use an older 4- or 5-digit PIN, change it to 6 digits in Settings.

Threat Model

A threat model is a statement of what a security system does and does not protect against. Being specific about this is more useful than vague assurances.

Protected against

  • Server breach / database dump: Attackers who steal our database get note ciphertext and a PIN-wrapped copy of your key. Neither can be opened without your PIN, which never reaches our servers.
  • Legal requests for note content: A court order served on Dim Notes or our infrastructure providers cannot produce plaintext note content — we do not have it.
  • Insider access to stored data: Dim Notes staff, contractors, or infrastructure providers cannot read note content from what we store.

Not protected against

  • Compromised device: If someone gets into your device while your notes are unlocked in Dim Notes, they can read them, like anything else on your screen. Locked notes stay encrypted, and auto-lock keeps that window short.
  • Keyloggers: A keylogger on your device sees everything you type, including your PIN, password, and unlock codes, before Dim Notes does. No app can detect or block this.
  • User error: Sharing your PIN, losing all recovery codes, or being socially engineered into providing credentials. We cannot protect against voluntary disclosure.

Account & Data Deletion

You can permanently delete your Dim Notes account and all associated data at any time. No data is retained after deletion.

Deletion removes the following immediately and irreversibly:

  • All notes, note versions, and drafts
  • All folders and tags
  • All file attachments (deleted from cloud storage)
  • Your unlock settings, PIN hash, TOTP secret, and recovery codes
  • Your active subscription (cancelled immediately with Paddle)
  • Your account credentials and session data

To delete your account: dimnotes.com/delete-account

Questions about our security model? [email protected]

This page is updated when the security implementation changes. v1.4 — November 5, 2026.