SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
rs
Solution
How RSA works (sorry if I use different variables from your class; the writing on the slide you
included is too small to see):
1) Choose two distinct primes p and q. Let pq = n.
2) Calculate (n) = (pq) = (p - 1)(q - 1)
(where is Euler's totient function, i.e., (n) = the number of positive integers less than or equal to
n that are coprime to n)
3) Find an e such that gcd((n), e) = 1
4) Compute d such that de = 1 (mod (n)) (i.e., d the modular multiplicative inverse of e mod
(pq))
e and n will be made public for people to encrypt messages with. d should remain private and
will decrypt messages. (Obviously, (n) should also remain private as it would allow people to
find d. For strong cryptography, n=pq should be sufficiently large that it is hard to factor and
thus it is hard to guess (n).)
To encrypt a message m (where m < n):
1) Compute c = me (mod n). This is the encrypted message.
To decrypt c:
1) Compute cd (mod n) = (me)d (mod n) = (med) (mod n) =* m1 (mod n) = m.
*this equality works because of Euler's Theorem, a^((p)) = 1 mod p (and here we have de = 1
(mod (n)))
Your problem:
Encrypt "HOW ARE YOU". First convert to an integer string as described.
A = 00, B = 01, C = 02, D = 03, E = 04, F = 05, G = 06, H = 07, I = 08, J = 09, K = 10, L = 11,
M = 12, N = 13, O = 14, P = 15, Q = 16, R = 17, S = 18, T = 19, U = 20, V = 21, W = 22, X =
23, Y = 24, Z = 25, space = 26.
HOW ARE YOU = 07 14 22 26 00 17 04 26 24 14 20
= 0714222600170426241420
To encrypt, we need the message integer to be less than our chosen n, and n = 100. So we'll keep
the message broken up into chunks of two. (Interestingly, n should be a product of two primes,
and they've given you an n that isn't. But we'll apply the RSA encryption algorithm anyway.)
To encrypt each message chunk:
c = me (mod n)
where c is the encrypted message chunk, m is the original message chunk, e is the given value of
13, and n is the given value of 100. Encrypt each chunk:
m = 07
c = 713 (mod 100)
c = 7
m = 14
c = 1413 (mod 100)
c = 44
m = 22
c = 2213 (mod 100)
c = 52
m = 26
c = 2613 (mod 100)
c = 76
m = 00
c = 013 (mod 100)
c = 0
m = 17
c = 1713 (mod 100)
c = 37
m = 04
c = 413 (mod 100)
c = 64
m = 26
c = 2613 (mod 100)
c = 76
m = 24
c = 2413 (mod 100)
c = 24
m = 14
c = 1413 (mod 100)
c = 44
m = 20
c = 2013 (mod 100)
c = 0
Combine all the c's together into an encrypted message. For each m -> c chunk we have:
07 -> 07
14 -> 44
22 -> 52
26 -> 76
00 -> 00
17 -> 37
04 -> 64
26 -> 76
24 -> 24
14 -> 44
20 -> 00
So the whole encrypted message c is:
07 44 52 76 00 37 64 76 24 44 00
or
0744527600376476244400.
c = 2613 (mod 100)
c = 76

Weitere ähnliche Inhalte

Ähnlich wie rsSolutionHow RSA works (sorry if I use differ.pdf

Talk on Resource Allocation Strategies for Layered Multimedia Multicast Services
Talk on Resource Allocation Strategies for Layered Multimedia Multicast ServicesTalk on Resource Allocation Strategies for Layered Multimedia Multicast Services
Talk on Resource Allocation Strategies for Layered Multimedia Multicast ServicesAndrea Tassi
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA EncryptionNathan F. Dunn
 
Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate providerKishankant Yadav
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxjacksnathalie
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal Processingaj ahmed
 
Cryptanalysis Project Report
Cryptanalysis Project ReportCryptanalysis Project Report
Cryptanalysis Project Reportshahparin
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxvaishnavi339314
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning projectLianli Liu
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungVu Hung Nguyen
 
New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...Alexander Litvinenko
 
Lecture03 p1
Lecture03 p1Lecture03 p1
Lecture03 p1aa11bb11
 
RSA final notation change2
RSA final notation change2RSA final notation change2
RSA final notation change2Coleman Gorham
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Alexander Litvinenko
 
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENT
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENTA NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENT
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENTijcisjournal
 

Ähnlich wie rsSolutionHow RSA works (sorry if I use differ.pdf (20)

Rsa
RsaRsa
Rsa
 
Talk on Resource Allocation Strategies for Layered Multimedia Multicast Services
Talk on Resource Allocation Strategies for Layered Multimedia Multicast ServicesTalk on Resource Allocation Strategies for Layered Multimedia Multicast Services
Talk on Resource Allocation Strategies for Layered Multimedia Multicast Services
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA Encryption
 
Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate provider
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal Processing
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Cryptanalysis Project Report
Cryptanalysis Project ReportCryptanalysis Project Report
Cryptanalysis Project Report
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning project
 
AJMS_476_23.pdf
AJMS_476_23.pdfAJMS_476_23.pdf
AJMS_476_23.pdf
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hung
 
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
 
Number theory
Number theoryNumber theory
Number theory
 
New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...
 
Lecture03 p1
Lecture03 p1Lecture03 p1
Lecture03 p1
 
RSA final notation change2
RSA final notation change2RSA final notation change2
RSA final notation change2
 
5. Summing Series.pptx
5. Summing Series.pptx5. Summing Series.pptx
5. Summing Series.pptx
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...
 
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENT
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENTA NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENT
A NEW ATTACK ON RSA WITH A COMPOSED DECRYPTION EXPONENT
 

Mehr von ALASEEMKOTA

Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdf
Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdfSalad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdf
Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdfALASEEMKOTA
 
Sabrina is the virtual team leader of a group that will be creating .pdf
Sabrina is the virtual team leader of a group that will be creating .pdfSabrina is the virtual team leader of a group that will be creating .pdf
Sabrina is the virtual team leader of a group that will be creating .pdfALASEEMKOTA
 
R[a,b] is remann integralSolution Do you kno.pdf
R[a,b] is remann integralSolution                     Do you kno.pdfR[a,b] is remann integralSolution                     Do you kno.pdf
R[a,b] is remann integralSolution Do you kno.pdfALASEEMKOTA
 
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdf
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdfRussia imports 5 billion Rubles of goods and exports 7 billion ruble.pdf
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdfALASEEMKOTA
 
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdf
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdfRunoff isA. Change in soil moistureB. Change in groundwaterC..pdf
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdfALASEEMKOTA
 
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdf
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdfRudy Co. has total fixed costs of $520,000. A unit of product sells .pdf
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdfALASEEMKOTA
 
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdfRSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdfALASEEMKOTA
 
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdf
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdfROY G. BIV is a mnemonic device to remember that the color spectrum .pdf
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdfALASEEMKOTA
 
Ross and Rachel have just tied the knot. The probability that they.pdf
Ross and Rachel have just tied the knot. The probability that they.pdfRoss and Rachel have just tied the knot. The probability that they.pdf
Ross and Rachel have just tied the knot. The probability that they.pdfALASEEMKOTA
 
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdf
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdfRory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdf
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdfALASEEMKOTA
 
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdf
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdfRose Corporation acquired 100 percent of Lilly Company’s outstanding.pdf
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdfALASEEMKOTA
 
Ronald is about to roll his two dice again. What are the odds of ha.pdf
Ronald is about to roll his two dice again.  What are the odds of ha.pdfRonald is about to roll his two dice again.  What are the odds of ha.pdf
Ronald is about to roll his two dice again. What are the odds of ha.pdfALASEEMKOTA
 
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdf
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdfRomeo and Juliet plan to meet each other at the Theta Pond on the Va.pdf
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdfALASEEMKOTA
 
Robert has eight guests, two of whom are Jim and John. If the guests.pdf
Robert has eight guests, two of whom are Jim and John. If the guests.pdfRobert has eight guests, two of whom are Jim and John. If the guests.pdf
Robert has eight guests, two of whom are Jim and John. If the guests.pdfALASEEMKOTA
 
ROA2The net profit margin for a company is 26.2 , the asset turno.pdf
ROA2The net profit margin for a company is 26.2 , the asset turno.pdfROA2The net profit margin for a company is 26.2 , the asset turno.pdf
ROA2The net profit margin for a company is 26.2 , the asset turno.pdfALASEEMKOTA
 
Robert Corp. sponsors a defined benefit pension plan for its employe.pdf
Robert Corp. sponsors a defined benefit pension plan for its employe.pdfRobert Corp. sponsors a defined benefit pension plan for its employe.pdf
Robert Corp. sponsors a defined benefit pension plan for its employe.pdfALASEEMKOTA
 
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdf
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdfRiver Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdf
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdfALASEEMKOTA
 
Risk management is made up of primary and secondary activities. Whic.pdf
Risk management is made up of primary and secondary activities. Whic.pdfRisk management is made up of primary and secondary activities. Whic.pdf
Risk management is made up of primary and secondary activities. Whic.pdfALASEEMKOTA
 
risk in securites trading areSolutionHi,The biggest risk in.pdf
risk in securites trading areSolutionHi,The biggest risk in.pdfrisk in securites trading areSolutionHi,The biggest risk in.pdf
risk in securites trading areSolutionHi,The biggest risk in.pdfALASEEMKOTA
 
rev 04_17_2012.pdf
rev 04_17_2012.pdfrev 04_17_2012.pdf
rev 04_17_2012.pdfALASEEMKOTA
 

Mehr von ALASEEMKOTA (20)

Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdf
Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdfSalad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdf
Salad Toppings Donald Wheeler is ordering a salad at a Ruby Tuesday.pdf
 
Sabrina is the virtual team leader of a group that will be creating .pdf
Sabrina is the virtual team leader of a group that will be creating .pdfSabrina is the virtual team leader of a group that will be creating .pdf
Sabrina is the virtual team leader of a group that will be creating .pdf
 
R[a,b] is remann integralSolution Do you kno.pdf
R[a,b] is remann integralSolution                     Do you kno.pdfR[a,b] is remann integralSolution                     Do you kno.pdf
R[a,b] is remann integralSolution Do you kno.pdf
 
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdf
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdfRussia imports 5 billion Rubles of goods and exports 7 billion ruble.pdf
Russia imports 5 billion Rubles of goods and exports 7 billion ruble.pdf
 
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdf
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdfRunoff isA. Change in soil moistureB. Change in groundwaterC..pdf
Runoff isA. Change in soil moistureB. Change in groundwaterC..pdf
 
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdf
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdfRudy Co. has total fixed costs of $520,000. A unit of product sells .pdf
Rudy Co. has total fixed costs of $520,000. A unit of product sells .pdf
 
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdfRSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
RSA cryptosytem Alice and Bob set up an RSA cryptosystem Bob choose.pdf
 
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdf
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdfROY G. BIV is a mnemonic device to remember that the color spectrum .pdf
ROY G. BIV is a mnemonic device to remember that the color spectrum .pdf
 
Ross and Rachel have just tied the knot. The probability that they.pdf
Ross and Rachel have just tied the knot. The probability that they.pdfRoss and Rachel have just tied the knot. The probability that they.pdf
Ross and Rachel have just tied the knot. The probability that they.pdf
 
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdf
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdfRory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdf
Rory, Elyse, Jason, Jodi, and Sarah are each going to host a class p.pdf
 
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdf
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdfRose Corporation acquired 100 percent of Lilly Company’s outstanding.pdf
Rose Corporation acquired 100 percent of Lilly Company’s outstanding.pdf
 
Ronald is about to roll his two dice again. What are the odds of ha.pdf
Ronald is about to roll his two dice again.  What are the odds of ha.pdfRonald is about to roll his two dice again.  What are the odds of ha.pdf
Ronald is about to roll his two dice again. What are the odds of ha.pdf
 
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdf
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdfRomeo and Juliet plan to meet each other at the Theta Pond on the Va.pdf
Romeo and Juliet plan to meet each other at the Theta Pond on the Va.pdf
 
Robert has eight guests, two of whom are Jim and John. If the guests.pdf
Robert has eight guests, two of whom are Jim and John. If the guests.pdfRobert has eight guests, two of whom are Jim and John. If the guests.pdf
Robert has eight guests, two of whom are Jim and John. If the guests.pdf
 
ROA2The net profit margin for a company is 26.2 , the asset turno.pdf
ROA2The net profit margin for a company is 26.2 , the asset turno.pdfROA2The net profit margin for a company is 26.2 , the asset turno.pdf
ROA2The net profit margin for a company is 26.2 , the asset turno.pdf
 
Robert Corp. sponsors a defined benefit pension plan for its employe.pdf
Robert Corp. sponsors a defined benefit pension plan for its employe.pdfRobert Corp. sponsors a defined benefit pension plan for its employe.pdf
Robert Corp. sponsors a defined benefit pension plan for its employe.pdf
 
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdf
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdfRiver Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdf
River Forest, Inc., has 5,000 shares of 6, $100 par value, noncumul.pdf
 
Risk management is made up of primary and secondary activities. Whic.pdf
Risk management is made up of primary and secondary activities. Whic.pdfRisk management is made up of primary and secondary activities. Whic.pdf
Risk management is made up of primary and secondary activities. Whic.pdf
 
risk in securites trading areSolutionHi,The biggest risk in.pdf
risk in securites trading areSolutionHi,The biggest risk in.pdfrisk in securites trading areSolutionHi,The biggest risk in.pdf
risk in securites trading areSolutionHi,The biggest risk in.pdf
 
rev 04_17_2012.pdf
rev 04_17_2012.pdfrev 04_17_2012.pdf
rev 04_17_2012.pdf
 

Kürzlich hochgeladen

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Kürzlich hochgeladen (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

rsSolutionHow RSA works (sorry if I use differ.pdf

  • 1. rs Solution How RSA works (sorry if I use different variables from your class; the writing on the slide you included is too small to see): 1) Choose two distinct primes p and q. Let pq = n. 2) Calculate (n) = (pq) = (p - 1)(q - 1) (where is Euler's totient function, i.e., (n) = the number of positive integers less than or equal to n that are coprime to n) 3) Find an e such that gcd((n), e) = 1 4) Compute d such that de = 1 (mod (n)) (i.e., d the modular multiplicative inverse of e mod (pq)) e and n will be made public for people to encrypt messages with. d should remain private and will decrypt messages. (Obviously, (n) should also remain private as it would allow people to find d. For strong cryptography, n=pq should be sufficiently large that it is hard to factor and thus it is hard to guess (n).) To encrypt a message m (where m < n): 1) Compute c = me (mod n). This is the encrypted message. To decrypt c: 1) Compute cd (mod n) = (me)d (mod n) = (med) (mod n) =* m1 (mod n) = m.
  • 2. *this equality works because of Euler's Theorem, a^((p)) = 1 mod p (and here we have de = 1 (mod (n))) Your problem: Encrypt "HOW ARE YOU". First convert to an integer string as described. A = 00, B = 01, C = 02, D = 03, E = 04, F = 05, G = 06, H = 07, I = 08, J = 09, K = 10, L = 11, M = 12, N = 13, O = 14, P = 15, Q = 16, R = 17, S = 18, T = 19, U = 20, V = 21, W = 22, X = 23, Y = 24, Z = 25, space = 26. HOW ARE YOU = 07 14 22 26 00 17 04 26 24 14 20 = 0714222600170426241420 To encrypt, we need the message integer to be less than our chosen n, and n = 100. So we'll keep the message broken up into chunks of two. (Interestingly, n should be a product of two primes, and they've given you an n that isn't. But we'll apply the RSA encryption algorithm anyway.) To encrypt each message chunk: c = me (mod n) where c is the encrypted message chunk, m is the original message chunk, e is the given value of 13, and n is the given value of 100. Encrypt each chunk: m = 07 c = 713 (mod 100) c = 7 m = 14 c = 1413 (mod 100) c = 44 m = 22 c = 2213 (mod 100) c = 52 m = 26 c = 2613 (mod 100) c = 76 m = 00 c = 013 (mod 100) c = 0 m = 17 c = 1713 (mod 100) c = 37 m = 04
  • 3. c = 413 (mod 100) c = 64 m = 26 c = 2613 (mod 100) c = 76 m = 24 c = 2413 (mod 100) c = 24 m = 14 c = 1413 (mod 100) c = 44 m = 20 c = 2013 (mod 100) c = 0 Combine all the c's together into an encrypted message. For each m -> c chunk we have: 07 -> 07 14 -> 44 22 -> 52 26 -> 76 00 -> 00 17 -> 37 04 -> 64 26 -> 76 24 -> 24 14 -> 44 20 -> 00 So the whole encrypted message c is: 07 44 52 76 00 37 64 76 24 44 00 or 0744527600376476244400. c = 2613 (mod 100) c = 76