SlideShare a Scribd company logo
1 of 2
RSA Algorithm:


   1. Select two very large prime numbers.

   2.   n = p.q

   3. ɸ = (p - 1).(q - 1)

   4.   Select e; such that, e is relatively prime to ɸ and

                                e < ɸ, gcd (e, ɸ) = 1

   5. Select d; such that, d.e mod ɸ = 1 or

                                e = 1 mod ɸ

   6. Public key : {e, n}

        Private key : {d, n}

   7. e = pe mod n

        p = cd mod n




Example:


   1. p = 3, q = 11

   2. n = 3 x 11 = 33

   3. ɸ = (3 – 1).(11 – 1) = 2 x 10 = 20

   4. e = 3, 7, 9, 11, 13, 17, 19
                                                        d = 1, 3 mod 20 ≠ 1
   5. d = 7,                    d.e mod 20 = 1
                                                        d = 2, 6 mod 20 ≠ 1
                                d.3 mod 20 = 1          d = 3, 9 mod 20 ≠ 1
                                                        d = 4, 12 mod 20 ≠ 1
   8. Public key : {33, 33}                             d = 5, 15 mod 20 ≠ 1
                                                        d = 6, 18 mod 20 ≠ 1
        Private key : {7, 33}
                                                        d = 7, 21 mod 20 = 1
Diffe-Hellman Protocol:


       k = gxy mod p




                  Alice                                                     Bob


               R1 gx mod p                                              R2 gy mod p

                                   R                           R




          k = R2x mod p                                            k = R1y mod p
            = (gy mod p)x mod p                                     = (gx mod p)y mod p
            = gxy mod p                                             = gxy mod p




                                         k is the shared key

p and g : two large number with some properties.

More Related Content

What's hot

Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
Kelly Bresnahan
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In Cryptography
Aadya Vatsa
 

What's hot (20)

Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Elliptic curvecryptography Shane Almeida Saqib Awan Dan PalacioElliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
 
Ecc2
Ecc2Ecc2
Ecc2
 
Al-Gamal-W6(al gamal)-d1-d2
Al-Gamal-W6(al gamal)-d1-d2Al-Gamal-W6(al gamal)-d1-d2
Al-Gamal-W6(al gamal)-d1-d2
 
Number Theory In Cryptography
Number Theory In CryptographyNumber Theory In Cryptography
Number Theory In Cryptography
 
Data Security Using Elliptic Curve Cryptography
Data Security Using Elliptic Curve CryptographyData Security Using Elliptic Curve Cryptography
Data Security Using Elliptic Curve Cryptography
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve CryptosystemsDiscrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Improved security system using steganography and elliptic curve crypto...
Improved  security  system using  steganography  and  elliptic  curve  crypto...Improved  security  system using  steganography  and  elliptic  curve  crypto...
Improved security system using steganography and elliptic curve crypto...
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofElliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
 
Introduction to Homomorphic Encryption
Introduction to Homomorphic EncryptionIntroduction to Homomorphic Encryption
Introduction to Homomorphic Encryption
 
Ntewrok secuirty cs7
Ntewrok secuirty cs7Ntewrok secuirty cs7
Ntewrok secuirty cs7
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
Rsa Crptosystem
Rsa CrptosystemRsa Crptosystem
Rsa Crptosystem
 
Understanding CTLE
Understanding CTLEUnderstanding CTLE
Understanding CTLE
 
Information and data security other public key cryptosystems
Information and data security other public key cryptosystemsInformation and data security other public key cryptosystems
Information and data security other public key cryptosystems
 

Similar to Rsa Algorithm

Notes up to_ch7_sec3
Notes up to_ch7_sec3Notes up to_ch7_sec3
Notes up to_ch7_sec3
neenos
 

Similar to Rsa Algorithm (20)

Newfile6
Newfile6Newfile6
Newfile6
 
P10co982 (2)
P10co982 (2)P10co982 (2)
P10co982 (2)
 
Problem
ProblemProblem
Problem
 
Ki2518101816
Ki2518101816Ki2518101816
Ki2518101816
 
Ki2518101816
Ki2518101816Ki2518101816
Ki2518101816
 
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton TensorDual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
 
Number theory lecture (part 2)
Number theory lecture (part 2)Number theory lecture (part 2)
Number theory lecture (part 2)
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
 
Time complexity
Time complexityTime complexity
Time complexity
 
Sol Purcell Ingles
Sol Purcell InglesSol Purcell Ingles
Sol Purcell Ingles
 
Use Theorem 14.1 to show that for all odd n= 3 we have D2n is isomo.pdf
Use Theorem 14.1 to show that for all odd n= 3 we have D2n is isomo.pdfUse Theorem 14.1 to show that for all odd n= 3 we have D2n is isomo.pdf
Use Theorem 14.1 to show that for all odd n= 3 we have D2n is isomo.pdf
 
