Lably
Skip to content

Wiener's attack

Cryptographic attack on the RSA system

  • 5 min read
  • 6 chapters

Related on Lably

Through Prime number, Modular arithmetic and Euler's totient function

Background on RSA

Fictional characters Alice and Bob are people who want to communicate securely. More specifically, Alice wants to send a message to Bob which only Bob can read. First Bob chooses two secret primes p and q. Then he calculates the RSA modulus N = pq. This RSA modulus is made public together with the encryption exponent e. N and e form the public key pair (e, N). By making this information public, anyone can encrypt messages to Bob. The decryption exponent d satisfies ed ≡ 1 (mod λ(N)), where λ(N) denotes the Carmichael function, though sometimes φ(N), the Euler's totient function, is used (note: this is the order of the multiplicative group (Z‍/‍NZ)×, which is not necessarily a cyclic group). The encryption exponent e and λ(N) also must be relatively prime so that there is a modular inverse. The factorization of N and the private key d are kept secret, so that only Bob can decrypt the message. We denote the private key pair as (d, N). The encryption of the message M is given by C ≡ Me (mod N) and the decryption of cipher text C is given by Cd ≡ (Me)d ≡ Med ≡ M (mod N) (using Euler's Theorem).

Using the Euclidean algorithm, one can efficiently recover the secret key d if one knows the factorization of N. By having the secret key d, one can efficiently factor the modulus of N.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Computing and communication