CSCTF 2026 · Crypto · 385 pts
Watchword.
Three AES-GCM messages reuse the same nonce — textbook grounds for recovering GCM's authentication key via its own polynomial structure.
| Event | CSCTF 2026, Operation Dawn (online jeopardy) |
|---|---|
| Category | Crypto |
| Points | 385 |
| Status | Solved during the event |
| Target | three dispatches, offline |
TL;DR. GCM's authentication relies on a per-message nonce never repeating; reusing it across three dispatches exposes GHASH's authentication key `H` to recovery via polynomial algebra over GF(2^128), which in turn reveals the AES-CTR keystream block E_K(J0) shared by all three messages — and that block is directly usable as a key to decrypt the sealed order.
Challenge
Decrypt a sealed master order, given three AES-GCM dispatches that all reused the same nonce.
Solution
GCM authenticates ciphertext with GHASH, a polynomial evaluated over GF(2¹²⁸) using a secret value H derived from the encryption key. GHASH's "forbidden attack" exploits exactly this situation: when the same nonce (and therefore the same H and the same keystream block E_K(J0)) is reused across multiple messages, the differences between their authentication tags become polynomial equations in the single unknown H.
Implementing GHASH's field arithmetic directly (bit-reflected representation, reduction polynomial R = 0xe1 << 120, multiplicative identity 1 << 127) and solving the pairwise tag-difference equations across the three dispatches as a system of linear equations over GF(2) recovers H. The correct value of H is confirmed by a strong internal check: computing E_K(J0) independently from each of the three tag equations gives the identical value every time (0x66b18782c578d8b27ec249a6298dfeb2), which would only happen by chance if H were wrong.
That shared keystream block E_K(J0) is directly usable as an AES-128 key: decrypting the sealed master order under AES-128-CTR with a zero IV, using E_K(J0) as the key, gives the flag cleanly.
Flag
CSCTF{watchword_2005b4d082c8f06019960d36c5131e783d4bc532}What I took from it
- AES-GCM's security collapses specifically and catastrophically on nonce reuse — the forbidden attack is a direct consequence of GHASH's polynomial structure, and recovering its authentication key from as few as two messages with the same nonce is well-documented, not exotic.