Handout 3 - CIS 3360 Security in Computing Spring 2010...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 3360 Security in Computing Spring 2010 Handout # 3 – Cryptography Examples Prepared by: Shafaq Chaudhry Caesar Cipher Encryption Example: Given the key 3, encrypt the message “department” using Caesar Cipher 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 a b c d e f g h i j k l m n o p q r s t u v w x y z d = 4+3 mod 26 = 7 = g e = 5+3 mod 26 = 8 = h p = 16+3 mod 26 = 19 = s a = 1+3 mod 26 = 4 = d r = 18+3 mod 26 = 21 = u t = 20+3 mod 26 = 23 = w m = 13+3 mod 26 = 16 = p e = 5+3 mod 26 = 8 = h n = 14+3 mod 26 = 17 = q t = 20+3 mod 26 = 23 = w The encrypted message is “ghsduwphqw”. Decryption Example: Decrypt the message “hqhujbriifh” using Caesar Cipher and key of 3 h = 8-3 mod 26 = 5 = e q = 17-3 mo d26 = 14 = n h = 8-3 mod 26 = 5 = e u = 21-3 mod 26 = 18 = r j = 10-3 mod 26 = 7 = g b = 2 – 3 mod 26 = -1 mod 26 = 25 = y r = 18-3 mod 26 = 15 = o i = 9-3 mod 26 = 6 = f i = 9-3 mod 26 = 6 = f f = 6-3 mod 26 = 3 = c h = 8-3 mod 26 = 5 = e The decrypted message is “energyoffice”.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Encryption Example 2: Encrypt the message “hello world” using Caesar cipher with key of 2. h = 8+2 mod 26 = 10 = j; e = 5+2 mod 26 = 7 = g ; l = 12+2 mod 26 = 14 = n ; o = 15+2 mod 26 = 17 = q; w = 23+2 mod 26 = 25 = y; r = 18+2 mod 26 = 20 = t ; d = 4+2 mod 26 = 6 = f The encrypted message is “jgnnq yqtnf”. Substitution Cipher Use the keyword PROGRAM to encrypt the message “national lab day”. Plaintext and ciphertext alphabet is shown below: a b c d e f g h i j k l m n o p q r s t u v w x y z p r o g a m b c d e f h i j k l n q s t u v w x y z So, the message “national lab day” becomes “jptdkjph hpr gpy”. Polyalphabetic Cipher Encrypt the message “this homework is good” using polyalphabetic ciphers method with key SECURITY. a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 s e c u r i t y s e c u r i t y s e t h i s h o m e w o r k i s g o o d e e k m y w f c o s t e z a z m g h s+t = 18 + 19 = 37 mod 26 = 11 = l e+h = 4 + 7 = 11 mod 26 = 11 = l c+i = 2 + 8 = 10 mod 26 = 10 = k u+s = 20 +18 = 38 mod 26 = 12 = m r+h = 17 + 7 = 24 mod 26 = 24 = y i+o = 8 + 14 = 22 mod 26 = 22 = w t+m = 19 + 12 = 31 mod 26 = 5 = f y+e =24 + 4 = 28 mod 26 = 2 = c s+w = 18 + 22 = 40 mod 26 = 14 = o e+o = 4 + 14 = 18 mod 26 = 18 = s c+r = 2 + 17 = 19 mod 26 = 19 = t u+k = 20 + 10 = 30 mod 26 = 4 = e r+i = 17 + 8 = 25 mod 26 = 25 = z i+s = 8 + 18 = 26 mod 26 = 0 = a t+g = 19 + 6 = 25 mod 26 = 25 = z
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

Handout 3 - CIS 3360 Security in Computing Spring 2010...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online