Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Key files and partner files

CLI key file

This format never leaves the computer it is on, except as a backup made with quitlock key export. The phone never sees it; the phone stores public keys only.

A key file is exactly 136 bytes:

OffsetSizeField
04Magic: ASCII QLK1
44Argon2id memory cost in KiB
84Argon2id iterations
124Argon2id parallelism
1616Salt
3224XChaCha20-Poly1305 nonce
5632Ed25519 public key
8848Ciphertext: the 32-byte Ed25519 seed, encrypted, with its 16-byte tag
  • The encryption key is 32 bytes from Argon2id (version 0x13) over the passphrase and salt, with the parameters in the header.
  • The first 88 bytes (the whole header) are the associated data, so changing any header field makes decryption fail.
  • New files use 64 MiB, 3 iterations, parallelism 1. Because the parameters are stored per file, they can be raised later without a format change. A reader refuses parameters above 4 GiB, 64 iterations or parallelism 16.
  • The public key is readable without the passphrase, so quitlock key list can show key IDs.
  • The default file extension is .qlkey.
  • A key file may be rebuilt from its recovery phrase: the 32-byte seed as 24 words of the BIP-39 English word list, with BIP-39’s 8-bit checksum. The words encode the seed itself; BIP-39’s own seed derivation is not used.

Partner invite and reply files

These carry a remote partner’s key to the owner (Becoming a partner). Neither holds a secret, and neither is trusted: the phone checks the bundle in full, and the two people compare fingerprints.

Invite. Written by quitlock partner invite; the default name is quitlock-invite-<time>.json. One canonical JSON object (Canonical JSON) followed by a newline:

KeyTypeMeaning
quitlock_inviteintegerFormat version, 1. A reader refuses any other.
device_idstringThe phone’s device ID, 32 hex characters.
owner_keysarray of stringsThe owner public keys enrolled when the invite was made, 64 hex characters each, 1 to 8 of them, so the partner can read out their fingerprints.
createdintegerUnix milliseconds.
expiresintegerUnix milliseconds; 7 days after created. A partner’s CLI refuses an expired invite.

Reply. Written by quitlock partner join <invite>; the default name is quitlock-partner-reply-<time>.qlb. It is an ordinary bundle (Envelope): a key_add with role partner for the invite’s device, signed by the key it adds and by nothing else. It expires at the invite’s expiry or 7 days after it was made, whichever is first. quitlock partner accept checks that it is exactly that, then adds an owner signature and sends it; the phone applies it at once (Who may do what).

Fingerprint. The form people compare, here and on the phone: the first 8 bytes of the key ID in upper-case hex, in groups of four, for example A1B2 C3D4 E5F6 0718.