The problem encryption solves
A file on your phone is just bytes. Anyone who gets a copy of those bytes, by taking your phone, reading a backup, or finding a forgotten memory card, can read the file. Encryption transforms the bytes so they are useless without a secret key, and it transforms them back when you supply that key.
Good encryption does not depend on hiding how it works. The algorithms used by serious apps are public and have been studied by cryptographers for years. All of the security sits in the key. That gives us a simple way to evaluate any app: where does the key come from, where is it kept, and what happens if someone copies the encrypted data?
Step 1: turning a passphrase into a key
An encryption key such as one for AES-256 is 256 random bits. Nobody can remember that, so apps derive the key from something you can remember: a passphrase. The function that does this is called a key derivation function, and it is where many apps quietly cut corners.
If the derivation is fast, an attacker with a copy of your encrypted data can try billions of passphrases per second on graphics cards. A good derivation function is deliberately slow and memory-hungry, so each guess costs real time and real hardware. Argon2id, the winner of the Password Hashing Competition and standardised in RFC 9106, is the current recommendation. It is tuned with three numbers:
- Memory: how much RAM each guess needs. Tens of megabytes per guess makes running thousands of guesses in parallel on a graphics card expensive.
- Passes: how many times the memory is processed, which adds time.
- Parallelism (lanes): how many processor threads work on one guess.
A salt, a random value stored next to the encrypted data, is mixed in so that the same passphrase gives a different key on every device. Without a salt, an attacker could precompute keys for common passphrases once and reuse the work against everyone.
Some apps go a step further and mix in a secret that never leaves the phone's secure hardware, such as Android's Keystore or the iPhone's Secure Enclave. Then the encrypted data alone is not enough: an attacker who copies it to a computer cannot test guesses there at all, because they lack the hardware secret.
Step 2: encrypting the data
AES (the Advanced Encryption Standard) is the block cipher used almost everywhere, from web traffic to disk encryption. AES-256 simply means it uses a 256-bit key. There is no known practical attack on AES itself; real-world failures come from how it is used.
The mode of operation matters as much as the cipher. GCM (Galois/Counter Mode) is an authenticated mode. Besides hiding the content, it attaches a tag that proves the data has not been changed. If even one bit of the encrypted file is altered, by corruption or by an attacker, decryption fails loudly instead of returning silently damaged data. Older unauthenticated modes have led to real attacks where tampered data was decrypted and acted on.
GCM needs one more ingredient: a nonce, a number that must never be used twice with the same key. Reusing a nonce in GCM can leak information about the content and allow forgeries. Well-built apps generate a fresh random 96-bit nonce for every encryption, which makes a repeat practically impossible.
Step 3: a key for every item
If every file were encrypted directly with the key derived from your passphrase, changing the passphrase would mean re-encrypting everything, and a flaw affecting one file could affect them all. Well-designed systems use a key hierarchy:
- Your passphrase derives a key-encryption key.
- That key unlocks ("unwraps") a random data key.
- Each item gets its own random key, which is itself protected by the data key.
Changing your passphrase now only re-wraps the data key, which is instant. A recovery key can wrap the same data key independently, so you have a second way in without weakening the first. And because every item has its own key, nothing learned about one item helps with another.
Step 4: binding data to its context
Authenticated encryption can also protect information that is not secret but must not be changed, called associated data. An app can bind each encrypted item to the vault it belongs to, its item ID and how it is protected. Then an attacker who swaps two encrypted files, or moves a PIN-protected item into an unprotected slot, gets a decryption failure instead of a successful trick.
Large files raise one more issue. Decrypting a 2 GB video in one piece would put the whole video in memory, unprotected. Encrypting in chunks, each with its own authentication tag, lets an app decrypt only the part you are viewing and detect tampering or truncation of any chunk.
What encryption cannot protect against
Encryption protects data at rest. It cannot help once the data is decrypted in front of something that should not see it. Be honest with yourself about these limits:
- A compromised device. Malware with enough privileges, or a rooted or jailbroken phone, can read what you see on screen or capture the passphrase as you type it.
- A weak passphrase. Slow key derivation multiplies the cost of each guess, but cannot rescue
password1. See how to create a strong passphrase. - Copies you make. A decrypted export, a document opened in another app, or a screenshot lives outside the encryption.
- Someone watching. Shoulder surfing and cameras defeat every algorithm. Auto-lock and blurred previews reduce what a glance reveals.
- Losing every key. Without a back door, forgetting the passphrase and losing the recovery key means the data is gone for good. That is the price of having no back door, and it is worth it, but plan for it.
Questions to ask about any app
- Which key derivation function is used, and with what memory and time settings?
- Is the encryption authenticated (for example AES-GCM or ChaCha20-Poly1305)?
- Does each item or file have its own key?
- Can encrypted data copied off the device be attacked on another computer?
- Is there a recovery option, and does it weaken the main protection?
- Does the app explain what it cannot protect against?
An app that answers these plainly is more trustworthy than one that only says "bank-level security". Operator Vault publishes its answers in its security model: Argon2id with 64 MiB of memory and 3 passes, a device secret from secure hardware, AES-256-GCM with fresh nonces, a random key per item, 1 MiB authenticated chunks and context-bound associated data.