How a Drawer is encrypted
The pattern chooses the Drawer. A separate random key encrypts the files. The pattern alone is not that key.
By Paul Bădărău, maker of Milkglass.
I make Milkglass. This page describes the current iPhone and iPad app. It is not a security audit.
The pattern selects one Drawer
You draw on a 3 by 3 grid. A pattern uses 4 to 9 different dots. A straight stroke also takes a dot it crosses, so the grid has at most 389,112 patterns. That is the list a person can try from the screen.
This iPhone keeps a random Device secret in the Keychain. The item stays on this device, and the system can read it when the device is unlocked. The pattern check mixes that secret with the gesture, then runs a slow step: PBKDF2 with HMAC-SHA256, 600,000 rounds, and a salt kept with the Drawers on this iPhone. The result is a 256-bit pattern key.
Apple's Keychain data protection says an item in the this-device-only class is wrapped with a key tied to this device. A copy of that item is not useful on another device. The page is Keychain data protection.
A random key encrypts the files
When you make a Drawer, Milkglass generates a random 256-bit key for it. HKDF-SHA256 combines the pattern key with the envelope's random salt to make the key that seals the Drawer key with AES-GCM. Opening the Drawer unseals it. The files use the random Drawer key.
Each file is encrypted in pieces of 1 MiB with AES-GCM. Each piece carries an authentication tag. Milkglass also stores a SHA-256 digest of the plaintext and checks it when the file is read back. NIST SP 800-38D specifies GCM. FIPS 197 specifies AES.
The file names and thumbnail names stored on disk are authentication codes under the Drawer key. The names you chose stay inside the encrypted catalog.
The catalog is an encrypted database
The list of items, folder names, and the other records sit in a SQLCipher database. This build pins SQLCipher.swift 4.19.0. The database key is derived from the Drawer key. Settings includes Open-source notices, and the SQLCipher license is there. This page does not claim an independent audit of that library.
SQLCipher's design notes describe the library. Those notes are the vendor's. They are not a test of this app.
What the slow step changes
The slow step is PBKDF2, as NIST SP 800-132 describes for deriving a key from a secret a person can enter. NIST published that recommendation in December 2010. Its publication page records a planning note, dated 11 May 2023, that NIST plans to revise it. Each guess on this iPhone costs 600,000 rounds of HMAC-SHA256. The output is 256 bits long. The rounds make a guess slower. They do not add patterns the grid does not have.
After several patterns that open nothing, the app also waits, up to one hour. That wait is on the pattern page. It is a limit in the app, separate from the encryption.
What stays in reach
The Home Screen still shows Milkglass. Storage on the device can show that the app holds data. A person who has the unlocked iPhone and its passcode can try patterns. A file you already shared is a copy outside the Drawer. Encryption of the Drawer does not reach that copy.
The recovery words unwrap the same Drawer key. They do not use the Device secret, so they still work when that secret is not on the iPhone in your hand. The iCloud backup uploads ciphertext the app has already sealed. Milkglass has no server that receives the pattern or the files.
When this helps
- Choosing a private photo app when you want the checklist: access, encryption, copies left in Photos, backup, and recovery.
- How a pattern opens a Drawer when the question is the first screen, and what an unknown pattern answers.
- The eight recovery words when the pattern is forgotten and the Drawer still has to open.
- The product page for the short account of the same grid.
References
Checked 10 November 2026.
- NIST SP 800-132. Password-based key derivation. December 2010. Planning note dated 11 May 2023.
- NIST SP 800-38D. Galois/Counter Mode.
- FIPS 197. The Advanced Encryption Standard.
- Apple Platform Security: Keychain data protection. This-device-only items stay tied to the device.
- SQLCipher design. The vendor's description of the database cipher. Not an audit of Milkglass.
More Milkglass features
Each pattern opens its own Drawer
Milkglass opens to a 3×3 pattern. Each pattern opens one Drawer, with no list and no count. An unknown pattern says no Drawer uses it.
Read the featureEight words open one Drawer
Each Drawer has eight recovery words from the BIP-39 English list. Milkglass shows them once. They open that Drawer when the pattern is forgotten.
Read the featureAn encrypted backup in your iCloud
Milkglass keeps an encrypted backup in your iCloud. One iPhone or iPad writes it. Restore asks before that device takes over.
Read the feature
Requires iOS 26.1 or iPadOS 26.1.