lecture10.pdf
lecture10.pdflecture10.pdf
lecture10.pdf
 
Complex analysis notes
Complex analysis notesComplex analysis notes
Complex analysis notes
 
Matrix part 3.2 (1)
Matrix part 3.2 (1)Matrix part 3.2 (1)
Matrix part 3.2 (1)
 
Modeling An Rational Integral With Saber State Ams
Modeling An Rational Integral With Saber State AmsModeling An Rational Integral With Saber State Ams
Modeling An Rational Integral With Saber State Ams
 
Notes up to_ch7_sec3
Notes up to_ch7_sec3Notes up to_ch7_sec3
Notes up to_ch7_sec3
 
Notes up to_ch7_sec3
Notes up to_ch7_sec3Notes up to_ch7_sec3
Notes up to_ch7_sec3
 
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
Discrete Logarithm Problem over Prime Fields, Non-canonical Lifts and Logarit...
 
Equivariance
EquivarianceEquivariance
Equivariance
 
Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3
 

More from Ashik Iqbal

Al quran-er-arobi-shikhi
Al quran-er-arobi-shikhiAl quran-er-arobi-shikhi
Al quran-er-arobi-shikhi
Ashik Iqbal
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
Ashik Iqbal
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
Ashik Iqbal
 
Profit From Ramadan
Profit From RamadanProfit From Ramadan
Profit From Ramadan
Ashik Iqbal
 
Mobile/Digital Wallet
Mobile/Digital WalletMobile/Digital Wallet
Mobile/Digital Wallet
Ashik Iqbal
 
Handbook Of Islamic Banking
Handbook Of Islamic BankingHandbook Of Islamic Banking
Handbook Of Islamic Banking
Ashik Iqbal
 

More from Ashik Iqbal (17)

Document Archiving & Sharing System
Document Archiving & Sharing SystemDocument Archiving & Sharing System
Document Archiving & Sharing System
 
Document Archiving & Sharing System
Document Archiving & Sharing SystemDocument Archiving & Sharing System
Document Archiving & Sharing System
 
We Forgot
We ForgotWe Forgot
We Forgot
 
Al quran-er-arobi-shikhi
Al quran-er-arobi-shikhiAl quran-er-arobi-shikhi
Al quran-er-arobi-shikhi
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Commercially Available Fiber Optic Cables
Commercially Available Fiber Optic CablesCommercially Available Fiber Optic Cables
Commercially Available Fiber Optic Cables
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Advanced Artificial Intelligence
Advanced Artificial IntelligenceAdvanced Artificial Intelligence
Advanced Artificial Intelligence
 
Profit From Ramadan
Profit From RamadanProfit From Ramadan
Profit From Ramadan
 
Mobile/Digital Wallet
Mobile/Digital WalletMobile/Digital Wallet
Mobile/Digital Wallet
 
Prophets Graves
Prophets GravesProphets Graves
Prophets Graves
 
Cryprography Assignment
Cryprography AssignmentCryprography Assignment
Cryprography Assignment
 
Cryptography Ashik
Cryptography AshikCryptography Ashik
Cryptography Ashik
 
My Abokash
My AbokashMy Abokash
My Abokash
 
Handbook Of Islamic Banking
Handbook Of Islamic BankingHandbook Of Islamic Banking
Handbook Of Islamic Banking
 
The Window
The WindowThe Window
The Window
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
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
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
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 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

Rsa Algorithm

  • 1. RSA Algorithm: 1. Select two very large prime numbers. 2. n = p.q 3. ɸ = (p - 1).(q - 1) 4. Select e; such that, e is relatively prime to ɸ and e < ɸ, gcd (e, ɸ) = 1 5. Select d; such that, d.e mod ɸ = 1 or e = 1 mod ɸ 6. Public key : {e, n} Private key : {d, n} 7. e = pe mod n p = cd mod n Example: 1. p = 3, q = 11 2. n = 3 x 11 = 33 3. ɸ = (3 – 1).(11 – 1) = 2 x 10 = 20 4. e = 3, 7, 9, 11, 13, 17, 19 d = 1, 3 mod 20 ≠ 1 5. d = 7, d.e mod 20 = 1 d = 2, 6 mod 20 ≠ 1 d.3 mod 20 = 1 d = 3, 9 mod 20 ≠ 1 d = 4, 12 mod 20 ≠ 1 8. Public key : {33, 33} d = 5, 15 mod 20 ≠ 1 d = 6, 18 mod 20 ≠ 1 Private key : {7, 33} d = 7, 21 mod 20 = 1
  • 2. Diffe-Hellman Protocol: k = gxy mod p Alice Bob R1 gx mod p R2 gy mod p R R k = R2x mod p k = R1y mod p = (gy mod p)x mod p = (gx mod p)y mod p = gxy mod p = gxy mod p k is the shared key p and g : two large number with some properties.