A
PRESENTATION ON CRYPTOGRAPHY USING
RSA CRYPTOSYSTEM
• Guided By- Mr. Chandrakanta Mallik
• Presented By- Abhishek Gautam
Sagarkanya Priyadarsini
 Cryptography is the practice and study of techniques for
conveying information security.
 The goal of Cryptography is to allow the intended recipients of
the message to receive the message securely.
 Network security is one of the several models of security which
exist today. This is most efficient and widely used model.
 Here the focus is to control network access to various hosts and
their services, rather than controlling individual host security.
 Hence, modern cryptography techniques are implemented in the
Network Security Model, as it proves to be affordable, functional
and reliable.
Rsa cryptosystem
 Plaintext – The message in its original form.
 Ciphertext – Message altered to be unreadable by anyone except
the intended recipients.
 Cipher- The algorithm used to encrypt the message.
 Cryptosystem – The combination of algorithm, key, and key
management functions used to perform cryptographic operations.
 Private-key cryptography or Symmetric-key algorithm
 Public-key cryptography or Asymmetric-key algorithms
 A single key is used for both encryption and decryption. That's
why its called “symmetric” key as well.
 The sender uses the key to encrypt the plain-text and the receiver
applies the same key to decrypt the message.
 The biggest difficulty with this approach, thus, is the distribution
of the key, which generally a trusted third-party VPN does.
Rsa cryptosystem
 Each user has a pair of keys: a public key and a private key.
 The public key is used for encryption. This is released in public.
 The private key is used for decryption. This is known to the
owner only.
Rsa cryptosystem
 The most famous algorithm used today is RSA algorithm.
 It is a public key cryptosystem developed in 1976 by MIT
mathematicians - Ronald Rivest, Adi Shamir, and Leonard
Adleman.
 RSA today is used in hundreds of software products and can be
used for digital signatures, or encryption of small blocks of data.
 Euclid's Algorithm and its extension
 Modulo operator, its congruence, and multiplicative inverse
 Euler's Phi Function and Theorem
 It is a method of computing Greatest Common Divisor of two
integers (generally positive) .
 It is based on two observations :
a) If a perfectly divides b, then GCD(a,b) = a
b) If a = b * t + l where t and l are integers, then
GCD(a,b) = GCD(b,l)
 It is applied in chain until the remainder is zero.
Rsa cryptosystem
 The modulo operation finds the remainder of division of one
number by another.
 For example, 14 mod 12 = 2 , as when 14 is divided by 12 we get
the remainder as 2.
 The modular congruence, indicated by "≡" followed by "mod"
between parentheses, means that the operator "mod", applied to
both members, gives the same result.
 For example, 38 ≡ 14 (mod 12) is same as 38 mod 12 = 14 mod
12 , which both yield 2.
 The modular multiplicative inverse of a mod m is an integer x
such that a*x ≡ 1 (mod m)
 For example, we wish to find modular multiplicative inverse x of
3 mod 11. We can write this as
 3 -1 ≡ x (mod 11) which is same as 3*x ≡ 1 (mod 11)
 Since RHS is 1, we need to find x such that (3*x) mod 11 = 1
which would give minimum positive value of x as 4.
 The Extended Euclid's Algorithm computes the integers x and y
in the equation called Bézout's identity which is :
ax + by = GCD(a,b)
 When a and b are co-primes, x is given as a-1≡ x (mod b) and y
is given as b-1≡ y (mod a)
 Hence we can easily find out the modular multiplicative inverse
this way.
 Euler's Phi function, φ(n) , is an arithmetic function that counts
the positive integers less than or equal to n that are relatively
prime to n, i.e., GCD(k,n)=1 . The number of values of k here is
φ(n).
 For example, φ(8) = 4, since there are 4 integers {1,3,5,7}
 For any prime p, φ(p) = p-1
 Also, for relative primes p and q, φ(p*q) = φ(p)*φ(q)
 Euler's Theorem states that if GCD (a,n)=1, i.e., a and n are co-
