Challenges
Multi-prime modulus
Cryptography
Medium
Special modulus
Solves: 8
Multi-prime modulus
Author: CyberSamSU
Points
45
The modulus does not always consist of two prime numbers. Sometimes multi-prime RSA is used to increase speed: n = p1 · p2 · … · pk.
In this case, Euler's totient function takes the form of a product: φ(n) = (p1−1)(p2−1)…(pk−1). The rest is as usual: d = e−1 mod φ(n), m = cd mod n.
From a security perspective, this is a bad idea: even if the modulus length does not change, each prime number becomes smaller. The following n is 286-bit, but it consists of 8 factors — which means each is only 36-bit. Pollard's rho finds such a divisor in approximately √p ≈ 218 steps, that is, in a few seconds.
Public key and ciphertext:
n = 91124689638203019832472263843416358316215947548256767107024561554721576645128915983611
e = 65537
c = 89294464034024511063753529131556286603359910859872659333949290668806805756775464558497
The decrypted bytes directly give the flag.
To submit a flag, log in.