Get the app Join the waitlist

Security whitepaper

Version 1.2 · 2026-11 · Independent audit: planned before public release
This paper describes how Lockveil is designed to work before release. We will update it after the independent audit.

Overview

This part is written for everyone. It says what Lockveil is designed to protect, from whom, and where its protection ends.

What Lockveil protects

Your photos, videos, documents and notes, and also their names, thumbnails and folders. Lockveil is designed to encrypt all of it on your iPhone before anything is saved. When you look at a file, it is opened only in memory and is not written to storage in readable form, apart from the few times you ask for it (see the technical section).

Who it protects you from

  • Someone who has your unlocked iPhone, such as a partner, a child or a coworker. Each vault has its own code, the app locks itself when you leave it, a privacy cover hides it in the app switcher, and you can disguise the app.
  • Someone who pressures you to open the vault. A decoy vault, a panic passcode and Hidden mode are designed to help. We advise keeping Face ID off for vaults that matter most.
  • A stolen iPhone, or a copy of its data. Everything is encrypted, including names, thumbnails, folders and notes. The keys come from your code together with a secret that never leaves the device, through a deliberately slow function that is hard to speed up with special hardware.
  • Anyone who can get into your iCloud. Only encrypted data goes to iCloud, in blocks of one fixed size. A weak code such as a PIN is never used to protect the keys that are kept there.
  • The developer. There are no accounts, no servers that hold keys and no analytics.
  • Losing your data. A free backup, a recovery phrase, careful saving of every change, checked imports and upgrades that can be rolled back.

What we can't see

We can't see your files, their names, your codes or your recovery phrases. There is no Lockveil account and no Lockveil server that keeps keys. The app has no analytics. When backup is on (it is by default), your data is encrypted on your iPhone before it is uploaded to your own iCloud account, and keys leave your devices only in encrypted form.

What it can't protect against

Lockveil cannot protect a vault while it is open on an unlocked iPhone that someone else is holding. It also cannot defend against an iPhone whose iOS has been compromised, for example a jailbroken one, where an attacker can read the phone's live memory. The known limitations below list more.

Known limitations

