{
  "id": 22408972,
  "title": "Designing an encrypted USB vault format without inventing any crypto",
  "url": "https://urgent.news/2026/11/28/designing-an-encrypted-usb-vault-format-without-inventing-any-crypto",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-28T17:03:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/apexiumtech/designing-an-encrypted-usb-vault-format-without-inventing-any-crypto-456n"
  },
  "original_language": null,
  "account": "The wire material describes the design of an encrypted USB vault format called GKDF (Guardikey Key Drive Format). The format uses standard cryptographic primitives such as Argon2id for password stretching, XChaCha20-Poly1305 for encryption, HKDF-SHA256 for key derivation, and BLAKE3 for hashing. The container is a fixed-size 1 MiB file consisting of a 1 MiB header and 64 KiB chunks, and it never changes in size.\n\nThe data is encrypted under a random drive master key (DMK) that is wrapped by key-encryption keys derived from various factors, including the master password, recovery key, key file, and a \"quick unlock on this computer\" secret. Each factor goes through Argon2id stretching before being combined with HKDF to create the key-encryption key.\n\nThe format avoids writing in place to prevent data corruption in case a USB stick is removed during a write operation. Instead, it uses two slot tables and two superblocks, where a save operation writes new chunks into free space, flushes, and then writes a new superblock over the older one. Interrupted saves retain the previous generation, and an incomplete superblock is ignored during authentication.\n\nThe previous draft included a Merkle tree over the chunks, but it was removed in favor of a more straightforward approach. Each reference to a chunk contains the chunk's write generation, index, key epoch, and purpose, which are all included in the AEAD associated data. This eliminates the need for a Merkle tree while still ensuring the integrity of the chunks.\n\nTo prevent unauthorized access, the current generation of the vault is anchored on the computer and optionally on a sync server using a keyed tag. Older generations can be opened in read-only mode for inspection but with a warning. The spec also includes test vectors and six questions for reviewers, encouraging independent verification of the design.",
  "summary": "We needed a way to keep an encrypted copy of a password vault on a USB stick: something you can pull out of the computer at any moment without corrupting it, that reveals as little as possible to whoever finds the stick, and that a reviewer can check without reading our code. This post walks through the design of the format we ended up with, GKDF (Guardikey Key Drive Format). The full byte-level…",
  "summary_source": "publisher",
  "key_points": [
    "GKDF format uses Argon2id, XChaCha20-Poly1305, HKDF-SHA256, and BLAKE3 for encryption and hashing",
    "Format avoids in-place writes using two slot tables and superblocks to prevent data corruption"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}