{
  "schemaVersion": 1,
  "updated": "2026-10-29",
  "regenerate": "node --experimental-strip-types scripts/enigma-verification.ts",
  "sources": {
    "technical": "https://www.ciphermachinesandcryptology.com/en/enigmatech.htm",
    "vectors": "https://github.com/gremmie/enigma/blob/master/enigma/tests/test_enigma.py",
    "procedure": "https://py-enigma.readthedocs.io/en/latest/guide.html#example-communication-procedure",
    "scharnhorst": "https://www.bytereef.org/m4-project-scharnhorst-break.html",
    "working": "https://www.cryptomuseum.com/crypto/enigma/working.htm",
    "history": "https://www.cryptomuseum.com/crypto/enigma/hist.htm",
    "bombe": "https://www.cryptomuseum.com/crypto/bombe/index.htm"
  },
  "conventions": "Rotor order, rings and windows are left to right. Ring A = 01. Step before substitution. Only ASCII letters step; punctuation and case are retained. Each run resets to its supplied start positions.",
  "verification": [
    {
      "id": "standard",
      "test": "Five A letters",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "I",
          "II",
          "III"
        ],
        "rings": "AAA",
        "positions": "AAA",
        "plugboard": ""
      },
      "input": "AAAAA",
      "expected": "BDZGO",
      "source": "https://github.com/gremmie/enigma/blob/master/enigma/tests/test_enigma.py",
      "note": "Published basic vector; step before the electrical path.",
      "actual": "BDZGO",
      "finalPositions": "AAF",
      "pass": true
    },
    {
      "id": "message-key",
      "test": "Reference message key",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "II",
          "IV",
          "V"
        ],
        "rings": "BUL",
        "positions": "WXC",
        "plugboard": "AV BS CG DL FU HZ IN KM OW RX"
      },
      "input": "KCH",
      "expected": "BLA",
      "source": "https://py-enigma.readthedocs.io/en/latest/guide.html#example-communication-procedure",
      "note": "Decrypt the indicator, then reset to BLA for the body.",
      "actual": "BLA",
      "finalPositions": "WXF",
      "pass": true
    },
    {
      "id": "reference-body",
      "test": "Reference message body",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "II",
          "IV",
          "V"
        ],
        "rings": "BUL",
        "positions": "BLA",
        "plugboard": "AV BS CG DL FU HZ IN KM OW RX"
      },
      "input": "NIBLFMYMLLUFWCASCSSNVHAZ",
      "expected": "THEXRUSSIANSXAREXCOMINGX",
      "source": "https://py-enigma.readthedocs.io/en/latest/guide.html#example-communication-procedure",
      "note": "Published teaching example with non-A rings and ten plugboard pairs.",
      "actual": "THEXRUSSIANSXAREXCOMINGX",
      "finalPositions": "BLY",
      "pass": true
    },
    {
      "id": "scharnhorst",
      "test": "Scharnhorst message excerpt",
      "settings": {
        "model": "M3",
        "reflector": "B",
        "rotors": [
          "III",
          "VI",
          "VIII"
        ],
        "rings": "AHM",
        "positions": "UZV",
        "plugboard": "AN EZ HK IJ LR MQ OT PV SW UX"
      },
      "input": "YKAENZAPMSCHZBFOCUVM",
      "expected": "STEUEREJTANAFJORDJAN",
      "source": "https://www.bytereef.org/m4-project-scharnhorst-break.html",
      "note": "First 20 letters, using the source’s adjusted rings and message key. Indicator groups already removed.",
      "actual": "STEUEREJTANAFJORDJAN",
      "finalPositions": "VCP",
      "pass": true
    },
    {
      "id": "default",
      "test": "Default training message",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "I",
          "II",
          "III"
        ],
        "rings": "AAA",
        "positions": "AAA",
        "plugboard": "AV BS CG DL FU HZ IN KM OW RX"
      },
      "input": "ATTACK AT DAWN",
      "expected": "XHZYUG BX VKDR",
      "actual": "XHZYUG BX VKDR",
      "finalPositions": "AAM",
      "pass": true,
      "source": "",
      "note": "Default training settings with ten plugboard pairs."
    },
    {
      "id": "double-step",
      "test": "II / III double stepping",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "I",
          "II",
          "III"
        ],
        "rings": "AAA",
        "positions": "ADU",
        "plugboard": ""
      },
      "input": "AAA",
      "expected": "ADU → ADV → AEW → BFX",
      "actual": "ADU → ADV → AEW → BFX",
      "finalPositions": "BFX",
      "pass": true,
      "source": "https://www.ciphermachinesandcryptology.com/en/enigmatech.htm",
      "note": "Window transitions derived from the published E and V turnover positions."
    },
    {
      "id": "published-step",
      "test": "Published stepping sequence",
      "settings": {
        "model": "Enigma I",
        "reflector": "B",
        "rotors": [
          "III",
          "II",
          "I"
        ],
        "rings": "AAA",
        "positions": "KDO",
        "plugboard": ""
      },
      "input": "AAAAAA",
      "expected": "KDO → KDP → KDQ → KER → LFS → LFT → LFU",
      "actual": "KDO → KDP → KDQ → KER → LFS → LFT → LFU",
      "finalPositions": "LFU",
      "pass": true,
      "source": "https://www.ciphermachinesandcryptology.com/en/enigmatech.htm",
      "note": "Rijmenants’ published III–II–I sequence."
    }
  ],
  "doubleStepping": {
    "settings": {
      "model": "Enigma I",
      "reflector": "B",
      "rotors": [
        "I",
        "II",
        "III"
      ],
      "rings": "AAA",
      "positions": "ADU",
      "plugboard": ""
    },
    "expectedSequence": [
      "ADU",
      "ADV",
      "AEW",
      "BFX"
    ],
    "actualSequence": [
      "ADU",
      "ADV",
      "AEW",
      "BFX"
    ],
    "steps": [
      {
        "press": 1,
        "before": "ADU",
        "after": "ADV",
        "middleAtNotch": false,
        "rightAtNotch": false,
        "input": "A",
        "output": "E",
        "reason": "Neither turnover notch is engaged: only the right rotor advances."
      },
      {
        "press": 2,
        "before": "ADV",
        "after": "AEW",
        "middleAtNotch": false,
        "rightAtNotch": true,
        "input": "A",
        "output": "Q",
        "reason": "Right III is at V: middle advances; right advances."
      },
      {
        "press": 3,
        "before": "AEW",
        "after": "BFX",
        "middleAtNotch": true,
        "rightAtNotch": false,
        "input": "A",
        "output": "I",
        "reason": "Middle II is at E: left and middle advance; right advances."
      }
    ]
  },
  "properties": {
    "generator": "xorshift32; unsigned output modulo 26 for letters; seed shared by settings and messages",
    "seed": 1162758471,
    "seedHex": "0x454e4947",
    "runs": 20,
    "lettersPerRun": 500,
    "totalLetters": 10000,
    "selfEncryptions": 0,
    "successfulRoundTrips": 20,
    "recoveredLetters": 10000,
    "recoveryPercent": 100,
    "scope": "Deterministic sample across both models, both wide reflectors, varied rings, starts, rotor orders and 0–13 plug pairs. This measures the implementation on these inputs; it is not a security rating.",
    "records": [
      {
        "run": 1,
        "settings": {
          "model": "Enigma I",
          "reflector": "B",
          "rotors": [
            "III",
            "IV",
            "V"
          ],
          "rings": "HRV",
          "positions": "RQO",
          "plugboard": ""
        },
        "letters": 500,
        "inputSha256": "5d3a6c39090587b5e69dc1ade2608f73894d32705763ee26aac586a43f0ffef0",
        "outputSha256": "3befb5f1deb7b0ec6d5df96b5485c40d9c42c2852c1dd2f9cceb2c7de30ed2fc",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 2,
        "settings": {
          "model": "Enigma I",
          "reflector": "C",
          "rotors": [
            "II",
            "IV",
            "III"
          ],
          "rings": "ULP",
          "positions": "WOF",
          "plugboard": "LK"
        },
        "letters": 500,
        "inputSha256": "1ceb8422ab6f4d4116075190a805dd4275a1200f7c4992e2bfefa48aa407975d",
        "outputSha256": "faf017f2037c837e91e70d9e61ea3fde83b9b945f91e2280f3be19937966210d",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 3,
        "settings": {
          "model": "Enigma I",
          "reflector": "B",
          "rotors": [
            "II",
            "I",
            "V"
          ],
          "rings": "FGV",
          "positions": "JUO",
          "plugboard": "ZG KV"
        },
        "letters": 500,
        "inputSha256": "5a4c3d374fd7d838e66a89c98ba41564dcd5e629926f009230a7ca964b5bb90e",
        "outputSha256": "a8c95a1a2f051f769b16709257d2d9bb34dee9004ac88cb5412bd5cd651643b6",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 4,
        "settings": {
          "model": "Enigma I",
          "reflector": "C",
          "rotors": [
            "I",
            "V",
            "IV"
          ],
          "rings": "YDL",
          "positions": "UBH",
          "plugboard": "SR KN LW"
        },
        "letters": 500,
        "inputSha256": "b9c034b51db8a6e74273b99309986eec2967abab9e4d61688945810a05958616",
        "outputSha256": "65152b3266438a08f3af800b994a265380157ab77b1d0a3d4f1d7876d96aa974",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 5,
        "settings": {
          "model": "Enigma I",
          "reflector": "B",
          "rotors": [
            "V",
            "III",
            "II"
          ],
          "rings": "LQD",
          "positions": "CLA",
          "plugboard": "XU YB PN OA"
        },
        "letters": 500,
        "inputSha256": "60927dfeb9748be93820c9359a7a9d5e98297aa59a8d3968b0ff6cbdead2b6bb",
        "outputSha256": "d3075837f7088a974f3b1e7c88b714ceb407e555e6caf5583fdb238fb14a619e",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 6,
        "settings": {
          "model": "Enigma I",
          "reflector": "C",
          "rotors": [
            "I",
            "IV",
            "V"
          ],
          "rings": "OJG",
          "positions": "JZO",
          "plugboard": "DP IU RH CV JW"
        },
        "letters": 500,
        "inputSha256": "62871acf6086701042f1b5020b78ba3bbaaf555ef15c1e5f57b58fed92b3173e",
        "outputSha256": "d8fdf39fa381a141ecebd6831c06b1319e28fe021371346f244580fabae748da",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 7,
        "settings": {
          "model": "Enigma I",
          "reflector": "B",
          "rotors": [
            "IV",
            "I",
            "V"
          ],
          "rings": "EJG",
          "positions": "PRT",
          "plugboard": "ZB EP GC IU RW LF"
        },
        "letters": 500,
        "inputSha256": "23eaabc6933e298ca10c75e1f99961332d1d1f82b82d841c3e40660ad89773fd",
        "outputSha256": "33a74bd3fd9c56cc03c1c54b7afa51fc9cff23d5e0876aa00c63cc68edc45288",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 8,
        "settings": {
          "model": "Enigma I",
          "reflector": "C",
          "rotors": [
            "II",
            "I",
            "IV"
          ],
          "rings": "XNO",
          "positions": "EYB",
          "plugboard": "DQ YG UN EM BJ CF VA"
        },
        "letters": 500,
        "inputSha256": "dee7315843055ca583eb6fb0f171a5eb211e0df3260b945c78e5b57fec0441fd",
        "outputSha256": "fcabcfcd89cbfd6c98f810f9eda926c4bab786c402e01a7eab5d4528beaba4ad",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 9,
        "settings": {
          "model": "Enigma I",
          "reflector": "B",
          "rotors": [
            "III",
            "I",
            "IV"
          ],
          "rings": "JHF",
          "positions": "ZKX",
          "plugboard": "MB XT GA PK NL FE ZU QW"
        },
        "letters": 500,
        "inputSha256": "28355010dda849b7b9a0b8e46bc03ada7b3e078eaa6853b9939570d9a396c945",
        "outputSha256": "3283c837adf1d82093c2cbb686f1271c2333bc57b5912ba07f661f22038d19f5",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 10,
        "settings": {
          "model": "Enigma I",
          "reflector": "C",
          "rotors": [
            "V",
            "II",
            "III"
          ],
          "rings": "DIW",
          "positions": "LZB",
          "plugboard": "XW QN RP OH KY GL IZ TD BM"
        },
        "letters": 500,
        "inputSha256": "71ac785941a97e15527751628146203130ffd78bbe9a93bbc9e1642519ab5091",
        "outputSha256": "c416a13ae6488bb14b75d0440bc785f9542dbad57df4944de71aa056055f4453",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 11,
        "settings": {
          "model": "M3",
          "reflector": "B",
          "rotors": [
            "III",
            "II",
            "I"
          ],
          "rings": "DVO",
          "positions": "FAR",
          "plugboard": "VL BK MX DN CT ZS WE JP OF RA"
        },
        "letters": 500,
        "inputSha256": "7bb6abffaea52a2fdf1c234d651eb82a40df72f6edb14137ac04f43df5f5ed35",
        "outputSha256": "1ae3845e1fb7eedc7a0649ada21918282090c8fe0e1365147975c2e5ffb43914",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 12,
        "settings": {
          "model": "M3",
          "reflector": "C",
          "rotors": [
            "V",
            "VI",
            "IV"
          ],
          "rings": "GIY",
          "positions": "IMX",
          "plugboard": "TQ EI VP LN BO ZS FU DM RC AG YJ"
        },
        "letters": 500,
        "inputSha256": "42aed0edf8c16841dd20c0ebfc17fa19a5e2dc6b3a806d40f3ba187b069686e5",
        "outputSha256": "6cf293685e8a0c434134645901018aa779705b625be2b288969c6baa09f6b6b3",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 13,
        "settings": {
          "model": "M3",
          "reflector": "B",
          "rotors": [
            "IV",
            "III",
            "V"
          ],
          "rings": "DET",
          "positions": "ZTF",
          "plugboard": "HJ EC PR BU FG AM YO SL IW ZQ KX NT"
        },
        "letters": 500,
        "inputSha256": "749a47b3bde116e990286091f6d19bdb404c4121a86cc46198012d5917a492c0",
        "outputSha256": "a986ec5555c32fbc4dc5f54836358fc631bdb544d7c6d64435c2facca08adbca",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 14,
        "settings": {
          "model": "M3",
          "reflector": "C",
          "rotors": [
            "VI",
            "V",
            "II"
          ],
          "rings": "WWP",
          "positions": "PRV",
          "plugboard": "GU QN SL VK WR DM XC BA OT PZ FE YI HJ"
        },
        "letters": 500,
        "inputSha256": "80f704a016cc6beb592bf3c4d3b5a22244bb10220e82d926932eed9a25373133",
        "outputSha256": "2f4afdf0321b2f10c5e8d739b08ee6c6025236c1f4f9386a4c974b5d6dd1fa2a",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 15,
        "settings": {
          "model": "M3",
          "reflector": "B",
          "rotors": [
            "I",
            "VI",
            "IV"
          ],
          "rings": "JGX",
          "positions": "BDO",
          "plugboard": ""
        },
        "letters": 500,
        "inputSha256": "c1ebbefe12d4512b91ffd951d6af2a6ed0d40bc79b94f98d98511968a36238be",
        "outputSha256": "144d58b8e897866dd5a5e72d0ffb3eb7f17e34cc8e978321b519254656602f19",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 16,
        "settings": {
          "model": "M3",
          "reflector": "C",
          "rotors": [
            "V",
            "IV",
            "VII"
          ],
          "rings": "VKR",
          "positions": "JAW",
          "plugboard": "LX"
        },
        "letters": 500,
        "inputSha256": "7906d66b92a155f7788f8b90e4256685fdafef070bb8e6664c534875055ab08d",
        "outputSha256": "07533d584e53cf9bc19f78c079e303cd5bcc9b0feb588edd4c7dcc6c9ff861d4",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 17,
        "settings": {
          "model": "M3",
          "reflector": "B",
          "rotors": [
            "VIII",
            "I",
            "III"
          ],
          "rings": "KZZ",
          "positions": "NHT",
          "plugboard": "YW KQ"
        },
        "letters": 500,
        "inputSha256": "baf6e94169166d52f034a71b3c237378833a5ac7bbf70775e81f6346a0f42677",
        "outputSha256": "27bcaef4f9c600928c7be70016e88adfa5e085464cac72b94b22a210460b161c",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 18,
        "settings": {
          "model": "M3",
          "reflector": "C",
          "rotors": [
            "IV",
            "I",
            "III"
          ],
          "rings": "AMV",
          "positions": "ZXS",
          "plugboard": "UE XQ HS"
        },
        "letters": 500,
        "inputSha256": "5b80ee6f0e738b4661bd051b6499fca3b7b6d954732af9185e7567c03624cede",
        "outputSha256": "b9f40b14b9a731f717871980cff6f4f9949a3ee50565d50c639a94dac3d8b3d3",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 19,
        "settings": {
          "model": "M3",
          "reflector": "B",
          "rotors": [
            "II",
            "VI",
            "VIII"
          ],
          "rings": "NAO",
          "positions": "SVX",
          "plugboard": "XF EU MQ NO"
        },
        "letters": 500,
        "inputSha256": "bd0a7ddf50d51a9f9cc910795f1944dbcb2ceb61c7e1fa89edb2fd16b70048b5",
        "outputSha256": "38715a498098cc7c2921d86f280617a507a91de3ac90b621698b6146e081bcf7",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      },
      {
        "run": 20,
        "settings": {
          "model": "M3",
          "reflector": "C",
          "rotors": [
            "VI",
            "IV",
            "V"
          ],
          "rings": "BUW",
          "positions": "UPA",
          "plugboard": "DH OY UW IS CQ"
        },
        "letters": 500,
        "inputSha256": "184dbad4a795b6f796d4850fcdbd4afb2c220ad32367dcf6bce182c497b1e9b5",
        "outputSha256": "e6d6a0407fa9c42a251158cbbeaadfbf7da027a11a5b6e84a9f254e2d0f34195",
        "selfEncryptions": 0,
        "recoveredLetters": 500,
        "roundTrip": true
      }
    ]
  }
}
