Challenges › Cryptography

Recover the Broadcast

medium · 100 XP · flag · free · solves: 0

The harbor office sent one bulletin to three recipients: dock, ferry and warehouse. It used textbook RSA with e = 3 and no padding. You captured all three ciphertexts.

captures.json holds each recipient's modulus n and ciphertext c as decimal strings. The same message integer m went to every recipient, and m is smaller than each modulus. The message m is UTF-8 text read as one big-endian integer. One modulus alone is too small for a plain cube root: m^3 is larger than each n.

  1. Check that the three moduli are pairwise coprime with the GCD.
  2. Combine the three ciphertexts with the Chinese remainder theorem. The result is m^3 modulo the product of the moduli.
  3. Take the exact integer cube root and convert it to bytes.
  4. Check the full recovered message with python3 verify.py "FULL MESSAGE TEXT". It compares the message with all three captures.

helpers.py has an integer root function and byte conversion functions. Write the CRT step yourself.

The bulletin ends with a reply code. Submit CSEMA{...} with the recovered reply code in place of the dots.

Tags: learn

Try next