We publish these so that you can judge for yourself. They come from our own security design. Where this page is shorter than the specification, the specification governs.

  1. iOS cannot prevent screenshots or photos of the screen. Lockveil is designed to cover its contents in the app switcher and while the screen is being recorded or mirrored, but it cannot stop someone from taking a screenshot, or from pointing another camera at your screen while a vault is open.
  2. The name under the app icon always reads “Lockveil”. Alternate icons change the picture, not the name. A full disguise needs a bookmark that you make yourself with the Shortcuts app, with its own name and icon. The app explains how.
  3. Slot padding hides how many vaults you have from copies of the app's files and from iOS device backups, and no further. Lockveil keeps at least 32 header files and 16 database files on the iPhone, mixed with dummies that look the same, so counting the files in a copy of the app's data or in an iOS backup tells nothing. A new vault's database starts at the size of the smallest dummies, so for a while it ranks among the smaller database files. The exact number of vaults is still kept in the iOS Keychain, which never goes into a device backup, so an examiner who extracts the whole iPhone with its Keychain can read it. A vault database larger than the largest dummy (8 MiB) stands out by its size, and the total size of the stored data and the times when files were changed can still reveal activity. If a crash stops the app while it is creating a vault, before the vault's header is saved, an unreadable file (and sometimes a recovery header) can be left behind. The app cannot recognise such leftovers to clean them up, because without a key they look like any other vault file.
  4. In Hidden mode on the Free plan, creating a 4th vault shows the paywall, which reveals that 3 vaults already exist. Pro has no vault limit.
  5. Face ID can be coerced. Anyone who can make you look at your iPhone can open a vault that uses Face ID. Keep it off for the vaults that matter most. Face ID can never open a decoy vault.
  6. A PIN of 4 to 6 digits has low entropy, which means there are few combinations to try. Its protection relies on the secret that stays on your device. If an attacker extracts both the iOS Keychain and the files from your iPhone, a short PIN can be guessed offline. A pattern of 8 or more dots, or a password, is much stronger, and the app's strength meter says so.
  7. A forensic copy of your iPhone that was taken before you used the panic passcode still contains your other vaults. The panic passcode erases them from the iPhone from that moment on, except encrypted uploads of an erased vault that were already waiting, which stay on the iPhone until iCloud has them. It cannot reach back into a copy made earlier. If erasing the other vaults, or removing what the erased vaults left on this iPhone after the panic, cannot be finished, for example because of a failing disk, no vault can be created or restored on this iPhone until it is; Lockveil tries again at each launch. A removal that still fails at three launches with the iPhone unlocked is skipped so the iPhone never stays stuck, and what it would have removed stays; a launch with the iPhone locked does not count toward the three, and the erase itself is never given up.
  8. The programming language Swift cannot guarantee that every temporary copy of a secret in memory is wiped. Lockveil is designed to clear keys and typed codes as soon as it can, but a trace might stay in memory until iOS reuses that space.
  9. Apple, or anyone with access to your iCloud account, can see how many vault zones your backup has, how many encrypted blocks are stored and how large they are, and when they were uploaded. The content is encrypted before it is uploaded.
  10. An own recovery phrase is only as strong as it is unpredictable. Anyone who holds your iCloud backup data, or your app files together with a value that moves to a new iPhone with Quick Start or an encrypted iOS backup, can try guesses offline, slowed only by the Argon2id function. 12 words do not have this weakness, which is why they stay the default.
  11. The sign-in screen opens on one code type (pattern, PIN or password): the type of the main vault in Classic mode, or of the vault whose type changed last in Hidden mode. It says nothing about how many vaults exist or which code types they use.
  12. In Classic mode, items you share to Lockveil from another app always go to the main vault. A decoy vault that you are forced to open therefore does not show something you shared just before.
  13. In Classic mode on the Free plan, tapping New vault in an ordinary vault (not a decoy) when 3 vaults exist shows the paywall, which reveals that 3 vaults already exist. In a decoy vault, New vault never shows the paywall, so a decoy you are forced to open gives nothing away; a vault created there still counts toward the 3.
  14. If the iPhone locks Lockveil while an App Store purchase sheet is open, the sheet can stay on screen above the sign-in screen or the calculator until you close it, because an app cannot close a sheet that iOS shows. Lockveil never opens a purchase sheet by itself, and it holds the App Store's other messages until a vault is open.

Technical details for auditors

This part describes the design in more detail, for people who review cryptography. It stays at the level of design: it does not give file layouts. The full specification is what the independent audit will check the finished app against.

Cryptographic primitives

All cryptography goes through one module of the app. No other part of the app calls a crypto library for vault data.

The primitives Lockveil is designed to use, and what each one is for
Purpose Primitive Notes
Content, headers and backup payloadsAES-256-GCMA random nonce for every header and payload; file chunks use a random prefix per file plus the chunk number. The tag is checked on every read.
Keys from other keysHKDF-SHA256A separate purpose label for each key.
Locators and tagsHMAC-SHA256Names the header file without revealing whose it is.
Keys from codesArgon2id version 1.3From libsodium. Memory-hard and slow on purpose.
Sealing data to a vault that is not openHPKE (RFC 9180), base modeCurve25519, SHA-256 and ChaCha20-Poly1305. Used for the Share Sheet inbox and for intruder photos.
Face IDSecure Enclave P-256 key agreementWith HKDF and AES-GCM.
Index databaseSQLCipher 4AES-256 with HMAC-SHA512 on every page.
HashingSHA-256Salt derivation and the recovery phrase checksum.
RandomnessThe iOS system CSPRNGUsed for every key, nonce and dummy.
12-word recovery phraseBIP-39 English word list128 bits of randomness plus a checksum. An own phrase goes through Argon2id.

Key hierarchy

  1. You enter a code: a pattern, a PIN or a password. The code type is part of what is hashed, so the same characters entered as a PIN and as a password give different keys and open different vaults.
  2. The code, together with a secret that is made on first launch and never leaves this iPhone, goes through Argon2id with 64 MiB of memory. The number of passes is calibrated once per device: it is the first count at which one derivation takes at least half a second, up to 64 passes, and it is never lowered afterwards.
  3. The result is the access key.
  4. From the access key come the locator, which names the vault's header file, and the header key.
  5. The header key opens the header, which holds the master key. The master key is random and belongs to one vault.
  6. From the master key come the index key, which opens the index database, and the backup key, which protects what goes to iCloud. Each file and each thumbnail has its own random file key, which is kept in the index.

The recovery phrase and Face ID are two other ways to reach the same master key. They are described below.

Vault headers

Each vault has a header of one fixed size. It holds the master key and is encrypted with a key that comes from the code. A dummy header made of random data looks the same as a real one to anyone who does not have a key; dummies are part of slot padding, described below.

To sign in, Lockveil derives the locator from the code and looks for the header with that name. A missing file and a failed decryption are handled in the same way, so nothing tells a code that opens nothing apart from a file that does not exist. The slow key derivation always runs first.

Slot padding keeps at least 32 header files and 16 database files on the iPhone at all times, mixed with dummies of random data that look like real files to anyone who does not have a key, so that counting files in a copy of the app's data or in a device backup tells nothing. It does not hide the number of vaults from an examiner who extracts the whole iPhone with its Keychain (see limitation 3).

Changing a code is built to survive a crash at any point: the new header is written first, the old one is removed afterwards, and the master key and the files are not touched.

Sign-in and lockout

Lockveil offers three code types: a pattern of at least 6 dots with a change of direction, a PIN of 4 to 12 digits, and a password of at least 8 characters. Every vault has its own code type, and the sign-in screen lets you switch between them without any cost or failed attempt.

In Classic mode, wrong codes are slowed down. Failures 1 to 4 have no delay. The 5th failure locks code entry for 30 seconds, failures 6 to 9 lock it for 30 seconds each, and the 10th and every later failure locks it for 5 minutes. Every wrong code is counted, even when several are checked at once, and so is a wrong code typed inside an open vault to confirm that it is you. The counter resets after a correct code. It is stored on the device and survives restarts. Face ID, for the vault where you turned it on, keeps working during a lock and never reads, resets or adds to the counter.

Hidden mode never shows an error, never delays and never takes an intruder photo, because any of these would show that the mode is on.

Sign-in modes

  • Classic is the default and the recommended mode. An unknown code shows an error, and Pro adds an optional photo of the person who typed it. The first vault you create is the main vault. It sets up the decoy vault, the panic passcode, the attempt log and the Share Sheet inbox. It cannot open, list or count any other vault.
  • Hidden treats every vault the same. An unknown code opens a new empty vault that exists only in memory until you add something to it. There is no decoy role, no attempt log and no intruder photo.

One code opens exactly one vault. No vault holds another vault's keys, locators or identifiers. In Classic mode, decoy and standard vaults are sandboxed: settings changed inside them stay inside them and have no effect on the rest of the device.

Decoy vault and panic passcode

A decoy vault is a separate vault with its own code, its own master key and its own recovery phrase. It is made from the main vault, which keeps only a flag that a decoy exists, and never its keys or contents. Face ID can never open a decoy.

The panic passcode opens a target vault, in the same way and at the same speed as a normal sign-in. In the background it then erases the other vaults from this iPhone: their headers and databases at once, their files in a sweep afterwards, and the Face ID record if it belongs to another vault. Encrypted uploads that were already waiting stay on the iPhone until iCloud has them. The panic passcode never deletes anything in iCloud, so erased vaults stay recoverable with their recovery phrases. A copy of the iPhone taken earlier is not affected (see limitation 7).

Face ID

