Cryptography

26

Transcript of Cryptography

Page 1: Cryptography
Page 2: Cryptography

Cryptography What and Why?

Page 3: Cryptography

History

Hieroglyph The Oldest Cryptographic Technique

Steganography

Page 4: Cryptography

Evolution

Page 5: Cryptography

Goals of a Cryptography

Page 6: Cryptography

Cryptosystems

Page 7: Cryptography

FERB PHINEAS CANDACE

Page 8: Cryptography

LETS GET AN ICECREAM

Page 9: Cryptography

CAESAR CIPHER

p is the plaintext and is the i th character in p and k is the secret key

Each letter of the cipher text c is calculated as:

Page 10: Cryptography

LETS GET AN ICECREAMWV JHW DQ LFHFUHDPOH

CAESAR CIPHER

Page 11: Cryptography
Page 12: Cryptography

VIGENERE CIPHER

Each letter of the cipher text c is calculated as:

p is the plaintext and is the i th character in p and is the j th letter of the secret key.

Page 13: Cryptography

VIGENERE CIPHERKEY : PERRYLETS GET AN ICECREAMPERR YPE RR YPERRYPEAIKJ ETX RE GRITICPQ

Page 14: Cryptography

RSA (RIVEST-SHAMIR-ADLEMAN)

Page 15: Cryptography

RSA (RIVEST-SHAMIR-ADLEMAN)

• Generation of a pair of keys

• Encryption of the message at sender end

• Decryption of the message at receiver’s end

Page 16: Cryptography

Generation of RSA key pairs• Choose two prime numbers, p and q

p = 7 and q = 13• Calculate RSA modulus (n)

n = pqn = 91

• Find a number e such that 1<e<m and gcd(e,m) = 1 where m = (p-1)(q-1)let e = 5

Page 17: Cryptography

• Public key is of the form (n,e). Thus the pair (91,5) form our public key. • Private key (d)

ed = 1 mod m5d = 1 mod 72

• Extended Euclidean Algorithmax + by = gcd(a,b)5x + 72y = 15x = 1 – 72y5x = 1 mod 72

Page 18: Cryptography

x y d k

1 0 5

0 1 72

Page 19: Cryptography

x y d k

1 0 5

0 1 72 0

Page 20: Cryptography

x y d k

1 0 5

0 1 72 0

1 0 5 14

Page 21: Cryptography

x y d k

1 0 5

0 1 72 0

1 0 5 14

-14 1 2 2

Page 22: Cryptography

x y d k

1 0 5

0 1 72 0

1 0 5 14

-14 1 2 2

29 -2 1 2

Page 23: Cryptography

• Private key is the pair (91,29) • Message , p is “CS”

c c1 = 58c2 = 83

Cipher text c = 58 83

Page 24: Cryptography

• To Decrypt the messagep = mod np1 = 58 ^ 29 (mod 91)p1 = 67 i.e Cp2 = 83 ^ 29 (mod 91)p2 = 83

So the message is “CS”

Page 25: Cryptography
Page 26: Cryptography