cryptography and rsa algorithm
TRANSCRIPT
![Page 1: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/1.jpg)
CRYPTOGRAPHY
![Page 2: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/2.jpg)
Terminology :• Encryption :
• Decryption :
PLAIN TEXT
CIPHER TEXT
PLAIN TEXT
CIPHER TEXT
![Page 3: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/3.jpg)
Vernam Cipher
![Page 4: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/4.jpg)
H O W A R E Y O U
7 14 22 0 17 4 24 14 20
Plain text
One time pad
N C B T Z Q A R X
13 2 1 19 25 16 0 17 23
Total 20 16 23 19 42 20 24 31 43
20 16 23 19 16 20 24 5 17Subtract
U Q X T Q U Y F RCipher text
![Page 5: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/5.jpg)
Private-key Cryptography :
• Same key is used to encrypt and decrypt the message
• Sender and the recipient(receiver) of the message must agree on a common key
• It is symmetric Cryptography, parties are equal
• Hence does not protect sender from receiver forging a message & claiming is sent by sender
![Page 6: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/6.jpg)
Bob Alice
Message: hey alice
Message: hey alice
Alice’s key
![Page 7: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/7.jpg)
Public-key Cryptography :
• Public-key cryptography involves the use of two keys:
• A Public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures
• A Private-key, known only to the recipient(receiver), used to decrypt messages, and sign(create) signatures
![Page 8: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/8.jpg)
Hello Alice!
6EB6957008E03CE4
Encrypt
Hello Alice!
Decrypt
Public key
Private key
Bob
Alice
![Page 9: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/9.jpg)
RSA Algorithm :• RSA stands for Ron Rivest , Adi Shamir and Leonard Adleman, who first publicly described it in 1977
• It allows anyone in the communication network to encrypt and send message
• N=pq, where p & q are two distinct primes
• Random positive integer ‘e’ called enciphering exponent must satisfying gcd(e, Ø(n))=1
• Pair (n,e) are made public
![Page 10: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/10.jpg)
Prerequisites :• Prime number
• Prime factorization
• Fermat’s little theorem
• Euler’s phi function
• Euler’s totient theorem
![Page 11: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/11.jpg)
In 1970 british mathematician and scientist Clifford Cocks
came out with a one way fuction called as
“The Trapdoor”
![Page 12: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/12.jpg)
ONE - WAY FUNCTION
Easy
Hard
![Page 13: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/13.jpg)
For this Clifford Cocks took help of Modular Exponentiation
46 Mod 12 = 101
23
4
5
6
7891
0
11
12
13
14
15
1617
3 mod 17 =
12543
![Page 14: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/14.jpg)
me
mod N = ?
Easy
Harde
mod N = c
?
![Page 15: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/15.jpg)
But what about the key
m mod N = ce
c mod N = md
m mod N = med
![Page 16: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/16.jpg)
Prime factorization
![Page 17: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/17.jpg)
9874563210123654789302145987698745632101236547893021459876987456321012365478930214598769874563210123654789302145987698745632101236547893021459876
9874563210123654789302145987698745632101236547893021459876987456321012365478930214598769874563210123654789302145987698745632101236547893021459876
P1=
P2=
98745632101236547893021459876987456321012365478930214598769874563210123654789302145987698745632101236547893021459876987456321012365478930214598769874563210123654789302145987698745632101236547893021459876987456321012365478930214598769874563210123654789302145987698745632101236547893021459876
N=
N=P1×P2
![Page 18: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/18.jpg)
Eulers φ function
Φ(8)=
12345678
=4
![Page 19: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/19.jpg)
Φ(A)= A-1
Eg. Φ(7)=6
Where A is a prime number
Φ(A×B) = (A-1)×(B-1)
Eg. Φ(7×11) = (7-1)×(11-1)= 60
![Page 20: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/20.jpg)
But the problem is how to connect
Modular Exponentiation with
Eulers Φ Function
![Page 21: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/21.jpg)
Eulers Theorem
m = 1 mod n
Φ(n)
![Page 22: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/22.jpg)
Lets make some modifications in the Eulers theorem
m = 1 mod n
Φ(n)
1 =1k
m = 1 mod n
k×Φ(n)
1×m=m m×m = m mod n
k×Φ(n)
m = m mod n
k×Φ(n)+1
![Page 23: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/23.jpg)
m = m mod n
k*Φ(n)+1
m = m mod n e*d
k*Φ(n)+1
e*d
=
d = k*Φ(n)+1
![Page 24: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/24.jpg)
Bibliography
• www.google.com
• www.wikepedia.com
• www.youtube.com
![Page 25: Cryptography and RSA algorithm](https://reader034.vdocument.in/reader034/viewer/2022050808/55cd1930bb61eb507a8b470b/html5/thumbnails/25.jpg)
T H A N K
Y O U