primes, then aφ(n)≡ 1 (mod n)
 If n is prime, then we have an-1≡ 1 (mod n)
 If n is the product of two primes p and q, then a(p-1)*(q-1)≡ 1
(mod n) .
This concept forms the basis of encryption process in RSA
cryptosystem.
ALGORITHM
1. A user must first choose two large prime
numbers, say p and q
EXAMPLE
1.Let Alice choose p=11 and q=19.
ALGORITHM
2.Calculate n = p * q
EXAMPLE
2.Alice calculated p * q as 11 * 19 and got
the value of n = 209.
ALGORITHM
3.Calculate φ(n) = (p-1) * (q-1)
EXAMPLE
3.Alice calculated (p-1) * (q-1) as 10 * 18
and got the value of φ(n) = 180.
ALGORITHM
4.Choose a value of e such that
GCD(e,φ(n)) = 1.
EXAMPLE
4.Alice randomly chose e as 103 which is
co-prime to 180.
ALGORITHM
5.Calculate d such that e * d ≡ 1 (mod
φ(n)) , or in other words, find the
modular multiplicative inverse of e.
EXAMPLE
5.To find the required inverse, Alice would
use Euclid's Algorithm in reverse manner
and then use its extension to find the
inverse. Here's how:
 Applying Euclid's:
180 = 1 * 103 + 77
103 = 1 * 77 + 26
77 = 2 * 26 + 25
26 = 1 * 25 + 1
Remember, Alice chose e = 103 and φ(n)
= 180
 Reversing Euclid's:
 1 = 26 – 25
= 26 – (77 – 2*26)
= 3 * 26 – 77 = 3 * (103 –
77) – 77
= 3 * 103 – 4 * 77 = 3 * (103) – 4 *
(180 – 103)
= 7 * 103 – 4 * 180(Bezout's
Identity)
Remember, Bezout's Identity is in the form
ax + by = gcd(a,b)
 Finding Inverse:
We now write our Bézout's Identity as ex + φ(n)y = 1, and we just
determined x as 7.
Now, the inverse of e is e-1≡ x (mod φ(n)) ≡ 7 (mod 180)
Hence, d = 7
ALGORITHM
6.The Public keys are (e,n),
7.The Private keys are (d,n) .
EXAMPLE
6.Alice thus obtained her Public Key as
(103,209) and Private Key as (7, 209)
ALGORITHM
In order to encrypt a number m, we
calculate c≡me (mod n), where c is the
encrypted number and m is less than n,
keeping in mind that the encryption
(public) key is (e,n).
EXAMPLE
Bob wants to send Alice and important
number, say 10. The cipher using Alice's
public key would be c≡10103 (mod 209)
On calculating this, which comes out to be
32, Bob sends it to Alice.
ALGORITHM
In order to decrypt a cipher c, we calculate
m≡cd (mod n), where m is the original
number, keeping in mind that the
decryption (private) key is (d,n) .
EXAMPLE
Alice receives the encrypted number. The
decrypted number using her private key
would be m≡32 7 (mod 209)
On calculating this, she gets m=10, which
was desired.
Key Generation
 Select p, q p and q both prime
 Calculate n n = p × q
 Select integer d gcd((n), d) = 1; 1 < d < (n)
 Calculate e e = d-1 mod (n)
 Public Key KU = {e, n}
 Private Key KR = {d, n}
Encryption
 Plaintext: M < n
 Ciphertext: C = Me (mod n)
Decryption
 Ciphertext: C
 Plaintext: M = Cd (mod n)
 p = 3
 q = 11
 n = p × q = 33 -- This is the modulus
 z = (p-1) × (q -1) = 20 -- This is the totient function (n). There
