SECTION 01
Cryptographic Specification
Every protected note stores its encrypted payload inside the YAML frontmatter property draft_cache while presenting an ordinary Markdown cover note on disk. Key derivation and authenticated encryption use Web Crypto primitives paired with Argon2id (hash-wasm).
AEAD Cipher
AES-256-GCM with random 96-bit (12-byte) nonces generated via crypto.getRandomValues on every save and a 128-bit authentication tag.
Key Derivation
Argon2id with 64 MiB memory cost (65536 KiB), 3 iterations, parallelism 1, and a 128-bit random salt per note.
DEK / KEK Wrapping
A random 256-bit Data Encryption Key (DEK) encrypts the note payload; the Argon2id Key Encryption Key (KEK) wraps the DEK so password changes do not require re-deriving historical blocks.
4 KB Block Padding
Plaintext bundles (note body, real title, and absorbed images) are padded to 4 KB (4096-byte) blocks prior to encryption so ciphertext size never leaks exact word count.
SECTION 02
RAM Image Isolation & Save Interception
When you reference local vault images (such as ![[diagram.png]]) inside an unlocked note, Veneer absorbs the binary image data into the AES-256-GCM encrypted payload and deletes the unencrypted file from your vault folder.
While unlocked, images are rendered inline using ephemeral in-memory blob: URLs. When the note masks (after 60 seconds of idle time, on tab switch, window blur, OS lock, or Ctrl+Shift+X), Veneer revokes all active blob: URLs, wipes the CodeMirror 6 undo history, zeroes key material in RAM, and ensures disk writes only ever serialize the cover note and encrypted draft_cache frontmatter.
SECTION 03
Emergency Destruction PIN (;;!)
Typing ;;! followed by your configured Destruction PIN at the start of any line triggers immediate RAM-first crypto-shredding across your vault. Active session keys are zeroed in memory and the encrypted draft_cache frontmatter is permanently stripped from all protected notes on disk, leaving behind only the harmless cover notes.
SECTION 04
Responsible Vulnerability Disclosure
If you discover a cryptographic flaw, plaintext disk leak, bypass in the CodeMirror 6 capture filter, or any other security issue in Veneer, please report it privately before public disclosure.
Send vulnerability reports with reproduction steps to Fariz Anjum at farizanjum@veener.fariz.tech. We acknowledge reports within 48 hours and coordinate fixes rapidly.