Security & architecture
How Revault protects your files, and where protection ends.
Next.js PWACloudflare WorkerPostgreSQL · R2Account settings
Create an account with a passkey. No email or password needed.
Passkeys prove account access. They do not unlock vaults. The server keeps public keys; session tokens are sealed in an HttpOnly, SameSite cookie.
Closing or refreshing the tab signs you out. A new tab needs your passkey and a vault pattern before any vault list is shown.
Vault pattern
Your pattern and a random 256-bit secret derive a wrapping key with PBKDF2-SHA256 (600,000 iterations). The secret stays in this browser; the service receives only the encrypted master key.
This pattern only unlocks this device. Keep your recovery key to set up another device.
Encrypted before upload
Each vault has a random AES-256-GCM master key. Names and folder structure are encrypted. Files use bounded Tink AES-GCM-HKDF streaming segments, encrypted before upload.
Names, previews, and file contents are encrypted. Counts, sizes, and timestamps remain visible to the service.
Storage & uploads
The Next.js PWA uses a same-origin API proxy. A Cloudflare Worker checks sessions and ownership. PostgreSQL stores account records and encrypted metadata; R2 stores encrypted file chunks.
Browser storage can be cleared or evicted. Keep an encrypted backup outside this browser.
Save your recovery key
Clearing browser data removes the device secret. Sign in with your passkey, then use your recovery key to choose a new pattern.
Encrypted backups do not contain your device secret. Use the recovery key to restore a pattern-protected vault. Older vaults may still use their original passphrase.
A recovery kit contains the recovery secret and key wrappers, but it does not contain your files. You still need the encrypted cloud copy or a self-contained encrypted backup.
A note about security
Patterns have few combinations. If someone copies your device secret, they can try patterns offline.
Changing a device pattern does not revoke other devices or old recovery keys. Move files to a new vault if an encryption key is compromised.
Encryption protects stored contents. Object counts, sizes, timestamps, and account associations remain visible. A compromised device or frontend can expose unlocked data. Revault is an independent project and has not undergone an independent security audit.