Security architecture
What we protect, and what we can't.
LYRD uses established primitives from Apple's frameworks and no third-party code. This page summarises the design. It has not yet been independently audited; we will publish the review when it has.
Key hierarchy
| Pattern | Ordered path on a 5 × 5 grid (at least 6 points). Never stored, logged or compared. |
|---|---|
| Stretching | PBKDF2-HMAC-SHA512, calibrated per installation to about half a second. |
| Device binding | HKDF with a secret from a Secure Enclave key agreement. Without this iPhone, guessing offline is not possible. |
| Layer Master Key | Random 256-bit key per Layer, stored only inside an encrypted key slot. |
| Content | AES-256-GCM, a separate key per object, fresh random nonces, chunked and padded. |
| Recovery | Optional 12-word phrase (128-bit) that opens a second slot with the same master key. |
The Secure Enclave does not run file encryption; it performs one key agreement per unlock to tie keys to the device. Encryption runs in the app with CryptoKit.
Plausible deniability
The interface never shows how many Layers exist and never says a pattern is wrong: an unknown pattern opens an empty Layer. All 64 key slots look like random data, and a random number of decoy slots is marked as used, so the number of used slots never equals the number of Layers.
With forensic access to the device, someone can see that LYRD holds encrypted data, roughly how much, when it changed, and an upper bound on the number of Layers. They cannot see what the data is, what it is called, or how it is divided.
On the device
- Stored files have random names and sizes rounded up into buckets.
- Thumbnails are encrypted and only decrypted into memory.
- Video plays by decrypting pieces in memory, without a plaintext copy.
- The app locks when you leave it; the app switcher shows a neutral cover.
- Content is hidden while the screen is recorded or mirrored.
- Third-party keyboards are refused inside LYRD; notes use a private keyboard.
- No notifications, no Spotlight indexing, no analytics, no logging of content.
Not protected
- A Layer while it is open, or a compromised iPhone.
- Someone who sees you draw the pattern, or a weak, predictable pattern.
- Copies outside LYRD: originals in Photos or Recently Deleted, files you exported or shared.
- Guaranteed erasure on flash storage. Deleting a Layer destroys its keys and removes its files.
- Keys in memory while you use a Layer. Swift offers no guaranteed way to wipe memory.
Report a vulnerability
Email security@lyrd.app. Please don't open public issues for vulnerabilities.