4. Attacks on RSA

The security of RSA depends mainly on the difficulty of factoring the modulus n. If an attacker, Eve, can factor n into p and q, they can calculate and then find the private key d.

Here’s a breakdown of the attacks mentioned:

Factorization Attack

  • Goal: Factor n to find p and q.
  • Defense: Use a very large n (at least 1024 bits, >300 decimal digits).

Chosen-Ciphertext Attack

  • Scenario: Bob decrypts arbitrary ciphertexts for Eve (except for a specific ciphertext C).
  • Method: 1. Eve chooses random . 2. Eve calculates . 3. Eve asks Bob to decrypt Y, getting . 4. Eve computes . * Explanation:
  • Defense: Bob should not decrypt arbitrary ciphertexts.

Attacks on the Encryption Exponent (e)

  • Low Encryption Exponent Attack (e.g., e = 3)
    • Coppersmith Theorem Attack: If is small and a significant portion of the bits of are known, the attacker can find the complete .
    • Broadcast Attack: If the same message is sent to multiple recipients with the same low , an attacker can use the Chinese Remainder Theorem to recover the message. For example, with , if Alice sends , , , Eve can find , then since , Eve can find .
    • Related Message Attack: If two plaintexts are related by a linear function and encrypted with a low , Eve may recover them.
    • Short Pad Attack: If a message is padded with short random values and and encrypted twice, Eve may recover the original message.
    • Defense: Use a larger e (e.g., ).

Attacks on the Decryption Exponent (d)

  • Revealed Decryption Exponent Attack: If d is revealed, Eve can decrypt messages and also factor n, compromising the entire system.
  • Low Decryption Exponent Attack: If and , Eve can factor n efficiently.
  • Defense: Ensure , and regenerate all keys if d is compromised.

Plaintext Attacks

  • Short Message Attack: If the set of possible plaintexts is small, Eve can encrypt them all and compare them to the ciphertext.

  • Cycling Attack: Repeatedly encrypting the ciphertext might eventually yield the plaintext, although the complexity is similar to factoring n.

  • Unconcealed Message Attack: Some messages encrypt to themselves (e.g., ).

  • Defense: Pad messages with random bits (e.g., using OAEP).

  • Attacks on the Modulus

    • Common Modulus Attack: If multiple users share the same n, an attacker who is part of the group can potentially factor n and find others’ private keys.
    • Defense: Each user must have a unique modulus n.
  • Implementation Attacks

    • Timing Attack: By measuring the time it takes to perform decryption, Eve can deduce the bits of the private key d.
    • Power Attack: Similar to the timing attack but based on power consumption.
    • Defense: Use constant-time algorithms or blinding techniques.