0% found this document useful (0 votes)
15 views13 pages

4.3 - Rsa

crypto

Uploaded by

ayhamibdah333
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views13 pages

4.3 - Rsa

crypto

Uploaded by

ayhamibdah333
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

RSA CRYPTOSYSTEM

RSA CRYPTOSYSTEM
❑ The most common public-key
algorithm is the RSA cryptosystem,
named for its inventors (Rivest,
Shamir, and Adleman).
RSA CRYPTOSYSTEM
RSA CRYPTOSYSTEM
RSA CRYPTOSYSTEM
RSA CRYPTOSYSTEM
❑ Encryption:
RSA CRYPTOSYSTEM
❑ Decryption:
RSA Example
❑ Bob chooses 7 and 11 as p and q and calculates n = 77. The
value of (n) = (7 − 1)(11 − 1) or 60. Now he chooses two
exponents, e and d, from Z60∗. If he chooses e to be 13, then d
is 37. Note that e × d mod 60 = 1 (they are inverses of each
Now imagine that Alice wants to send the plaintext 5 to Bob.
She uses the public exponent 13 to encrypt 5.

❑ Bob receives the ciphertext 26 and uses the private key 37 to


decipher the ciphertext:
RSA Example 2
❑ Jennifer creates a pair of keys for herself. She chooses p = 397
and q = 401. She calculates n = 159197. She then calculates
(n) = 158400. She then chooses e = 343 and d = 12007. Show
how Ted can send a message to Jennifer if he knows e and n.
❑ Suppose Ted wants to send the message “NO” to Jennifer. He
changes each character to a number (from 00 to 25), with each
character coded as two digits. He then concatenates the two
coded characters and gets a four-digit number. The plaintext is
1314. Figure 10.7 shows the process.
RSA Example 3
❑ Here is a more realistic example. We choose a 512-bit p and
q, calculate n and f(n), then choose e and test for relative
primeness with f(n). We then calculate d. Finally, we show
the results of encryption and decryption. The integer p is a
159-digit number.
RSA Example 3
❑ The modulus n = p × q. It has 309 digits.

❑ f(n) = (p − 1)(q − 1) has 309 digits.


RSA Example 3
❑ Bob chooses e = 35535 (the ideal is 65537) and tests it to
make sure it is relatively prime with f(n). He then finds the
inverse of e modulo f(n) and calls it d.
RSA Example 3
❑ Alice wants to send the message “THIS IS A TEST”, which
can be changed to a numeric value using the 00−26 encoding
scheme (26 is the space character).

❑ The ciphertext calculated by Alice is C = Pe, which is

You might also like