{
  "schemaVersion": 1,
  "generatedAt": "2026-10-21T11:21:25.699785+00:00",
  "measurement": "Native cryptsetup header/key-access observations on disposable regular files",
  "environment": {
    "cryptsetup": "cryptsetup 2.7.0 flags: UDEV BLKID KEYRING FIPS KERNEL_CAPI HW_OPAL",
    "binarySha256": "5400fa036759e260dfefff9e1ce3281cf03f694003a6aed8b3a9cbb45f449fca",
    "python": "3.12.3",
    "kernel": "6.8.0-146-generic"
  },
  "repetitions": 2,
  "parameters": {
    "imageBytes": 33554432,
    "cipher": "aes-xts-plain64",
    "keyBits": 256,
    "sectorBytes": 512,
    "pbkdf": "pbkdf2",
    "pbkdfIterations": 1000,
    "credentialPolicy": "Public synthetic fixtures; NOT production settings",
    "unchangedRegion": "Final 1048576 bytes of each regular image, not the entire payload"
  },
  "limitations": [
    "No mounted mapping, encrypted payload read, filesystem restore, power loss or media erasure tested.",
    "A passing key check identifies the supplied header's key, not the intended data region.",
    "No reencryption or active-mapping revocation tested.",
    "Selected deterministic controls are not a random sample or a failure-rate estimate.",
    "Randomly generated volume keys make hashes differ across repetitions; compare relations, not hash constants."
  ],
  "observations": [
    {
      "format": "luks1",
      "repetition": 1,
      "state": "initial",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "initial",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "initial",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "old",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "new",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "old",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "new",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "wrong",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "bd87bb3369292609841e9d92ca5776fee6424539b3b50000272bab7a3a95f85d",
      "keyIdentity": "unrelated",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "b908e1662d5f162d9bb4e84314896262e39616e706accd672733a153ea5b8d83",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "initial",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "initial",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "initial",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "old",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "new",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "old",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "new",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "wrong",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "30069f8f5a9f407f5929fd2267087c718e27a110215e0bd8f8b6515efa6fc0d1",
      "keyIdentity": "unrelated",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "1039c1d5071e9be4b341d9c8bdcbab7a3a41d14933ea8b210bce3b877750afd2",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks1",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "initial",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "initial",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "initial",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-before-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "old",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "new",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "old",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "new",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-erase",
      "credential": "wrong",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "backup-after-erase",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "live-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "5d9733ea7086b79a1c83bcaaddf133f3624b4b5e96ab3e5690eea9fc3920b32c",
      "keyIdentity": "unrelated",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-before-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "c03a2c52afb84bc7530f2fb90615133c2d8aa235004c8da01ba12c09e978155b",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 1,
      "state": "unrelated-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "initial",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "initial",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "initial",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-before-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "old",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "new",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-change",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "old",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "new",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-erase",
      "credential": "wrong",
      "returncode": 1,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "backup-after-erase",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "live-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "695c1216a2941f3ee70644d7bc0445e2b9029b08c530aafe9cf9ce8d6e066e04",
      "keyIdentity": "unrelated",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-before-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "old",
      "returncode": 0,
      "accepted": true,
      "recoveredKeySha256": "4e62871c0014d6cacf5df48f6cef6c96e89f86872e3abd9dbcccbe0734d911e4",
      "keyIdentity": "original",
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "new",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    },
    {
      "format": "luks2",
      "repetition": 2,
      "state": "unrelated-after-restore",
      "credential": "wrong",
      "returncode": 2,
      "accepted": false,
      "recoveredKeySha256": null,
      "keyIdentity": null,
      "dataRegionUnchanged": true
    }
  ],
  "commands": [
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks1",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks1",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderBackup",
        "--header-backup-file",
        "<fixture>/luks1-1.header",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksChangeKey",
        "--batch-mode",
        "--key-slot",
        "0",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img",
        "<fixture>/new.key"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/new.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksErase",
        "--batch-mode",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks1-1.header",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks1-1.header",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks1",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks1",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderBackup",
        "--header-backup-file",
        "<fixture>/luks1-2.header",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksChangeKey",
        "--batch-mode",
        "--key-slot",
        "0",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img",
        "<fixture>/new.key"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/new.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksErase",
        "--batch-mode",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks1-2.header",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks1-2.header",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks1",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks1-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks2",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks2",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderBackup",
        "--header-backup-file",
        "<fixture>/luks2-1.header",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksChangeKey",
        "--batch-mode",
        "--key-slot",
        "0",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img",
        "<fixture>/new.key"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/new.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksErase",
        "--batch-mode",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks2-1.header",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks2-1.header",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-1-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks2",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksFormat",
        "--batch-mode",
        "--type",
        "luks2",
        "--cipher",
        "aes-xts-plain64",
        "--key-size",
        "256",
        "--sector-size",
        "512",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-slot",
        "0",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderBackup",
        "--header-backup-file",
        "<fixture>/luks2-2.header",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksChangeKey",
        "--batch-mode",
        "--key-slot",
        "0",
        "--pbkdf",
        "pbkdf2",
        "--pbkdf-force-iterations",
        "1000",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img",
        "<fixture>/new.key"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/new.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksErase",
        "--batch-mode",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 1,
      "stderr": "No usable keyslot is available.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.header"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks2-2.header",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "luksHeaderRestore",
        "--batch-mode",
        "--header-backup-file",
        "<fixture>/luks2-2.header",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/old.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "luksDump",
        "--batch-mode",
        "--dump-volume-key",
        "--key-file",
        "<fixture>/old.key",
        "--volume-key-file",
        "<fixture>/recovered-key.bin",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 0,
      "stderr": ""
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/new.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    },
    {
      "argv": [
        "open",
        "--type",
        "luks2",
        "--test-passphrase",
        "--key-file",
        "<fixture>/wrong.key",
        "<fixture>/luks2-2-unrelated.img"
      ],
      "returncode": 2,
      "stderr": "No key available with this passphrase.\n"
    }
  ]
}