are 20 relative primes to 33. What are they? 1, 2, 4, 5, 7, 8, 10, 13, 14,
16, 17, 19, 20, 23, 25, 26, 28, 29, 31, 32
 d = 7 -- 7 and 20 have no common factors but 1
 7e = 1 mod 20
 e = 3
 C = Me (mod n)
 M = Cd (mod n)
 At present, 512 bit keys are considered weak, 1024 bit keys are
probably secure enough for most purposes, and 2048 bit keys are
likely to remain secure for decades.
 One should know that RSA is very vulnerable to chosen plaintext
attacks. There is also a new timing attack that can be used to
break many implementations of RSA.
 The RSA algorithm is believed to be safe when used properly, but
one must be very careful when using it to avoid these attacks.
 Brute Force
 Try all possible keys
 Mathematical Attacks
 Factor n
 Calculate (n)
 Timings Attacks
 Use the running time of the algorithm to determine d, the decryption
key
The RSA Cryptosystem is perhaps the most beautiful application of
mathematics. Theorems of Euler and Euclid we discussed were
proved around 300 years ago, and we find it's application today
extensively in network security, computer software algorithms and in
further advancement of technology to create a better world.

More Related Content

PPTX
Data Encryption Standard (DES)
PPTX
Applications of matrices in Real\Daily life
PDF
RSA ALGORITHM
PPTX
Applications of matrices in real life
PDF
What is API - Understanding API Simplified
PPTX
Cascading Style Sheet (CSS)
PPTX
Elgamal &amp; schnorr digital signature scheme copy
PPT
Introduction to JavaScript
Data Encryption Standard (DES)
Applications of matrices in Real\Daily life
RSA ALGORITHM
Applications of matrices in real life
What is API - Understanding API Simplified
Cascading Style Sheet (CSS)
Elgamal &amp; schnorr digital signature scheme copy
Introduction to JavaScript

What's hot (20)

PPTX
Rsa Crptosystem
PPTX
RSA algorithm
PDF
Computer Security Lecture 7: RSA
PPTX
Cryptography and Network Security
PPTX
Diffie hellman key exchange algorithm
PPTX
Cryptography using rsa cryptosystem
PPT
Diffie-hellman algorithm
PPTX
Number theory and cryptography
PPTX
Cryptography
PPT
Public Key Cryptography and RSA algorithm
PDF
symmetric key encryption algorithms
PPTX
Cryptography
PPTX
Homomorphic Encryption
PPT
The rsa algorithm
PPT
Diffiehellman
PDF
Presentation about RSA
PPTX
Rsa algorithm key generation
PPTX
Cryptography.ppt
Rsa Crptosystem
RSA algorithm
Computer Security Lecture 7: RSA
Cryptography and Network Security
Diffie hellman key exchange algorithm
Cryptography using rsa cryptosystem
Diffie-hellman algorithm
Number theory and cryptography
Cryptography
Public Key Cryptography and RSA algorithm
symmetric key encryption algorithms
Cryptography
Homomorphic Encryption
The rsa algorithm
Diffiehellman
Presentation about RSA
Rsa algorithm key generation
Cryptography.ppt
Ad

Similar to Rsa cryptosystem (20)

PDF
Public-Key Cryptography.pdfWrite the result of the following operation with t...
PPT
ch09_rsa_nemo.ppt
PPT
Unit --3.ppt
PPTX
PPTX
Information and network security 33 rsa algorithm
PPTX
RSA & MD5 algorithm
PPTX
RSA-W7(rsa) d1-d2
PPT
The RSA (Rivest, Shamir & Adleman ) Algorithm
PPT
Rsa rivest shamir adleman
PPT
PDF
F010243136
PDF
Cryptosystem An Implementation of RSA Using Verilog
PDF
Presentation on Cryptography_Based on IEEE_Paper
PPT
Rsa diffi-network security-itt
PPT
The rsa algorithm JooSeok Song
PPT
The rsa algorithm
PPT
The rsa algorithm
PPT
RSA Algorithm.ppt
PPT
The Introduction to RSA Algorithm with numerical example
Public-Key Cryptography.pdfWrite the result of the following operation with t...
ch09_rsa_nemo.ppt
Unit --3.ppt
Information and network security 33 rsa algorithm
RSA & MD5 algorithm
RSA-W7(rsa) d1-d2
The RSA (Rivest, Shamir & Adleman ) Algorithm
Rsa rivest shamir adleman
F010243136
Cryptosystem An Implementation of RSA Using Verilog
Presentation on Cryptography_Based on IEEE_Paper
Rsa diffi-network security-itt
The rsa algorithm JooSeok Song
The rsa algorithm
The rsa algorithm
RSA Algorithm.ppt
The Introduction to RSA Algorithm with numerical example
Ad

