5 views

Uploaded by Basic204

RSA encryption

- CCNA 2 Bonus Exam2145
- Alisa Beast
- Damnation City - Primacy
- Zatanna-14-Draft-2.pdf
- Cracking We p and Wpa Wireless Networks
- VLSM Workbook Student Edition v2_0
- Home Survival Wook Sheet
- Assignment 12
- PRPG_CS_v_0_9_1
- Storytellers Thesaurus
- 100 Reasons
- The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
- Sapiens: A Brief History of Humankind
- The Unwinding: An Inner History of the New America
- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
- Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
- Shoe Dog: A Memoir by the Creator of Nike
- Never Split the Difference: Negotiating As If Your Life Depended On It
- Maybe You Should Talk to Someone: A Therapist, HER Therapist, and Our Lives Revealed
- John Adams

You are on page 1of 1

exercise by yourself

RSA algorithm

1)

2)

3)

4)

**Select two primes p and q
**

Calculate n = p x q

Calculate φ(n) = (p-1) x (q-1)

Select e such that 1 < e < φ(n) and gcd(φ(n),e) = 1 (e and φ(n) have no

common factor, except the 1)

5) Find d which is the inverse of e modulo f(n):

d=e-1 (mod φ(n) )

or

**d x e/ φ(n) = k(the quotient) with 1 remaining
**

(here we do not care about the quotient k, but the remainder has to be

1)

**How does the cipher work?
**

Public key pair KU = {e,n}

Private key pair KR = {d,n}

M – the original text (Plaintext).

1) Use public key KU to encrypt the plain text M into cipher text

C= Me (mod n)

2) Use private key KR to decrypt cipher text (C), then you get the plaintext (M)

Cd (mod n) M

Exercise:

1)

2)

3)

4)

Choose p = 7 and q = 11

Compute n = p * q = _________________

Compute φ(n) = (p - 1) * (q - 1) = __________________

Choose e such that 1 < e < φ(n) and e and φ(n) are co-prime. Let e =

___________

5) Compute a value for d such that (d * e) % φ(n) = 1. One solution is d =

_______

You choose the value of d, such (d * e) % φ(n) = 1. (Note, in the formal the

“%” means “mod”, you can find it on the calculator. )

The plaintext M = 7

The process of encryption:

The cipher text C = Me (mod n) = _____________________

The process of decryption:

Cd (mod n) = ___________________ ====M

- CCNA 2 Bonus Exam2145Uploaded byBasic204
- Alisa BeastUploaded byBasic204
- Damnation City - PrimacyUploaded byBasic204
- Zatanna-14-Draft-2.pdfUploaded byAnishSahni
- Cracking We p and Wpa Wireless NetworksUploaded byBasic204
- VLSM Workbook Student Edition v2_0Uploaded bySaul Mancillas de Leon
- Home Survival Wook SheetUploaded byBasic204
- Assignment 12Uploaded byBasic204
- PRPG_CS_v_0_9_1Uploaded byTiziano Bubbolo Aprile
- Storytellers ThesaurusUploaded byEbeneezer
- 100 ReasonsUploaded bybryan_karsh_5