Face ID works for one vault per device. Lockveil makes a key inside the Secure Enclave and uses it to seal that vault's keys. When you use Face ID, the Secure Enclave uses that key to unseal them, and the vault opens; the key itself never leaves the Secure Enclave. If the Face ID settings on the iPhone change, for example when another face is added, the key becomes unusable. Lockveil then turns Face ID off, tells you once, and asks for your code. Face ID can never open a decoy vault or a panic target. See also limitation 5.

Recovery phrase

Every vault has at most one recovery phrase at a time. You can skip it when you create the vault, but until you add one, a forgotten code locks that vault for good. You choose its kind:

  • 12 words, the default. They are random and come from a standard word list, so they are strong enough to need no slow function.
  • Your own phrase, typed twice. It is never stored anywhere, so it can be replaced but never shown again. Because people choose guessable phrases, it always goes through Argon2id. See limitation 10.

Nobody else holds a copy of either kind. If you change the phrase, the old one stops working. A recovery header is kept on the iPhone, so a forgotten code can be reset without a network, and a matching record goes into your backup, so a new iPhone can restore the vault.

Backup

Only encrypted data leaves the iPhone. File contents are uploaded as the same ciphertext split into blocks of one fixed size, 4 MiB, and the last block is padded with random bytes, so iCloud never sees real file sizes. Everything goes into the private database of your own iCloud account. Keys leave your devices only in encrypted form, and uploads work while the vault is locked, because everything is encrypted at the moment it changes. Backup is never deleted when Pro ends and is never touched by the panic passcode. See limitation 9 for what Apple can still see.

iOS device backups

This is separate from Lockveil's own backup. Vault headers, indexes and recovery records are always included in iOS device backups. The encrypted files are left out while Lockveil's own iCloud backup is on and up to date, and included otherwise. So with Lockveil backup off, your encrypted files are part of your iPhone's regular device backup. We chose this so that moving to a new iPhone keeps working for people who turned our backup off, and so that people who use it do not pay for their iCloud storage twice.

Readable data on storage

Decrypted content is not written to storage, with two kinds of exception. The first is a system hand-off when you import: the temporary file that the photo picker, the document picker or the camera gives the app. The second is a copy you ask for: exporting, sharing, or opening a file in another app. These temporary copies get the strongest iOS file protection, are left out of backups and are deleted as soon as the operation ends, with a sweep at the next launch as a safety net. Two system screens keep their own copies a little longer: while you scan, the iOS document scanner keeps each page as a readable image in the app's caches, and when you share a photo or video, the share sheet keeps its own copy while the app runs. Lockveil removes them when the scan ends or the sheet closes, again when the app locks, and at the next launch. Viewing photos, playing video, reading documents and notes, and drawing thumbnails all happen in memory.

Locking and screen privacy

The app locks as soon as you leave it, with a choice of delays, and on an incoming call. Locking closes the session, wipes the keys, closes the database and drops decoded images. A privacy cover hides the app in the app switcher and while the screen is being recorded or mirrored. Screenshots cannot be blocked on iOS (see limitation 1).

Memory and logging

Keys live only in dedicated key types, buffers from the crypto library are wiped after use, and what you type as a code is cleared right after the key is derived. Lockveil never logs keys, codes, phrases, locators, file names, folder names, note text or the number of items in a vault. Recovery words are shown as text that cannot be selected or copied. Swift cannot promise that no temporary copy remains in memory (see limitation 8).

Tests and independent audit

The crypto code is designed to be tested before anything else. The required tests are known-answer tests against published test vectors, plus, for Argon2id at 64 MiB, values from a second, independent implementation (the standard's own vectors use settings the library cannot take), sample files that were frozen once and must open forever, crash tests that stop a code or phrase change after every step and check that exactly one code or phrase still works, negative tests that damage a header or a chunk and expect a clean failure, round-trip tests with random file sizes, tests for both recovery phrase kinds, and a scan showing that one vault's keys and identifiers never appear in another vault's data.

An independent audit of the cryptography is planned before public release. The auditor has not been chosen yet. This page will say so when that changes, and will link to the audit report once it exists.