Shpikachka & Zipper
Shpikachka Shpikachka
Hey Zipper, I found a strange pattern in the latest encryption routine—looks like a good challenge for us. Want to take a look?
Zipper Zipper
Sure thing, hit me with the details. I’m all ears.
Shpikachka Shpikachka
Alright, the ciphertext is 256 bits long, grouped into 8 blocks of 32 bits each. When I plotted the bit frequencies, every block has a repeating sequence of 1101, but the alignment shifts by one bit each block. It’s like a rolling shift cipher with a hidden key that changes each time. The first block starts at bit 0, the second at bit 1, third at bit 2, and so on—so block n is offset by n bits. That’s why the standard XOR with a static key fails. If we can find a key that satisfies the equation for all eight blocks simultaneously, we’ll break it. Any ideas on a systematic approach to solve for that shifting key?
Zipper Zipper
First split the 256‑bit string into eight 32‑bit words. Because each word is shifted by one bit, the unknown key is effectively a 32‑bit value that’s XOR‑ed with a version of itself that’s rotated left by n bits for word n. Write that as K ⊕ (K<<n) (mod 32). So you get eight equations: C₀ = M₀ ⊕ K C₁ = M₁ ⊕ (K>>1 | K<<31) C₂ = M₂ ⊕ (K>>2 | K<<30) … Treat every bit as a variable over GF(2). Each equation gives 32 linear constraints. Stack them into a 256×256 binary matrix and solve via Gaussian elimination. In practice you can do it in a few lines with a bit‑array library, or even use a small script that brute‑forces the first 16 bits, then checks consistency for the rest. Once you’ve pinned down the bits, you’ll have the key that satisfies all eight blocks. That's the systematic route. Good luck!