More from Abhishek Gautam (7)

PPTX
Power Bi Basics
PPTX
SQL : Structured Query Language
PPTX
Apache Pig
PPTX
Apache Hive
PPTX
Big data
PPTX
Enterprise application environment
PPTX
Software testing
Power Bi Basics
SQL : Structured Query Language
Apache Pig
Apache Hive
Big data
Enterprise application environment
Software testing

Recently uploaded (20)

PDF
Java Basics-Introduction and program control
PPTX
PRASUNET_20240614003_231416_0000[1].pptx
PDF
Computer organization and architecuture Digital Notes....pdf
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
CONTRACTS IN CONSTRUCTION PROJECTS: TYPES
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
Module 8- Technological and Communication Skills.pptx
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Petroleum Refining & Petrochemicals.pptx
PDF
Cryptography and Network Security-Module-I.pdf
PPTX
Amdahl’s law is explained in the above power point presentations
PPT
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
DOC
T Pandian CV Madurai pandi kokkaf illaya
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Measurement Uncertainty and Measurement System analysis
PDF
First part_B-Image Processing - 1 of 2).pdf
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
Software Engineering and software moduleing
Java Basics-Introduction and program control
PRASUNET_20240614003_231416_0000[1].pptx
Computer organization and architecuture Digital Notes....pdf
CyberSecurity Mobile and Wireless Devices
CONTRACTS IN CONSTRUCTION PROJECTS: TYPES
August -2025_Top10 Read_Articles_ijait.pdf
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Module 8- Technological and Communication Skills.pptx
Information Storage and Retrieval Techniques Unit III
Petroleum Refining & Petrochemicals.pptx
Cryptography and Network Security-Module-I.pdf
Amdahl’s law is explained in the above power point presentations
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
T Pandian CV Madurai pandi kokkaf illaya
MLpara ingenieira CIVIL, meca Y AMBIENTAL
Soil Improvement Techniques Note - Rabbi
Measurement Uncertainty and Measurement System analysis
First part_B-Image Processing - 1 of 2).pdf
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Software Engineering and software moduleing

