Encryption, in one paragraph
Encryption turns your photo into unreadable ciphertext using a key — a long random number. Without the key, the ciphertext is meaningless. Modern vaults use AES-256, a standard trusted for exactly this; the US standards body NIST publishes it. The security rests entirely on protecting the key.
How your code protects the key
The app doesn't encrypt files directly with your PIN. It generates a strong random key for your vault, then wraps (encrypts) that key with a value derived from your code. Enter the right code, the key is unwrapped, your photos decrypt. This is why a passphrase beats a short PIN: it makes deriving that value far harder to guess.
Why the Secure Enclave matters
On iPhone, the Secure Enclave is a separate chip that handles keys and rate-limits guesses in hardware. When a vault binds its key check to the Secure Enclave, an attacker can't copy your files to a powerful computer and guess your code quickly — every attempt has to go through that phone's chip. Nightjar works this way; not every vault does.
On-device vs cloud
If a vault keeps everything on the device, your photos never leave your phone, and there's nothing on a server to breach or subpoena. If it syncs to a cloud, that can be done well (end-to-end encrypted) or poorly (readable by the vendor). Check which, and whether cloud is on by default.