Hastad broadcast attack
This time e = 3, but the message is long — m³ is larger than each modulus, so a simple cube root will not work. However, a single message was sent to three different receivers, meaning we have three moduli and three ciphertexts.
Hastad's attack (1985) relies on the Chinese Remainder Theorem (CRT). We have three equations: x ≡ ci (mod ni), where x = m³. Since the moduli are pairwise coprime, CRT gives a unique solution — m³ mod (n1n2n3).
The main trick: since m < ni, m³ < n1n2n3. Therefore, the CRT result is the unreduced m³ itself. Now if we take the integer cube root — the message is ready.
The three public keys and three ciphertexts are in the uzatish.txt file: n1, n2, n3, e, c1, c2, c3. The recovered bytes directly give the flag.
General rule: if there are e or more receivers, the identical unpadded message can always be decrypted.