Multiple Ciphertexts
Common Modulus
Theory
Common Modulus Attack is used when the same plaintext m is encrypted twice with the same modulus N but distinct public exponent e1 and e2. In other words:
If e1 and e2 are coprime, then Bezout's Identity tells us that ∃ a,b∈Z s.t.
Here a and b can be solved using extended Euclidean Algorithm. Once we know a and b, we could compute
Correctness:
Implementation
Hastad Broadcast Attack
Theory
Hastad Broadcast Attack is used when the same plaintext m is encrypted multiple (≥3) times with the same public exponents e but distinct modulus Ni. In other words:
Chinese Remainder Theorem tells us the solution to the following equation exists:
Denote this solution as M. Chinese Remainder Theorem also provides a method for computing M:
where N=∏i=1nNi. Note that the plaintext m<Ni, hence me<∏i=1nNi=N. As a result, taking e-th root of M gives us the plaintext m. No need to worry about modulo N since me is not large enough.
Implementation
Last updated