π© Challenge Overview
- Platform/Event: Google CTF 2025
- Difficulty: Easy
- Points: 100
- Solves: 610
- Category: Crypto
- Tags: RSA, Symmetric Crypto, Small Exponent, Cube Root
π Description
RSA cryptosystem configured with a small public exponent (e=3). Perform a cube root attack on the ciphertext to decrypt the message without factoring N.
π‘ Solution / Approach
-
Identify weak parameters: Public exponent
e = 3and ciphertextcis smaller than moduloN(meaningm^3 < N). -
The modulo arithmetic doesnβt wrap around, so
c = m^3 mod Nsimplifies toc = m^3. -
Calculate the exact integer cube root of
cin Python to getmdirectly:
import gmpy2
from crypto.util.number import long_to_bytes
c = 12345... # ciphertext
m = gmpy2.iroot(c, 3)[0]
print(long_to_bytes(int(m)))