SlideShare una empresa de Scribd logo
1 de 16
1
RSA: Rivest Shamir
Adleman
RSA: Rivest Shamir AdlemanRSA: Rivest Shamir Adleman
 RSA is one of the first practical public-key algorithm and is
widely used for secure data transmission.
 Of all the public-key algorithms proposed over the years, RSA
is by far the easiest to understand and implement.
 The algorithm is named after the three inventors—Ron
Rivest, Adi Shamir, and Leonard Adleman
 The RSA algorithm was publicly described in 1977 by Rivest,
Shamir, and Adleman at MIT
RSA: AlgorithmRSA: Algorithm
 Just like the public key cryptography, in RSA the encryption key
is public and the decryption key is private, which is kept secret.
In RSA, this asymmetry is based on the practical difficulty of
factoring the product of two large prime numbers.
 RSA gets its security from the difficulty of factoring large
numbers. The public and private keys are functions of a pair of
large prime numbers (100 to 200 digits or even larger).
 A user of RSA creates and then publishes a public key based on
the two large prime numbers, along with an auxiliary value. The
prime numbers must be kept secret. Anyone can use the public
key to encrypt a message, but with currently published
methods. If the public key is large enough, only someone with
knowledge of the prime numbers can feasibly decode the
message.
RSA: AlgorithmRSA: Algorithm
 The RSA algorithm can be analyzed in three phases:
1. Getting the Message Ready
2. Key generation
3. Message Encryption
4. Message Decryption
5
RSA: Getting ReadyRSA: Getting Ready
 In RSA we represent a message by its equivalent integer value.
