Cryptography What and Why?
History
Hieroglyph The Oldest Cryptographic Technique
Steganography
Evolution
Goals of a Cryptography
Cryptosystems
FERB PHINEAS CANDACE
LETS GET AN ICECREAM
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:
LETS GET AN ICECREAMWV JHW DQ LFHFUHDPOH
CAESAR CIPHER
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.
VIGENERE CIPHERKEY : PERRYLETS GET AN ICECREAMPERR YPE RR YPERRYPEAIKJ ETX RE GRITICPQ
RSA (RIVEST-SHAMIR-ADLEMAN)
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
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
• 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
x y d k
1 0 5
0 1 72
x y d k
1 0 5
0 1 72 0
x y d k
1 0 5
0 1 72 0
1 0 5 14
x y d k
1 0 5
0 1 72 0
1 0 5 14
-14 1 2 2
x y d k
1 0 5
0 1 72 0
1 0 5 14
-14 1 2 2
29 -2 1 2
• Private key is the pair (91,29) • Message , p is “CS”
c c1 = 58c2 = 83
Cipher text c = 58 83
• 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”
Top Related