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

PDF
CRYPTOGRAPHY (2).pdf
PPTX
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
PPTX
Cyber Security PowerPoint Templates (1).pptx
PPT
Introduction to cryptography
PPTX
Cyber_--Security_Presentation_FIXED.pptx
PPT
PUBLIC KEY & RSA.ppt
CRYPTOGRAPHY (2).pdf
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Cyber Security PowerPoint Templates (1).pptx
Introduction to cryptography
Cyber_--Security_Presentation_FIXED.pptx
PUBLIC KEY & RSA.ppt

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

PPTX
Data security using rsa
PPTX
Rsa Crptosystem
PPT
Unit --3.ppt
PPTX
RSA Algorithm and its implementation in C++.pptx
PDF
F010243136
DOCX
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
PPT
PPTX
RSA Algorithem and information about rsa
PPTX
Presentation
PPT
Digital Signature Recognition using RSA Algorithm
PPTX
RSA_Algorithm_Detailed_CCNA_Security.pptx
PDF
international security system data threats
PDF
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PPTX
RSA & MD5 algorithm
PPTX
Public key algorithm
PPT
ch09_rsa_nemo.ppt
PPTX
Cryptography and network security
PDF
Cryptography & Security
PPTX
Unit 7 : Network Security
Data security using rsa
Rsa Crptosystem
Unit --3.ppt
RSA Algorithm and its implementation in C++.pptx
F010243136
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
RSA Algorithem and information about rsa
Presentation
Digital Signature Recognition using RSA Algorithm
RSA_Algorithm_Detailed_CCNA_Security.pptx
international security system data threats
PRINCIPLES OF INFORMATION SYSTEM SECURITY
RSA & MD5 algorithm
Public key algorithm
ch09_rsa_nemo.ppt
Cryptography and network security
Cryptography & Security
Unit 7 : Network Security
Ad

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
master seminar digital applications in india
PDF
Computing-Curriculum for Schools in Ghana
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Types and Its function , kingdom of life
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Pre independence Education in Inndia.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Sports Quiz easy sports quiz sports quiz
master seminar digital applications in india
Computing-Curriculum for Schools in Ghana
Basic Mud Logging Guide for educational purpose
Renaissance Architecture: A Journey from Faith to Humanism
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPH.pptx obstetrics and gynecology in nursing
Anesthesia in Laparoscopic Surgery in India
Cell Types and Its function , kingdom of life
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Classroom Observation Tools for Teachers
Module 4: Burden of Disease Tutorial Slides S2 2025
Pre independence Education in Inndia.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
RMMM.pdf make it easy to upload and study
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
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.