# Audit: Foxon (2023) Z32 knight-move claim, and how much freedom the route has ## Publication checked - Floe Foxon, "On the 32-Character Zodiac Cipher", Cryptology ePrint Archive, Paper 2023/982. Primary URL: https://eprint.iacr.org/2023/982 (PDF: https://eprint.iacr.org/2023/982.pdf). - Where in the paper: **Section 4.3 "Z32 Plaintext and Transposition", Figure 1(A)–(D)** ("Z32 Ciphertext (in ASCII Characters) and Possible Plaintext"), on page 8. - Copy read: eprint.iacr.org blocked automated PDF fetches (Cloudflare 403), so I read the Wayback Machine capture https://web.archive.org/web/20240415174218/https://eprint.iacr.org/2023/982.pdf. The capture is from 2024-04-15. I did not determine which ePrint revision it is, so a later revision could differ. Figure 1 is typeset text. I read it from a high-resolution render of page 8 and checked it programmatically (see below). ## Data The brief gives the Z32 rows (June 26, 1970 letter), case-sensitive, numbered 1–32 across both rows joined together: ``` pos : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 sym : C 9 J | # O k [ A M f 8 ? O R T G | X 6 F D V j % H C E L z P W 9 FigA: C 1 J I 2 O 3 4 A M 5 6 7 O R T G | X 8 F D V 9 ! H C E L ? P W 1 ``` Foxon's Fig. 1(A) uses a different ASCII alias set. Matched position by position, the mapping is a consistent bijection: every symbol maps to exactly one alias, and the two `9`s both map to `1` (`9→1, |→I, #→2, k→3, [→4, f→5, 8→6, ?→7, 6→8, j→9, %→!, z→?`). Both transcriptions therefore have the same repeat structure. There are exactly **3 repeat pairs**: **(1,26) `C`, (2,32) `9`, (6,14) `O`**. That is why a route can have at most 3 conflicts. ## The two 32-letter wordings (stated in Sec. 4.3) - W1 = `THREERADIANSANDTWELVEINCHESALONG` ("THREE RADIANS AND TWELVE INCHES ALONG") - W2 = `TWELVEINCHESALONGTHETHREERADIANS` ("TWELVE INCHES ALONG THE THREE RADIANS") Both are 32 letters, as the paper says. Only W2 is carried into Figure 1. ## Reconstructed published permutation Fig. 1(B) shifts the 15-symbol bottom row two places right in a 17-column, 2-row grid. That is the bottom row at left offset 2, occupying columns 2–16. Blanks are left at bottom columns 0 and 1. The text says the route starts "from the first character in the upper left corner" and follows "the same knight piece move as in Z340". I simulated the route starting at (row 0, col 0), stepping down 1 and right 2, wrapping both axes, for 34 visits and skipping the 2 blanks. It reproduces Fig. 1(C) exactly. Fig. 1(C) is `C X 2 V A C 7 P G I D 4 H 6 ? T J / F 3 ! 5 L R 1 1 8 O 9 M E O W`; my script asserts equality symbol by symbol. The reading order (k-th transposed symbol = Z32 position) is: ``` k : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 pos: 1 18 5 22 9 26 13 30 17 4 21 8 25 12 29 16 3 20 7 24 11 28 15 32 2 19 6 23 10 27 14 31 sym: C X # V A C ? P G | D [ H 8 z T J F k % f L R 9 9 6 O j M E O W ``` Plaintext letter k sits under the symbol at that position. Fig. 1(D) places its letters directly under Fig. 1(C), in the same layout. ## Spelling changes in the illustration Fig. 1(D) reads `TWELVTINCHESALONG` / `THETHREERADIAAS`, i.e. `TWELVTINCHESALONGTHETHREERADIAAS`. Compared with W2 there are two changes: - k=6: `E→T` ("TWELVE"→"TWELVT"). This is Z32 pos 26 `C`, which now matches pos 1 `C`=T (k=1). - k=31: `N→A` ("RADIANS"→"RADIAAS"). This is Z32 pos 14 `O`, which now matches pos 6 `O`=A (k=27). The text names the alternatives "EWELVE" (k=1) and "RNDIANS" (k=27). Each removes the same conflict from the other side. In the figure, the author chose TWELVT and RADIAAS. With those two letters changed, the published route has 0 conflicts (pair (2,32) `9` = E/E holds unchanged). With only one of the alternatives applied, it still has 1 conflict. ## Conflicts on the published route, wordings unchanged | wording | (1,26) `C` | (2,32) `9` | (6,14) `O` | conflicts | |---|---|---|---|---| | W2 | T vs E ✗ | E vs E ✓ | A vs N ✗ | **2** | | W1 | T vs R ✗ | H vs C ✗ | S vs N ✗ | **3** | | Fig. 1(D) spelling | T/T ✓ | E/E ✓ | A/A ✓ | 0 | ## Route freedom in the comparison family The family is defined by the brief. It is a comparison set and does not model what Zodiac would have done: - 2×17 grid. The top row holds positions 1–17 in columns 0–16. - The bottom row holds positions 18–32 starting at left offset o ∈ {0,1,2}. Its columns are (o..o+14), and the other 2 bottom cells are blank. - Any of the 34 start cells. - Step (down 1, right 2) or (down 1, left 2), wrapping both rows and columns, for 34 visits. Since lcm(2,17)=34, every cell is visited once. Blanks are omitted. - Results are deduplicated as complete 32-position permutations. Generated: 3×34×2 = 204 route specifications, giving **192 distinct permutations**. Each offset gives 64. The 12 duplicates are exactly the routes that start on a blank cell: each equals the route starting at the next cell (2 blanks × 2 directions × 3 offsets). Each permutation is counted once. | conflicts | W1 routes | W2 routes | |---|---|---| | 0 | 0 | 0 | | 1 | 0 | 0 | | 2 | 18 | 26 | | 3 | 174 | 166 | | total | 192 | 192 | - **Published route's rank** (rank = 1 + number of routes with strictly fewer conflicts): - W2: 2 conflicts, rank **1**, tied with 25 others (26 routes share ranks 1–26). It is among the best in this family but not uniquely so. - W1: 3 conflicts, rank **19**, tied with 173 others (ranks 19–192). - **Does any route fit a wording unchanged?** No. No route in the family gives 0 or 1 conflicts for either W1 or W2. At least one spelling change is always needed, and in fact two, since the minimum is 2 conflicts. - How the 26 two-conflict W2 routes break down: 12 at offset 0, 6 at offset 1, 8 at offset 2; 13 step right and 13 step left. The single pair each one satisfies is: (1,26)=E in 10 routes, (2,32)=E in 8, (6,14)=E in 6, (2,32)=A in 2. - For the 18 two-conflict W1 routes: 8 at offset 0, 6 at offset 1, 4 at offset 2; 9 step right and 9 step left. - Using the figure's modified spelling, the published route (offset 2, start (0,0), right) is the only route out of 192 with 0 conflicts. One route has 1 conflict (offset 2, start (0,1), left), 25 have 2 and 165 have 3. This is expected: the two changed letters were chosen against this particular route. ## Authorial choice, deduction, and what the paper leaves unspecified - **Authorial choices (stated in the paper):** - the plaintext coordinates (12, 3) and the two wordings; - offset 2, i.e. "shifting the bottom (15-character) row two places to the right", motivated by the 17/15 rows of the Z340 triangle; - starting in the upper-left corner; - the "same knight piece move as in Z340"; - the two spelling edits, with "TWELVT/EWELVE" and "RNDIANS/RADIAAS" offered as alternatives. The figure uses TWELVT and RADIAAS. - The author also states the solution is not claimed to be true. - **My deductions (from Fig. 1(C) and the simulation):** - the knight step is down 1 / right 2 with wrapping, for 34 visits, skipping the blanks; - the exact permutation above; - the letter-to-symbol alignment of Fig. 1(D) under Fig. 1(C); - the conflict counts. - **Left unspecified by the paper:** - whether wrapping, direction (right vs left), offset and start are the only options considered; - how many alternative routes and wordings were tried before this one was presented; - any count or statistical test of how often a route of this kind fits by chance; - why W1 was not illustrated. The rank and frequency figures above therefore describe only the brief's comparison family and should not be read as a significance test. ## Reproduce In Python: 1. Set `Z = "C9J|#Ok[AMf8?ORTG" + "X6FDVj%HCELzPW9"`. 2. Map grid cells: `(0,c)` → position `c+1`; `(1,c)` → position `18+((c-o) mod 17)` if that value is < 15, otherwise blank. 3. Walk 34 steps, `r=(r+1)%2`, `c=(c±2)%17`, collecting the non-blank positions into `perm`. 4. Count conflicts as `sum(pt[i]!=pt[j] for (i,j) in [(1,26),(2,32),(6,14)])`, where `pt[perm[k]] = word[k]`. 5. Deduplicate the `perm` tuples. The values above came from running exactly this; the script asserts the alias bijection and that the route reproduces Fig. 1(C).