The ZI² format
A sealed edition is a file you keep. Here is exactly what is inside it, so you can open it in any browser today and in any program you care to write tomorrow.
Layout of a .zi2 file
| Bytes | Field | Meaning |
|---|---|---|
| 0 to 3 | ZI2 then 0x01 | Marker and format version |
| 4 to 19 | 16 bytes | Random salt for the key derivation |
| 20 to 31 | 12 bytes | Random nonce for AES-256-GCM |
| 32 to end | ciphertext and tag | AES-256-GCM output: the compressed book plus a 16-byte integrity tag |
The key
The key is PBKDF2-HMAC-SHA256 over your unlock phrase with the salt, 200,000 rounds, 32 bytes. Nothing else is needed: no server, no account, no activation. The phrase sits on your license page.
What decrypts
Gzip, then one JSON document: the book's title, subtitle, author, edition, rights line, the cover as an image data URL, and the chapters as plain HTML with figures embedded as data URLs.
{
"title": "...", "subtitle": "...", "author": "...",
"edition": "...", "rights": "...",
"cover": "data:image/png;base64,...",
"chapters": [{"title": "...", "html": "..."}]
}The promise
Because the layout is published, a sealed edition never depends on this site staying up. The browser reader here is one implementation; your license page keeps the file, the phrase and a fingerprint you can verify at any time.