SlideShare a Scribd company logo
T3 Assessment
Batch - 16
Cryptography & Network
Security
211FA04571
211FA04154
211FA04314
211FA04342
Table of Contents
1
Understanding RSA: The steps
involved Encryption and Decryption
2 Public and Private Key Usage in RSA
3
Encoding and Decoding RSA Key
Generation
4 Solving RSA in the given Question
5 Strengths and Weakness of RSA
6
Create a new encryption system
Using RSA algorithm
7
Combines With another Encryption
technique
8 Conclusion
Understanding RSA:
The steps involved Encryption and Decryption
Key Generation
• Choose two large prime numbers p and q.
• Compute n = p * q.
• Compute the totient function φ(n) = (p - 1) * (q - 1).
• Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1; e is the public exponent.
• Compute the private exponent d such that d * e 1 (mod φ(n)).
≡
• The public key is (e, n) and the private key is (d, n).
Encryption
• Convert the message M into an integer such that 0 M < n. Compute the cipher-text C using the
≤
public key: C = M^e mod n.
Decryption
• Compute the plaintext M using the private key: M = C^d mod n.
Public and Private Key Usage in RSA
Encryption
• The sender uses the recipient's public key (e, n) to encrypt the message. This ensures that
only the recipient, who possesses the corresponding private key (d, n), can decrypt the
message.
Decryption
• The recipient uses their private key to decrypt the message. Since only the recipient knows
the private key, this ensures the confidentiality of the communication.
Summary
• The sender encrypts the message using the recipient’s public key (e,n)
• The recipient decrypts the message using their private key (d,n)
• This process ensures confidentiality, as only the intended recipient can decode the message.
Benefits and Drawbacks of Key Pair Usage
Benefits of Key Pair Usage Drawbacks of Key Pair Usage
• RSA key pairs enhance security by
providing unique keys for encryption and
decryption, ensuring confidentiality of
messages.
• The use of public keys allows for secure
communication without sharing private
keys, reducing risk of unauthorized
access.
• RSA's key pair mechanism supports digital
signatures, enhancing authenticity and
integrity of the messages exchanged.
• Key management can be complex,
requiring strict protocols to ensure secure
generation and storage of the keys.
• If a private key is compromised, all
communications secured with that key
become vulnerable to interception.
• RSA performance can degrade with large
data sizes, necessitating efficient use of
hybrid encryption strategies.
Solving RSA Examples
Example-01
P = 3, Q = 7, E = 5, M = 10
Key Generation: n = 3 * 7 = 21
φ(n) = (3 - 1) * (7 - 1) = 2 * 6 = 12
e = 5, which is co-prime with 12.
Computed such that d * 5 1 (mod 12). The value of d is 5 (since 5 * 5 = 25, and
≡
25 mod 12 = 1).
Public Key: (e = 5, n = 21), Private Key: (d = 5, n = 21).
Encryption
C = M^e mod n = 10^5 mod 21 = 100000 mod 21 = 16.
Cipher-text C = 16.
Decryption
M = C^d mod n = 16^5 mod 21 = 1048576 mod 21 = 10.
Decrypted message M = 10.
Example-02
P = 17, Q = 23, E = 9, M = 7
Key Generation: n = 17 * 23 = 391
φ(n) = (17 - 1) * (23 - 1) = 16 * 22 = 352
E = 9, which is co-prime with 352.
Computed such that d * 5 1 (mod 12). The value of d is 313
≡
Public Key: (e = 9, n = 391, Private Key: (d = 313, n = 391).
Encryption
C = M^e mod n = 7^9 mod 391 = 40353603 mod 391 = 205.
Cipher-text C = 205.
Decryption
M = C^d mod n = 205^313 mod 391 = 7.
Decrypted message M = 10.
Example-03
Given: e = 13, n = 77
The prime factors of n = 77 are p = 7 and q = 11.
Compute φ(n) = (7 - 1) * (11 - 1) = 6 * 10 = 60.
Computed such that d * 13 1 (mod 60).
≡
The value of d is 37.
Private Key: (d = 37, n = 77).
Decryption
M = C^d mod n = 20^37 mod 77 = 9.
The plaintext M is 9.
Unlocking Secrets
• RSA decryption is a crucial process that transforms ciphertext into plaintext
using the private key. Understanding this mechanism is vital for secure
communications and data protection.
• In the RSA algorithm, decryption involves modular exponentiation with the
private key. The operation is performed on the ciphertext to retrieve the
original message in plaintext form.
• To perform RSA decryption, ensure you have the correct private key
corresponding to the public key used for encryption. The decryption formula
is M = C^d mod n, where M is the plaintext.
• Learning RSA decryption equips you with the necessary skills to handle
secure data transmissions effectively. It’s essential for cybersecurity and
protecting sensitive information from unauthorized access.
Strengths of RSA
• RSA is renowned for its high security level, leveraging large prime numbers to
create strong encryption. This makes unauthorized data access nearly
impossible, ideal for sensitive communications.
• One significant advantage of RSA is its ease of key distribution. Since the public
key can be shared openly, users can securely communicate without prior
arrangements, enhancing flexibility.
• RSA's robustness against various attacks, such as factorization attacks, ensures
ongoing data integrity. This reliability fosters trust in digital signatures and
secure transactions across platforms.
• Furthermore, RSA supports digital signatures, enabling verification of message
authenticity. This feature is crucial in maintaining confidentiality and integrity in
digital communications.
Weaknesses of RSA
Vulnerabilities of RSA Limitations of RSA
• RSA's key length can be susceptible to
advancements in computational power,
making it easier to break over time.
• The security of RSA relies heavily on the
difficulty of factoring large primes, which
may be compromised by future
algorithms.
• RSA is slower than newer algorithms like
elliptic curve cryptography, affecting
performance in large-scale applications.
• RSA requires significantly larger keys than
modern encryption methods, complicating
key management and storage.
• The algorithm is less efficient for encrypting
large messages, necessitating hybrid
encryption methods that add complexity.
• As quantum computing evolves, RSA's
reliance on integer factorization may make it
obsolete, posing a significant risk.
Encryption system that combines the RSA algorithm with the
Caesar cipher
Let's create a new encryption system that combines the RSA algorithm with the Caesar cipher.
Here's how this hybrid system will work,
Hybrid RSA and Caesar Cipher Encryption System
1. Key Generation (RSA):
â—¦ Each user generates a public and private RSA key pair.
â—¦ The Caesar cipher key will be encrypted using RSA.
2. Symmetric Encryption (Caesar Cipher):
â—¦ The message is encrypted using a Ca
â—¦ caesar cipher with a random shift value (key).
â—¦ The Caesar cipher shift key is then encrypted using RSA.
Steps :
3. Choose a Caesar cipher shift key (e.g., shift of 3).
4. Encrypt the message using the Caesar cipher.
5. Encrypt the Caesar cipher shift key using RSA public key encryption.
Encryption Example:
• Message: "DECLARE WAR"
• Caesar cipher shift key: 3
• RSA public key: Assume a small public key (e, n) = (3, 55)
Step 1: Encrypt "DECLARE WAR" using the Caesar Cipher
Using a Caesar cipher with a shift of 3
D G , E H , C F , L O , A D , R U , E H , W Z , A D , R U
→ → → → → → → → → →
The Caesar-encrypted message is “GHFODUH ZDU"
Step 2: Encrypt the Caesar Cipher Shift Key (3) using RSA
Let’s assume the public RSA key is e = 3 , n=55 (for simplicity).
Using RSA encryption formula
C = M^e mod n
M=3 (Caesar cipher shift key)
C = 3^3 mod 55 = 27
The encrypted Caesar cipher shift key is 27.
Final Ciphertext:
• Caesar-encrypted message: "GHFODUH ZDU"
• RSA-encrypted Caesar cipher shift key: 27
So, the final cipher text is,
• "GHFODUH ZDU" (message)
• 27 (encrypted Caesar cipher key)
This system uses RSA to securely transmit the Caesar cipher shift key and uses Caesar
cipher for the actual message encryption.
Conclusion
01 02
03 04
What is RSA? New Hybrid Method
Enhanced Security Future of Encryption
RSA or Rivest-Shamir-Adleman,
is a widely used public key
encryption technique that
secures sensitive data
transmissions.
The new hybrid method combines
RSA with symmetric encryption
techniques like AES. This synergy
leverages RSA’s key exchange.
By integrating RSA with innovative
techniques, we achieve a multi-
layered encryption approach. This
enhances security, making it
harder.
The future of encryption lies in
adaptive systems that incorporate
new technologies and
methodologies. As threats evolve.
Encryption and Decription of a Text Using Rivest-Shamir-Adleman Algorithm

More Related Content

Similar to Encryption and Decription of a Text Using Rivest-Shamir-Adleman Algorithm (20)

PDF
CRYPTOGRAPHY (2).pdf
BhuvanaR13
 
PDF
Public-Key Cryptography.pdfWrite the result of the following operation with t...
FahmiOlayah
 
PPTX
RSA Algm.pptx
Sou Jana
 
PPT
Unit --3.ppt
DHANABALSUBRAMANIAN
 
PPTX
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
archibhartiya
 
PPTX
Rsa Crptosystem
Amlan Patel
 
PPTX
Ch9
Mahender Kumar
 
PPT
Rsa diffi-network security-itt
rameshvvv
 
PPT
ch09_rsa_nemo.ppt
ChandraB15
 
PPT
Rsa
magentie
 
PPTX
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
werip98386
 
PPT
Public Key Cryptography and RSA algorithm
Indra97065
 
PPTX
module 4 ppt on crypography and network security
PoornimaGn3
 
PDF
international security system data threats
gacop74666
 
PDF
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
 
PPTX
RSA-Algorithm-in-Modular-Arithmetic11 (1) (1).pptx
SiddhanthAlape
 
PPT
Network and Information Security unit2.ppt.ppt
Vivekananda Gn
 
PDF
Presentation about RSA
Srilal Buddika
 
PPTX
3 pkc+rsa
Shashank Mishra
 
PPTX
Cryptography
Rutuja Solkar
 
CRYPTOGRAPHY (2).pdf
BhuvanaR13
 
Public-Key Cryptography.pdfWrite the result of the following operation with t...
FahmiOlayah
 
RSA Algm.pptx
Sou Jana
 
Unit --3.ppt
DHANABALSUBRAMANIAN
 
IOT_DEPARTMENT_CST_433_PSI__RSA_unit2.pptx
archibhartiya
 
Rsa Crptosystem
Amlan Patel
 
Rsa diffi-network security-itt
rameshvvv
 
ch09_rsa_nemo.ppt
ChandraB15
 
Rsa
magentie
 
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
werip98386
 
Public Key Cryptography and RSA algorithm
Indra97065
 
module 4 ppt on crypography and network security
PoornimaGn3
 
international security system data threats
gacop74666
 
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
 
RSA-Algorithm-in-Modular-Arithmetic11 (1) (1).pptx
SiddhanthAlape
 
Network and Information Security unit2.ppt.ppt
Vivekananda Gn
 
Presentation about RSA
Srilal Buddika
 
3 pkc+rsa
Shashank Mishra
 
Cryptography
Rutuja Solkar
 

Recently uploaded (20)

PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PPTX
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
DOCX
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 
PPTX
Exploring Linear and Angular Quantities and Ergonomic Design.pptx
AngeliqueTolentinoDe
 
PPTX
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
PDF
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
PPTX
AIMA UCSC-SV Leadership_in_the_AI_era 20250628 v16.pptx
home
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
PPTX
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PPTX
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PDF
Lean IP - Lecture by Dr Oliver Baldus at the MIPLM 2025
MIPLM
 
PPTX
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
PPTX
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 
PPTX
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 
Exploring Linear and Angular Quantities and Ergonomic Design.pptx
AngeliqueTolentinoDe
 
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
AIMA UCSC-SV Leadership_in_the_AI_era 20250628 v16.pptx
home
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Introduction presentation of the patentbutler tool
MIPLM
 
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Lean IP - Lecture by Dr Oliver Baldus at the MIPLM 2025
MIPLM
 
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Ad

Encryption and Decription of a Text Using Rivest-Shamir-Adleman Algorithm

  • 1. T3 Assessment Batch - 16 Cryptography & Network Security 211FA04571 211FA04154 211FA04314 211FA04342
  • 2. Table of Contents 1 Understanding RSA: The steps involved Encryption and Decryption 2 Public and Private Key Usage in RSA 3 Encoding and Decoding RSA Key Generation 4 Solving RSA in the given Question 5 Strengths and Weakness of RSA 6 Create a new encryption system Using RSA algorithm 7 Combines With another Encryption technique 8 Conclusion
  • 3. Understanding RSA: The steps involved Encryption and Decryption Key Generation • Choose two large prime numbers p and q. • Compute n = p * q. • Compute the totient function φ(n) = (p - 1) * (q - 1). • Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1; e is the public exponent. • Compute the private exponent d such that d * e 1 (mod φ(n)). ≡ • The public key is (e, n) and the private key is (d, n). Encryption • Convert the message M into an integer such that 0 M < n. Compute the cipher-text C using the ≤ public key: C = M^e mod n. Decryption • Compute the plaintext M using the private key: M = C^d mod n.
  • 4. Public and Private Key Usage in RSA Encryption • The sender uses the recipient's public key (e, n) to encrypt the message. This ensures that only the recipient, who possesses the corresponding private key (d, n), can decrypt the message. Decryption • The recipient uses their private key to decrypt the message. Since only the recipient knows the private key, this ensures the confidentiality of the communication. Summary • The sender encrypts the message using the recipient’s public key (e,n) • The recipient decrypts the message using their private key (d,n) • This process ensures confidentiality, as only the intended recipient can decode the message.
  • 5. Benefits and Drawbacks of Key Pair Usage Benefits of Key Pair Usage Drawbacks of Key Pair Usage • RSA key pairs enhance security by providing unique keys for encryption and decryption, ensuring confidentiality of messages. • The use of public keys allows for secure communication without sharing private keys, reducing risk of unauthorized access. • RSA's key pair mechanism supports digital signatures, enhancing authenticity and integrity of the messages exchanged. • Key management can be complex, requiring strict protocols to ensure secure generation and storage of the keys. • If a private key is compromised, all communications secured with that key become vulnerable to interception. • RSA performance can degrade with large data sizes, necessitating efficient use of hybrid encryption strategies.
  • 6. Solving RSA Examples Example-01 P = 3, Q = 7, E = 5, M = 10 Key Generation: n = 3 * 7 = 21 φ(n) = (3 - 1) * (7 - 1) = 2 * 6 = 12 e = 5, which is co-prime with 12. Computed such that d * 5 1 (mod 12). The value of d is 5 (since 5 * 5 = 25, and ≡ 25 mod 12 = 1). Public Key: (e = 5, n = 21), Private Key: (d = 5, n = 21). Encryption C = M^e mod n = 10^5 mod 21 = 100000 mod 21 = 16. Cipher-text C = 16. Decryption M = C^d mod n = 16^5 mod 21 = 1048576 mod 21 = 10. Decrypted message M = 10.
  • 7. Example-02 P = 17, Q = 23, E = 9, M = 7 Key Generation: n = 17 * 23 = 391 φ(n) = (17 - 1) * (23 - 1) = 16 * 22 = 352 E = 9, which is co-prime with 352. Computed such that d * 5 1 (mod 12). The value of d is 313 ≡ Public Key: (e = 9, n = 391, Private Key: (d = 313, n = 391). Encryption C = M^e mod n = 7^9 mod 391 = 40353603 mod 391 = 205. Cipher-text C = 205. Decryption M = C^d mod n = 205^313 mod 391 = 7. Decrypted message M = 10.
  • 8. Example-03 Given: e = 13, n = 77 The prime factors of n = 77 are p = 7 and q = 11. Compute φ(n) = (7 - 1) * (11 - 1) = 6 * 10 = 60. Computed such that d * 13 1 (mod 60). ≡ The value of d is 37. Private Key: (d = 37, n = 77). Decryption M = C^d mod n = 20^37 mod 77 = 9. The plaintext M is 9.
  • 9. Unlocking Secrets • RSA decryption is a crucial process that transforms ciphertext into plaintext using the private key. Understanding this mechanism is vital for secure communications and data protection. • In the RSA algorithm, decryption involves modular exponentiation with the private key. The operation is performed on the ciphertext to retrieve the original message in plaintext form. • To perform RSA decryption, ensure you have the correct private key corresponding to the public key used for encryption. The decryption formula is M = C^d mod n, where M is the plaintext. • Learning RSA decryption equips you with the necessary skills to handle secure data transmissions effectively. It’s essential for cybersecurity and protecting sensitive information from unauthorized access.
  • 10. Strengths of RSA • RSA is renowned for its high security level, leveraging large prime numbers to create strong encryption. This makes unauthorized data access nearly impossible, ideal for sensitive communications. • One significant advantage of RSA is its ease of key distribution. Since the public key can be shared openly, users can securely communicate without prior arrangements, enhancing flexibility. • RSA's robustness against various attacks, such as factorization attacks, ensures ongoing data integrity. This reliability fosters trust in digital signatures and secure transactions across platforms. • Furthermore, RSA supports digital signatures, enabling verification of message authenticity. This feature is crucial in maintaining confidentiality and integrity in digital communications.
  • 11. Weaknesses of RSA Vulnerabilities of RSA Limitations of RSA • RSA's key length can be susceptible to advancements in computational power, making it easier to break over time. • The security of RSA relies heavily on the difficulty of factoring large primes, which may be compromised by future algorithms. • RSA is slower than newer algorithms like elliptic curve cryptography, affecting performance in large-scale applications. • RSA requires significantly larger keys than modern encryption methods, complicating key management and storage. • The algorithm is less efficient for encrypting large messages, necessitating hybrid encryption methods that add complexity. • As quantum computing evolves, RSA's reliance on integer factorization may make it obsolete, posing a significant risk.
  • 12. Encryption system that combines the RSA algorithm with the Caesar cipher Let's create a new encryption system that combines the RSA algorithm with the Caesar cipher. Here's how this hybrid system will work, Hybrid RSA and Caesar Cipher Encryption System 1. Key Generation (RSA): â—¦ Each user generates a public and private RSA key pair. â—¦ The Caesar cipher key will be encrypted using RSA. 2. Symmetric Encryption (Caesar Cipher): â—¦ The message is encrypted using a Ca â—¦ caesar cipher with a random shift value (key). â—¦ The Caesar cipher shift key is then encrypted using RSA. Steps : 3. Choose a Caesar cipher shift key (e.g., shift of 3). 4. Encrypt the message using the Caesar cipher. 5. Encrypt the Caesar cipher shift key using RSA public key encryption.
  • 13. Encryption Example: • Message: "DECLARE WAR" • Caesar cipher shift key: 3 • RSA public key: Assume a small public key (e, n) = (3, 55) Step 1: Encrypt "DECLARE WAR" using the Caesar Cipher Using a Caesar cipher with a shift of 3 D G , E H , C F , L O , A D , R U , E H , W Z , A D , R U → → → → → → → → → → The Caesar-encrypted message is “GHFODUH ZDU" Step 2: Encrypt the Caesar Cipher Shift Key (3) using RSA Let’s assume the public RSA key is e = 3 , n=55 (for simplicity). Using RSA encryption formula C = M^e mod n M=3 (Caesar cipher shift key) C = 3^3 mod 55 = 27 The encrypted Caesar cipher shift key is 27.
  • 14. Final Ciphertext: • Caesar-encrypted message: "GHFODUH ZDU" • RSA-encrypted Caesar cipher shift key: 27 So, the final cipher text is, • "GHFODUH ZDU" (message) • 27 (encrypted Caesar cipher key) This system uses RSA to securely transmit the Caesar cipher shift key and uses Caesar cipher for the actual message encryption.
  • 15. Conclusion 01 02 03 04 What is RSA? New Hybrid Method Enhanced Security Future of Encryption RSA or Rivest-Shamir-Adleman, is a widely used public key encryption technique that secures sensitive data transmissions. The new hybrid method combines RSA with symmetric encryption techniques like AES. This synergy leverages RSA’s key exchange. By integrating RSA with innovative techniques, we achieve a multi- layered encryption approach. This enhances security, making it harder. The future of encryption lies in adaptive systems that incorporate new technologies and methodologies. As threats evolve.