Seven classic ciphers wired in series, all over one shared 36-symbol
alphabet, abcdefghijklmnopqrstuvwxyz0123456789 (a=0 ... z=25, then 0-9
as 26-35). No keys are handed out - each lock's plaintext is the key that
opens the next one, so the whole chain unwinds mechanically once you name
each cipher correctly.
Hint
Every lock runs over the same 36-symbol alphabet. If a "letter" cipher's ciphertext contains digits, that's not noise - it's telling you the modulus is 36, not 26.
Lock 1: reading the coordinates right
13 33 31 15 42 looked at first like five separate (row, col) integers -
reading 13 as row 13, column 3 falls straight off a 6x6 grid. They're
actually two-digit tokens: tens digit is the row, ones digit is the
column, against the station grid (row 1 = abcdef, row 2 = ghijkl, ...
row 6 = 456789). That spells comet.
Pitfall
The trap that repeats through the whole chain: this is never a 26-letter
cipher. Lock 2's ciphertext R8XWTT has digits in it, which is the tell
that Vigenere here runs mod 36, not mod 26. Missing that on lock 2 means
every later stage looks wrong too, since they all build on it.
Walking the rest of the chain
| Lock | Ciphertext | Cipher | Key | Plaintext |
|---|---|---|---|---|
| 1 | 13 33 31 15 42 |
6x6 coordinate grid | none | comet |
| 2 | R8XWTT |
Vigenere mod 36 | comet |
pulsar |
| 3 | TKH0RG |
uniform shift | len of last word = 6 | nebula |
| 4 | 1f1003060d13 |
XOR hex vs key ASCII | nebula |
quasar |
| 5 | TOMREE |
columnar transposition | quasar |
meteor |
| 6 | QC120R8LCVK |
affine a*x+b mod 36 |
a=5, b=34 | singularity |
| 7 | O9LGMH3SNU0I8QHRKAMDPZMHKILP5KAX |
Vigenere mod 36 | singularity |
618a263bfbc00db79a556b497c1e532e |
Insight
Two of the keys are derived, not just handed from the previous plaintext:
- Lock 3's shift is the length of the word you just recovered:
len("pulsar") = 6. - Lock 6's affine parameters are both computed:
ais one less than lock 3's shift (a = 5), andbis the sum of the alphabet positions of lock 5's plaintextmeteor:12+4+19+4+14+17 = 70,70 mod 36 = 34. Inverting needs the modular inverse of 5 mod 36, which is 29 (5*29 = 145 = 4*36 + 1). Only multipliers coprime to 36 are invertible at all - the valid set is{1,5,7,11,13,17,19,23,25,29,31,35}, and 5 is in it, which is itself a small confirmation thata=5is the right reading.
1ALPHA = "abcdefghijklmnopqrstuvwxyz0123456789" # 36 symbols
2IDX = {c: i for i, c in enumerate(ALPHA)}
3N = 36
4GRID = ["abcdef", "ghijkl", "mnopqr", "stuvwx", "yz0123", "456789"]
5
6def vigenere_dec(ct, key):
7 ct, key = ct.lower(), key.lower()
8 return "".join(ALPHA[(IDX[c] - IDX[key[i % len(key)]]) % N]
9 for i, c in enumerate(ct))
10
11def shift_dec(ct, s):
12 return "".join(ALPHA[(IDX[c] - s) % N] for c in ct.lower())
13
14def xor_dec(hexct, key):
15 kb = key.encode()
16 d = bytes.fromhex(hexct)
17 return bytes(b ^ kb[i % len(kb)] for i, b in enumerate(d)).decode()
18
19def coltrans_dec(ct, keyword):
20 ncols = len(keyword)
21 nrows = len(ct) // ncols
22 order = sorted(range(ncols), key=lambda i: (keyword[i], i))
23 cols, p = [""] * ncols, 0
24 for col in order:
25 cols[col] = ct[p:p + nrows]
26 p += nrows
27 return "".join(cols[c][r] for r in range(nrows) for c in range(ncols)).lower()
28
29def affine_dec(ct, a, b):
30 a_inv = pow(a, -1, N)
31 return "".join(ALPHA[(a_inv * (IDX[c] - b)) % N] for c in ct.lower())
32
33k1 = "".join(GRID[int(t)//10 - 1][int(t)%10 - 1] for t in "13 33 31 15 42".split())
34k2 = vigenere_dec("R8XWTT", k1)
35k3 = shift_dec("TKH0RG", len(k2))
36k4 = xor_dec("1f1003060d13", k3)
37k5 = coltrans_dec("TOMREE", k4)
38k6 = affine_dec("QC120R8LCVK", len(k2) - 1, sum(IDX[c] for c in k5) % N)
39body = vigenere_dec("O9LGMH3SNU0I8QHRKAMDPZMHKILP5KAX", k6)
40
41print(k1, k2, k3, k4, k5, k6)
42print("L3m0n{%s}" % body)
comet pulsar nebula quasar meteor singularity
L3m0n{618a263bfbc00db79a556b497c1e532e}
Note
A deterministic chain can still land on a wrong-but-plausible token, so
it's worth checking the decode is the intended one, not a lucky guess.
Re-encrypting each recovered plaintext forward reproduces every published
ciphertext byte for byte. More tellingly, the stages are pinned: lock 3
only yields a real word at shift 6 (nebula) - shift 5 gives ofcvmb,
shift 7 gives mdatk9, pure noise. Lock 6 only yields a word at
(a=5, b=34) - b=33 gives lbg9ne3kbmr, b=35 gives zpun1shyp05.
Six independent ciphers that each collapse to garbage off the correct key
and then land cleanly on readable astronomy words and a valid 32-hex
flag body is not something a wrong decode does by accident.