0% found this document useful (0 votes)
155 views1 page

564 YingChen Assignment3

The document contains the solution to a cryptography problem using RSA encryption. It is given that the ciphertext is 10, the public key is e=5 and n=35. It finds the prime factors of n to determine the totient function value phi(n) of 24. It then calculates the private key d=5 using the fact that ed=1 mod phi(n). Finally, it decrypts the ciphertext 10 using the private key to find the plaintext is 5.

Uploaded by

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

564 YingChen Assignment3

The document contains the solution to a cryptography problem using RSA encryption. It is given that the ciphertext is 10, the public key is e=5 and n=35. It finds the prime factors of n to determine the totient function value phi(n) of 24. It then calculates the private key d=5 using the fact that ed=1 mod phi(n). Finally, it decrypts the ciphertext 10 using the private key to find the plaintext is 5.

Uploaded by

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

60564 - Assignment 3

Full name: ying chen


ASCII code in decimal format:
121+105+110+103+99+104+101+110 = 853 mod 23 +1 =3

Question 9.3:
In a public-key system using RSA, you intercept the ciphertext C =10 sent to a user
whose public key is e=5, n=35. What is the plaintext M?

Solution:

We know that the ciphertext C = 10, and the public key PU = {e, n} = {5, 35}.
Based on Euler’s Totient function, (n) is defined as the number of positive integers less
than n and relatively prime to n [textbook: “Cryptography and Network Security”, page
240]. We could find that (n) = 24.

Now, we guess two prime numbers p and q. Let p be 5 and q be 7. All the following
conditions will be satisfied based on the guess:
(1) n = p*q = 5*7=35
(2) (n) = (p-1)(q-1)=(5-1)(7-1)=4*6=24
(3) gcd((n), e) = gcd(24, 5) =1, 1< e < (n)

We calculate d in the next step. Based on RSA key generation algorithm,


d ≡ e-1 mod (n) which is equivalent to
ed ≡ 1 mod (n)
or ed mod (n) =1. (chapter 9.1 page 269)

We have e = 5, (n) = 24. So, 5d mod 24 =1, and d = 5.

Now, we find the private key PR = {d, n} = {5, 35}.

Based on RSA decryption algorithm,


M = Cd mod n
= 105 mod 35
=5

We also can verify the correctness by the RSA encryption algorithm as the following:
C = Me mod n = 55 mod 35 = 10

Therefore, we conclude that the plaintext M is 5.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy