Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2015/ii/paper-2/10g/solution

In RSA, choose with distinct large primes, an exponent coprime to , and satisfying . Publish and keep secret. Encrypt a residue as and decrypt by . Fermat's little theorem on each prime and the Chinese remainder theorem prove decryption, including messages not coprime to .
A customer knows a nonzero multiple of . Write with odd. Choose a base at random. A nontrivial already factors . Otherwise compute modulo . The last entry is . If the first occurrence of is preceded by , then
Indeed, the two prime components of this square root of must have opposite signs. This procedure succeeds for some bases: by the Chinese remainder theorem, choose a base whose component modulo has order and whose component modulo has order . Its odd -th power is already a nontrivial square root of . Trying bases therefore gives an explicit factoring algorithm, and repeated random choices give the usual efficient attack. More precisely, if the two components' orders have different powers of , the procedure succeeds. For a uniform element of a cyclic group with -part , those order valuations have probabilities for and for . Independence of the two prime components shows that equal valuations have probability at most . Thus a random unit succeeds with probability at least . Once is factored, every customer's private exponent is computable. The exceptional is an identity cipher and is already insecure.
For the outsider's RSA common-modulus attack, find integers with by Bézout's identity. For a unit message,
using modular inverses for negative powers. If a ciphertext is a nonzero nonunit, its greatest common divisor with factors instead; zero ciphertext corresponds to the zero message for a squarefree modulus. The common message is recoverable without a private key. For a generic unit message this alone does not supply the factorization or all private keys, so it does not demonstrate a complete break for unrelated messages. The nonunit case does give that stronger break.

New to topics? Read the docs here!