Week 13 Flashcards
Describe the three components of a public-key encryption scheme
- Key generation algorithm: outputs encryption key, decryption key and public params i.e. descriptions of the message space, cipher text space and possible enc/dec key pairs
- Encryption algorithm: receives encryption key and public params; outputs ciphertext
- Decryption algorithm: receives decryption key and public params; outputs original message
What does the acronym RSA represent?
Rivest, Shamir and Adleman
What is a trapdoor one-way function?
Efficient to execute one way, inefficient to execute in the inverse - unless you have the extra information that provides the “trapdoor”, i.e. makes the inverse efficient, too
What idea is RSA encryption based on?
The idea that it’s easy to multiply two large primes, but there is currently no known way to efficiently find the prime factors of a number n that is the product of two large primes
How are the parameters for the RSA encryption scheme set up?
What is the name of the first parameter?
What is made public and what is kept secret?
What is the minimum size of relevant value(s) needed?
The public param for RSA is an integer 𝒏 (the modulus of the scheme) that is a product of two large primes:
- Generate two large primes p and q of similar size, but with p ≠ q
- Calculate 𝒏 = pq
Public: 𝒏
Secret: p and q
Minimum recommended size for 𝒏: 2048 bits long when represented in binary
Describe how to generate the keys for the RSA encryption scheme
Compute ɸ(𝒏) = (p - 1)(q - 1)
Encryption key e must be a positive integer coprime to ɸ(𝒏) so that e ∈ Z*ɸ(𝒏)
Decryption key d is the multiplicative inverse of e in Z*ɸ(𝒏)
Describe the RSA encryption and decryption algorithms
(2 steps each)
Assuming our message 𝒎 is represented as an element of ℤ𝒏.
Encryption:
- Use the modulus of the scheme, 𝒏, and public encryption key 𝒆 to express E(𝒎, 𝒆) = 𝒎𝒆 (mod 𝒏)
- Use techniques like Square & Multiply to calculate the value of this exponential value
Decryption:
- Use private decryption key 𝒅 and public parameter 𝒏 with ciphertext 𝒄 to express D(𝒄, 𝒅) = 𝒄𝒅 (mod 𝒏)
- The fastest way to solve this is to split it into two expressions (since 𝒏 = 𝒑𝒒) in order to use exponent reduction and calculation techniques, ending up with two congruences with 𝒙 to solve using CRT to find 𝒎 (mod 𝒏)
Use RSA encryption to encrypt the message 𝒎 = 301.
Then use RSA decryption to decrypt it.
Necessary information:
- The modulus of the scheme and public parameter 𝒏 = 1457
- The modulus was derived from 𝒑 = 31 and 𝒒 = 47
- The public encryption key 𝒆 = 11
The recipient also knows the private decryption key 𝒅 = 251.
Encryption:
- Ciphertext 𝒄 = E(𝒎, 𝒆) = 30111 (mod 1457)
- 30111 (mod 1457) ≡ 358 (mod 1457)
Decryption:
- Message 𝒎 = D(𝒄, 𝒅) = 358251 (mod 1457)
- Knowing 𝒑 = 31 and 𝒒 = 47, we will use CRT to compute 𝒙 ≡ 358251 (mod 31) and 𝒙 ≡ 358251 (mod 47), which reduce down to 𝒙 ≡ 22251 (mod 31) and 𝒙 ≡ 19251 (mod 47) respectively - the result is the message, 301
Appreciate that an an adversary who can factor an RSA modulus 𝒏 can break RSA
Appreciate that it is not known whether breaking RSA is as hard as the problem of factoring the modulus 𝒏
Show that the RSA encryption scheme provides correctness for messages 𝒎 that are coprime to 𝒏