Challenges › Cryptography

Twice the Same Key

easy · 100 XP · flag · free · solves: 3

Alice was racing a deadline when she encrypted the report, so she built her keystream from two small shift registers and called it secure. Every message she sent began with the same fixed header, the same polite opening line. Eve, listening patiently on the wire, collected the ciphertext and noticed that known header sitting at the start of it. A keystream that can be partly predicted is a keystream that can be rebuilt. The registers are public, only their starting seeds are secret. Can you recover the seeds and read the rest of Alice's message?

two LFSRs (16-bit and 17-bit, standard maximal-length tap positions) combined via plain XOR to form a keystream, encrypting a flag that's preceded by a fixed known plaintext header (the crib). Ship: ciphertext, the LFSR degree/taps (public — only seeds are secret), and the known header string.

Tags: Cryptography

Try next