pub fn franklin_reiter_attack(
e: u32,
r: &BigInt,
c1: &BigInt,
c2: &BigInt,
n: &BigInt,
) -> Option<BigInt>Expand description
Franklin–Reiter related-message attack: recover m from ciphertexts of two LINEARLY RELATED messages
m and m + r (known r) under the same modulus N and a small public exponent e. Both
g₁(x) = xᵉ − c₁ and g₂(x) = (x + r)ᵉ − c₂ have the root x = m mod N, so their GCD over (ℤ/N)[x]
is the linear factor x − m, and m is read straight off it. The lens: two ciphertexts sharing a
hidden root, extracted by polynomial GCD.