Nookvault

How Nookvault protects your files

A plain-English overview of the design, including its limits.

Keys

passcode ──Argon2id (64 MiB, 3 passes, random salt)──► passcode key ─┐
recovery key (24 characters, 120 bits) ───────HKDF──► recovery key ──┼─ wraps ─► master key (256-bit, random)
Face ID: master key in the Keychain, bound to your current Face ID ──┘

master key ─► metadata key   (seals file names, folders and dates)
master key ─► per-file keys  (a new random key for every file and thumbnail)
master key ─► share key pair (lets the share extension add files without unlocking)

Files

Each file is split into 1 MiB chunks, each sealed with AES-256-GCM under that file's own key. Every chunk is bound to the file's ID, its position and whether it's the last chunk, so chunks can't be swapped, reordered or cut off without detection. Videos stream straight from the encrypted file and are never written to disk unencrypted. Thumbnails are encrypted the same way, separately.

The database of names, folders and dates stores each record sealed with the metadata key. Only what's needed to sort and filter (which folder an item is in, its type, whether it's in the Trash) is kept unencrypted, and only on your device.

The share extension

Saving from another app's share sheet never unlocks your vault. The extension encrypts incoming files to the vault's public key (X25519). Only the unlocked app holds the matching private key, so it adds them the next time you open Nookvault.

iCloud Backup

Backup sends only what's already encrypted: the sealed records, the encrypted files (in 64 MiB pieces) and your wrapped keys. On a new iPhone you need your passcode or recovery key to unwrap the master key. Downloaded files are checked against their recorded fingerprint (SHA-256) before use.

Who can see what

File contentsNames, folders, datesNumber and size of files
Someone with your unlocked iPhone and vaultYesYesYes
Someone with your iPhone but not your passcodeNoNoRoughly
Apple (iCloud Backup on)NoNoYes, plus when they change
UsNoNoNo: we have no servers or analytics

Limits, honestly

Building blocks

Apple CryptoKit (AES-GCM, HKDF, X25519, SHA-256), libsodium (Argon2id) and SQLite via GRDB. No custom cryptographic algorithms.