1. We can represent a message as a binary bit pattern.
2. And a bit pattern can be uniquely represented by a
decimal integer number.
3. Thus we can consider that encrypting a message is
equivalent to encrypting its corresponding decimal integer
number.
4. Example: Let we want to encrypt the message “m”
5. Now we know m= 10010001 . So this message can be uniquely
represented by the decimal number 145 which is equal to
(10010001)2 .
6. To encrypt m, we encrypt the corresponding number 145,
which gives a new number (the cyphertext).
6
RSA: Key GenerationRSA: Key Generation
1. Choose two large prime numbers p, q.
(e.g., 1024 bits each)
2. Compute n = pq, z = (p-1)(q-1)
3. Choose encryption key e (with e<n) that has no common
factors with z. (that is e and z are “relatively prime”).
4. Calculate decryption key d such that ed-1 is exactly
divisible by z. (in other words: ed mod z = 1 implies
d=e-1
mod z
5. Public key is (n,e). Private key is (n,d).
KB
+
KB
-
7
RSA: Encryption & DecryptionRSA: Encryption & Decryption
 Given public key (n,e) and private key (n,d)
1. To encrypt message m (<n), compute
c = m mod ne
2. To decrypt received bit pattern, c, compute
m = c mod nd
m = (m mod n)e mod n
dMagic
happens!
c
How RSA Works?How RSA Works?
9
Analyze: Key GenerationAnalyze: Key Generation
 To generate the two keys, choose two random large prime
numbers, p and q. For maximum security, choose p and q of
equal length. Then compute the products.
 Then randomly choose the encryption key, e, such that e and
z=(p - 1)(q - 1) are relatively prime.
 Finally, use the extended Euclidean algorithm to compute the
decryption key, d, such that ed-1 is exactly divisible by z. That is
ed mod z = 1 or d=e-1
mod z
1. Choose two large prime numbers p, q.
(e.g., 1024 bits each)
2. Compute n = pq, z = (p-1)(q-1)
10
RSA Example:RSA Example:
Now Alice chooses p=5, q=7. Then n=35, z=24.
e=5 (so e, z relatively prime).
d=29 (so ed-1 exactly divisible by z).
bit pattern m me c = m mod ne
00001100 12 24832 17
encrypt:
Encrypting 8-bit messages.
 Consider that Alice wants to a message whose
equivalent binary bit pattern is 00001100 to Alice
Given 00001100=12 as plaintext, Alice send its ciphertext
17 to Bob
11
RSA Example:RSA Example:
c m = c mod nd
17 481968572106750915091411825223071697 12
c
d
decrypt:
 Now at the receiver end Bob receives 17 as the
ciphertext. Then Bob decrypt the ciphertext to
recover the plaintext.
Upon receiving 17 as ciphertext Bob decrypts it to
recover the plaintext 00001100=12
RSA ExampleRSA Example
13
Why does RSA work?Why does RSA work?
 We have to show that cd
mod n = m , where c = me
mod n
 Now we know that: for any x and y
xy
mod n = x(ymodz)
mod n , where n= pq and z = (p-1)(q-1)
 Then cd
mod n = (me
mod n)d
mod n [ as c = me
mod n ]
= med
mod n
= m(edmodz)
mod n [For d we have ed mod z =1]
= m1
mod n
= m
14
Attacks Against RSAAttacks Against RSA
 There are a number of attacks against plain RSA as described
below:
 When encrypting with low encryption exponents (e.g., e = 3)
and small values of the m, ciphertexts can be easily decrypted
 If the same clear text message is sent to bob or more recipients
and the receivers share the same exponent e, but different p, q,
and n, then it is easy to decrypt the original clear text message
via the Chinese remainder theorem
 It is vulnerable to chosen plaintext attack.
ReferencesReferences
 http://en.wikipedia.org/wiki/
 Applied Cryptography by Bruce Schneier; 10th
Anniversary
edition
16
Md. Shakhawat Hossain
Student of Department of Computer Science &
Engineering
University of Rajshahi
E-mail: mshimul86@gmail.com

Más contenido relacionado

La actualidad más candente (20)

RSA algorithm
RSA algorithmRSA algorithm
RSA algorithm
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Diffiehellman
DiffiehellmanDiffiehellman
Diffiehellman
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
ElGamal Encryption Algoritham.pptx
ElGamal Encryption Algoritham.pptxElGamal Encryption Algoritham.pptx
ElGamal Encryption Algoritham.pptx
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
RSA
RSARSA
RSA
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
 
Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
 
Ch03
Ch03Ch03
Ch03
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Email Security : PGP & SMIME
Email Security : PGP & SMIMEEmail Security : PGP & SMIME
Email Security : PGP & SMIME
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Unit 3
Unit 3Unit 3
Unit 3
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 

Destacado

A Diagnostic Algorithm for Factor XIII Deficiency in Iran,
A Diagnostic Algorithm for Factor XIII Deficiency in Iran,A Diagnostic Algorithm for Factor XIII Deficiency in Iran,
A Diagnostic Algorithm for Factor XIII Deficiency in Iran,Akbar Dorgalaleh
 
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...Pratyush Rao
 
Middle East Contact Centre BenchmarkingPrelim Results V1.1
Middle East Contact Centre BenchmarkingPrelim Results V1.1Middle East Contact Centre BenchmarkingPrelim Results V1.1
Middle East Contact Centre BenchmarkingPrelim Results V1.1Paul Scott
 
Introduction to Mindstorm Ltd
Introduction to Mindstorm LtdIntroduction to Mindstorm Ltd
Introduction to Mindstorm Ltdmindstormltd
 
Lab1. calculator
Lab1. calculatorLab1. calculator
Lab1. calculatorebagsh
 
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...spa718
 
Global Contact Centre Benchmarking Report 2015 CCW Berlin
Global Contact Centre Benchmarking Report 2015 CCW BerlinGlobal Contact Centre Benchmarking Report 2015 CCW Berlin
Global Contact Centre Benchmarking Report 2015 CCW BerlinPaul Scott
 
Acute Promyelocytic Leukemia
Acute Promyelocytic LeukemiaAcute Promyelocytic Leukemia
Acute Promyelocytic Leukemiaspa718
 
Laboratory approach to bleeding disorders
Laboratory approach to bleeding disordersLaboratory approach to bleeding disorders
Laboratory approach to bleeding disordersAshish Jawarkar
 
Acute promyelocytic leukemia NCCN LATEST 2014 Guidelines
Acute promyelocytic leukemia NCCN LATEST 2014 GuidelinesAcute promyelocytic leukemia NCCN LATEST 2014 Guidelines
Acute promyelocytic leukemia NCCN LATEST 2014 GuidelinesDr Sandeep Kumar
 
Introduction to Biomedical Imaging
Introduction to Biomedical ImagingIntroduction to Biomedical Imaging
Introduction to Biomedical Imagingu.surgery
 
Basic image manipulation tutorial
Basic image manipulation tutorialBasic image manipulation tutorial
Basic image manipulation tutorialHelen Bruce
 

Destacado (20)

A Diagnostic Algorithm for Factor XIII Deficiency in Iran,
A Diagnostic Algorithm for Factor XIII Deficiency in Iran,A Diagnostic Algorithm for Factor XIII Deficiency in Iran,
A Diagnostic Algorithm for Factor XIII Deficiency in Iran,
 
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...
Turing100@Persistent | Life and Work of Ronald L. Rivest, Adi Shamir & Leonar...
 
Introduction to Medical Imaging
Introduction to Medical ImagingIntroduction to Medical Imaging
Introduction to Medical Imaging
 
Ch7 2ed
Ch7 2edCh7 2ed
Ch7 2ed
 
Middle East Contact Centre BenchmarkingPrelim Results V1.1
Middle East Contact Centre BenchmarkingPrelim Results V1.1Middle East Contact Centre BenchmarkingPrelim Results V1.1
Middle East Contact Centre BenchmarkingPrelim Results V1.1
 
Introduction to Mindstorm Ltd
Introduction to Mindstorm LtdIntroduction to Mindstorm Ltd
Introduction to Mindstorm Ltd
 
Lab1. calculator
Lab1. calculatorLab1. calculator
Lab1. calculator
 
Islamic jurisprudence
Islamic jurisprudenceIslamic jurisprudence
Islamic jurisprudence
 
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...
Breakthroughs in the treatment of acute promyelocytic leukemia: curable disea...
 
Global Contact Centre Benchmarking Report 2015 CCW Berlin
Global Contact Centre Benchmarking Report 2015 CCW BerlinGlobal Contact Centre Benchmarking Report 2015 CCW Berlin
Global Contact Centre Benchmarking Report 2015 CCW Berlin
 
Acute Promyelocytic Leukemia
Acute Promyelocytic LeukemiaAcute Promyelocytic Leukemia
Acute Promyelocytic Leukemia
 
Laboratory approach to bleeding disorders
Laboratory approach to bleeding disordersLaboratory approach to bleeding disorders
Laboratory approach to bleeding disorders
 
Flow cytometry
Flow cytometryFlow cytometry
Flow cytometry
 
Acute promyelocytic leukemia NCCN LATEST 2014 Guidelines
Acute promyelocytic leukemia NCCN LATEST 2014 GuidelinesAcute promyelocytic leukemia NCCN LATEST 2014 Guidelines
Acute promyelocytic leukemia NCCN LATEST 2014 Guidelines
 
Bucket sort
Bucket sortBucket sort
Bucket sort
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
History of computing
History of computingHistory of computing
History of computing
 
Introduction to Biomedical Imaging
Introduction to Biomedical ImagingIntroduction to Biomedical Imaging
Introduction to Biomedical Imaging
 
Basic image manipulation tutorial
Basic image manipulation tutorialBasic image manipulation tutorial
Basic image manipulation tutorial
 
Hashing
HashingHashing
Hashing
 

Similar a RSA Encryption: Understanding the Rivest-Shamir-Adleman Algorithm

CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfBhuvanaR13
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithmSiva Rushi
 
RSA Algorithm.ppt
RSA Algorithm.pptRSA Algorithm.ppt
RSA Algorithm.pptArchanaT30
 
Twenty years of attacks on the rsa cryptosystem
Twenty years of attacks on the rsa cryptosystemTwenty years of attacks on the rsa cryptosystem
Twenty years of attacks on the rsa cryptosystemlinzi320
 
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsaMohsin Ali
 
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxwerip98386
 
A comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemA comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemIAEME Publication
 
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docxAbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docxransayo
 

Similar a RSA Encryption: Understanding the Rivest-Shamir-Adleman Algorithm (20)

CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithm
 
RSA Algorithm.ppt
RSA Algorithm.pptRSA Algorithm.ppt
RSA Algorithm.ppt
 
Rsa
RsaRsa
Rsa
 
Rsa
RsaRsa
Rsa
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 
Ch09
Ch09Ch09
Ch09
 
Twenty years of attacks on the rsa cryptosystem
Twenty years of attacks on the rsa cryptosystemTwenty years of attacks on the rsa cryptosystem
Twenty years of attacks on the rsa cryptosystem
 
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsa
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
F010243136
F010243136F010243136
F010243136
 
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
 
A comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystemA comparative analysis of the possible attacks on rsa cryptosystem
A comparative analysis of the possible attacks on rsa cryptosystem
 
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docxAbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
AbstractRSA cryptosystem was first discovered in 1977 by Adi Shi.docx
 
Rsa
RsaRsa
Rsa
 
Public key algorithm
Public key algorithmPublic key algorithm
Public key algorithm
 
Presentation
PresentationPresentation
Presentation
 
Rsa
RsaRsa
Rsa
 

Más de Hossain Md Shakhawat

Más de Hossain Md Shakhawat (20)

Recipe for the effective presentaion
Recipe for the effective presentaionRecipe for the effective presentaion
Recipe for the effective presentaion
 
The Road to Higher study in Japan
The Road to Higher study in JapanThe Road to Higher study in Japan
The Road to Higher study in Japan
 
Application of dfs
Application of dfsApplication of dfs
Application of dfs
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Surah Fatiha
Surah FatihaSurah Fatiha
Surah Fatiha
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
Introduction to Printers
Introduction to PrintersIntroduction to Printers
Introduction to Printers
 
Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 
Counting sort(Non Comparison Sort)
Counting sort(Non Comparison Sort)Counting sort(Non Comparison Sort)
Counting sort(Non Comparison Sort)
 
Introduction to digital system
Introduction to digital systemIntroduction to digital system
Introduction to digital system
 
Web engineering cse ru
Web engineering cse ruWeb engineering cse ru
Web engineering cse ru
 
Cryptography cse,ru
Cryptography cse,ruCryptography cse,ru
Cryptography cse,ru
 

Último

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Último (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

RSA Encryption: Understanding the Rivest-Shamir-Adleman Algorithm

  • 2. RSA: Rivest Shamir AdlemanRSA: Rivest Shamir Adleman  RSA is one of the first practical public-key algorithm and is widely used for secure data transmission.  Of all the public-key algorithms proposed over the years, RSA is by far the easiest to understand and implement.  The algorithm is named after the three inventors—Ron Rivest, Adi Shamir, and Leonard Adleman  The RSA algorithm was publicly described in 1977 by Rivest, Shamir, and Adleman at MIT
  • 3. RSA: AlgorithmRSA: Algorithm  Just like the public key cryptography, in RSA the encryption key is public and the decryption key is private, which is kept secret. In RSA, this asymmetry is based on the practical difficulty of factoring the product of two large prime numbers.  RSA gets its security from the difficulty of factoring large numbers. The public and private keys are functions of a pair of large prime numbers (100 to 200 digits or even larger).  A user of RSA creates and then publishes a public key based on the two large prime numbers, along with an auxiliary value. The prime numbers must be kept secret. Anyone can use the public key to encrypt a message, but with currently published methods. If the public key is large enough, only someone with knowledge of the prime numbers can feasibly decode the message.
  • 4. RSA: AlgorithmRSA: Algorithm  The RSA algorithm can be analyzed in three phases: 1. Getting the Message Ready 2. Key generation 3. Message Encryption 4. Message Decryption
  • 5. 5 RSA: Getting ReadyRSA: Getting Ready  In RSA we represent a message by its equivalent integer value. 1. We can represent a message as a binary bit pattern. 2. And a bit pattern can be uniquely represented by a decimal integer number. 3. Thus we can consider that encrypting a message is equivalent to encrypting its corresponding decimal integer number. 4. Example: Let we want to encrypt the message “m” 5. Now we know m= 10010001 . So this message can be uniquely represented by the decimal number 145 which is equal to (10010001)2 . 6. To encrypt m, we encrypt the corresponding number 145, which gives a new number (the cyphertext).
  • 6. 6 RSA: Key GenerationRSA: Key Generation 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose encryption key e (with e<n) that has no common factors with z. (that is e and z are “relatively prime”). 4. Calculate decryption key d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 implies d=e-1 mod z 5. Public key is (n,e). Private key is (n,d). KB + KB -
  • 7. 7 RSA: Encryption & DecryptionRSA: Encryption & Decryption  Given public key (n,e) and private key (n,d) 1. To encrypt message m (<n), compute c = m mod ne 2. To decrypt received bit pattern, c, compute m = c mod nd m = (m mod n)e mod n dMagic happens! c
  • 8. How RSA Works?How RSA Works?
  • 9. 9 Analyze: Key GenerationAnalyze: Key Generation  To generate the two keys, choose two random large prime numbers, p and q. For maximum security, choose p and q of equal length. Then compute the products.  Then randomly choose the encryption key, e, such that e and z=(p - 1)(q - 1) are relatively prime.  Finally, use the extended Euclidean algorithm to compute the decryption key, d, such that ed-1 is exactly divisible by z. That is ed mod z = 1 or d=e-1 mod z 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1)
  • 10. 10 RSA Example:RSA Example: Now Alice chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z). bit pattern m me c = m mod ne 00001100 12 24832 17 encrypt: Encrypting 8-bit messages.  Consider that Alice wants to a message whose equivalent binary bit pattern is 00001100 to Alice Given 00001100=12 as plaintext, Alice send its ciphertext 17 to Bob
  • 11. 11 RSA Example:RSA Example: c m = c mod nd 17 481968572106750915091411825223071697 12 c d decrypt:  Now at the receiver end Bob receives 17 as the ciphertext. Then Bob decrypt the ciphertext to recover the plaintext. Upon receiving 17 as ciphertext Bob decrypts it to recover the plaintext 00001100=12
  • 13. 13 Why does RSA work?Why does RSA work?  We have to show that cd mod n = m , where c = me mod n  Now we know that: for any x and y xy mod n = x(ymodz) mod n , where n= pq and z = (p-1)(q-1)  Then cd mod n = (me mod n)d mod n [ as c = me mod n ] = med mod n = m(edmodz) mod n [For d we have ed mod z =1] = m1 mod n = m
  • 14. 14 Attacks Against RSAAttacks Against RSA  There are a number of attacks against plain RSA as described below:  When encrypting with low encryption exponents (e.g., e = 3) and small values of the m, ciphertexts can be easily decrypted  If the same clear text message is sent to bob or more recipients and the receivers share the same exponent e, but different p, q, and n, then it is easy to decrypt the original clear text message via the Chinese remainder theorem  It is vulnerable to chosen plaintext attack.
  • 15. ReferencesReferences  http://en.wikipedia.org/wiki/  Applied Cryptography by Bruce Schneier; 10th Anniversary edition
  • 16. 16 Md. Shakhawat Hossain Student of Department of Computer Science & Engineering University of Rajshahi E-mail: mshimul86@gmail.com