Rsa cryptosystem

  • 1. A PRESENTATION ON CRYPTOGRAPHY USING RSA CRYPTOSYSTEM • Guided By- Mr. Chandrakanta Mallik • Presented By- Abhishek Gautam Sagarkanya Priyadarsini
  • 2.  Cryptography is the practice and study of techniques for conveying information security.  The goal of Cryptography is to allow the intended recipients of the message to receive the message securely.
  • 3.  Network security is one of the several models of security which exist today. This is most efficient and widely used model.  Here the focus is to control network access to various hosts and their services, rather than controlling individual host security.  Hence, modern cryptography techniques are implemented in the Network Security Model, as it proves to be affordable, functional and reliable.
  • 5.  Plaintext – The message in its original form.  Ciphertext – Message altered to be unreadable by anyone except the intended recipients.  Cipher- The algorithm used to encrypt the message.  Cryptosystem – The combination of algorithm, key, and key management functions used to perform cryptographic operations.
  • 6.  Private-key cryptography or Symmetric-key algorithm  Public-key cryptography or Asymmetric-key algorithms
  • 7.  A single key is used for both encryption and decryption. That's why its called “symmetric” key as well.  The sender uses the key to encrypt the plain-text and the receiver applies the same key to decrypt the message.  The biggest difficulty with this approach, thus, is the distribution of the key, which generally a trusted third-party VPN does.
  • 9.  Each user has a pair of keys: a public key and a private key.  The public key is used for encryption. This is released in public.  The private key is used for decryption. This is known to the owner only.
  • 11.  The most famous algorithm used today is RSA algorithm.  It is a public key cryptosystem developed in 1976 by MIT mathematicians - Ronald Rivest, Adi Shamir, and Leonard Adleman.  RSA today is used in hundreds of software products and can be used for digital signatures, or encryption of small blocks of data.
  • 12.  Euclid's Algorithm and its extension  Modulo operator, its congruence, and multiplicative inverse  Euler's Phi Function and Theorem
  • 13.  It is a method of computing Greatest Common Divisor of two integers (generally positive) .  It is based on two observations : a) If a perfectly divides b, then GCD(a,b) = a b) If a = b * t + l where t and l are integers, then GCD(a,b) = GCD(b,l)  It is applied in chain until the remainder is zero.
  • 15.  The modulo operation finds the remainder of division of one number by another.  For example, 14 mod 12 = 2 , as when 14 is divided by 12 we get the remainder as 2.
  • 16.  The modular congruence, indicated by "≡" followed by "mod" between parentheses, means that the operator "mod", applied to both members, gives the same result.  For example, 38 ≡ 14 (mod 12) is same as 38 mod 12 = 14 mod 12 , which both yield 2.
  • 17.  The modular multiplicative inverse of a mod m is an integer x such that a*x ≡ 1 (mod m)  For example, we wish to find modular multiplicative inverse x of 3 mod 11. We can write this as  3 -1 ≡ x (mod 11) which is same as 3*x ≡ 1 (mod 11)  Since RHS is 1, we need to find x such that (3*x) mod 11 = 1 which would give minimum positive value of x as 4.
  • 18.  The Extended Euclid's Algorithm computes the integers x and y in the equation called Bézout's identity which is : ax + by = GCD(a,b)  When a and b are co-primes, x is given as a-1≡ x (mod b) and y is given as b-1≡ y (mod a)  Hence we can easily find out the modular multiplicative inverse this way.
  • 19.  Euler's Phi function, φ(n) , is an arithmetic function that counts the positive integers less than or equal to n that are relatively prime to n, i.e., GCD(k,n)=1 . The number of values of k here is φ(n).  For example, φ(8) = 4, since there are 4 integers {1,3,5,7}  For any prime p, φ(p) = p-1  Also, for relative primes p and q, φ(p*q) = φ(p)*φ(q)
  • 20.  Euler's Theorem states that if GCD (a,n)=1, i.e., a and n are co- primes, then aφ(n)≡ 1 (mod n)  If n is prime, then we have an-1≡ 1 (mod n)  If n is the product of two primes p and q, then a(p-1)*(q-1)≡ 1 (mod n) . This concept forms the basis of encryption process in RSA cryptosystem.
  • 21. ALGORITHM 1. A user must first choose two large prime numbers, say p and q EXAMPLE 1.Let Alice choose p=11 and q=19.
  • 22. ALGORITHM 2.Calculate n = p * q EXAMPLE 2.Alice calculated p * q as 11 * 19 and got the value of n = 209.
  • 23. ALGORITHM 3.Calculate φ(n) = (p-1) * (q-1) EXAMPLE 3.Alice calculated (p-1) * (q-1) as 10 * 18 and got the value of φ(n) = 180.
  • 24. ALGORITHM 4.Choose a value of e such that GCD(e,φ(n)) = 1. EXAMPLE 4.Alice randomly chose e as 103 which is co-prime to 180.
  • 25. ALGORITHM 5.Calculate d such that e * d ≡ 1 (mod φ(n)) , or in other words, find the modular multiplicative inverse of e. EXAMPLE 5.To find the required inverse, Alice would use Euclid's Algorithm in reverse manner and then use its extension to find the inverse. Here's how:
  • 26.  Applying Euclid's: 180 = 1 * 103 + 77 103 = 1 * 77 + 26 77 = 2 * 26 + 25 26 = 1 * 25 + 1 Remember, Alice chose e = 103 and φ(n) = 180
  • 27.  Reversing Euclid's:  1 = 26 – 25 = 26 – (77 – 2*26) = 3 * 26 – 77 = 3 * (103 – 77) – 77 = 3 * 103 – 4 * 77 = 3 * (103) – 4 * (180 – 103) = 7 * 103 – 4 * 180(Bezout's Identity) Remember, Bezout's Identity is in the form ax + by = gcd(a,b)
  • 28.  Finding Inverse: We now write our Bézout's Identity as ex + φ(n)y = 1, and we just determined x as 7. Now, the inverse of e is e-1≡ x (mod φ(n)) ≡ 7 (mod 180) Hence, d = 7
  • 29. ALGORITHM 6.The Public keys are (e,n), 7.The Private keys are (d,n) . EXAMPLE 6.Alice thus obtained her Public Key as (103,209) and Private Key as (7, 209)
  • 30. ALGORITHM In order to encrypt a number m, we calculate c≡me (mod n), where c is the encrypted number and m is less than n, keeping in mind that the encryption (public) key is (e,n). EXAMPLE Bob wants to send Alice and important number, say 10. The cipher using Alice's public key would be c≡10103 (mod 209) On calculating this, which comes out to be 32, Bob sends it to Alice.
  • 31. ALGORITHM In order to decrypt a cipher c, we calculate m≡cd (mod n), where m is the original number, keeping in mind that the decryption (private) key is (d,n) . EXAMPLE Alice receives the encrypted number. The decrypted number using her private key would be m≡32 7 (mod 209) On calculating this, she gets m=10, which was desired.
  • 32. Key Generation  Select p, q p and q both prime  Calculate n n = p × q  Select integer d gcd((n), d) = 1; 1 < d < (n)  Calculate e e = d-1 mod (n)  Public Key KU = {e, n}  Private Key KR = {d, n}
  • 33. Encryption  Plaintext: M < n  Ciphertext: C = Me (mod n) Decryption  Ciphertext: C  Plaintext: M = Cd (mod n)
  • 34.  p = 3  q = 11  n = p × q = 33 -- This is the modulus  z = (p-1) × (q -1) = 20 -- This is the totient function (n). There are 20 relative primes to 33. What are they? 1, 2, 4, 5, 7, 8, 10, 13, 14, 16, 17, 19, 20, 23, 25, 26, 28, 29, 31, 32  d = 7 -- 7 and 20 have no common factors but 1  7e = 1 mod 20  e = 3  C = Me (mod n)  M = Cd (mod n)
  • 35.  At present, 512 bit keys are considered weak, 1024 bit keys are probably secure enough for most purposes, and 2048 bit keys are likely to remain secure for decades.  One should know that RSA is very vulnerable to chosen plaintext attacks. There is also a new timing attack that can be used to break many implementations of RSA.  The RSA algorithm is believed to be safe when used properly, but one must be very careful when using it to avoid these attacks.
  • 36.  Brute Force  Try all possible keys  Mathematical Attacks  Factor n  Calculate (n)  Timings Attacks  Use the running time of the algorithm to determine d, the decryption key
  • 37. The RSA Cryptosystem is perhaps the most beautiful application of mathematics. Theorems of Euler and Euclid we discussed were proved around 300 years ago, and we find it's application today extensively in network security, computer software algorithms and in further advancement of technology to create a better world.