COMPUTER SECURITY
SCR 2413M SEM 2, 10/11 LAB 2: Crypto Games Classical Cipher SOLUTION LAB CRYPTO
Lets start the work and have fun with it! Refer to: i. ii. http://www.cryptool-online.org/ Additional notes on E-learning
The lab work consists of two basic processes that involve in cryptography. The processes are as follows: Encryption process
a. b. c. d.
Select encryption algorithm Generate or choose encryption key Encrypt the plaintext Get the encryption result
Decryption process a. Select decryption algorithm b. Generate or choose decryption key c. Decrypt ciphertext d. Get the decryption result
1 RK 2011,0207 ComSec
A.
Encrypt the plaintext using CrypTool with different methods: Caesar Cipher using key: D, N, Z i. Key: D Plaintext Computer Your password is sec*cs03 Frpsxwhu brxu sdvvzrug lv vhf*fv03 Ciphertext
We go to the zoo every Zh jr wr wkh Crr hyhuB Bhdu year
ii.
Key: N
Plaintext Computer Your password is sec*cs03 PBzCHGrE
Ciphertext
lBHE CnFFJBEq vF Frp*pF03
We go to the zoo every jr tB GB Gur MBB rIrEL LrnE year
iii.
Key: Z
Plaintext Computer
RK 2011,0207 ComSec
Ciphertext bNLOTSDQ
2
Your password is sec*cs03
xNTQ OzRRVNQC HR RDB*BR03
We go to the zoo every vD FN SN SGD YNN DUDQX XDzQ year
Using brute-force attack, break the ciphertext (Caesar Cipher) given: dZrs sn aqdZj
The plaintext: _____________________________ east to break______ How did you do it? by changing the keys until I got the answer Substitution key: SMILE
Plaintext Computer Your password is sec*cs03 Injouteq
Ciphertext
Ynuq osrrwnql dr rei*ir03
We go to the zoo every We go to the zoo every year year
Vigenere cipher (please refer to the Vigenere Tableau http://nob.cs.ucdavis.edu/classes/ecs155-200504/handouts/vigenere.html) i. Key: SMILE Plaintext
RK 2011,0207 ComSec
Ciphertext
3
Computer Your password is sec*cs01
UAuAyLqz qACC tsEAHsJp qD wwo*kD01
We go to the zoo every oq oz xG Fpp DGA mGiJK GpeJ year
ii. Key: SMILEINTHERAIN
Plaintext Computer Your password is sec*cs03 UAuAyBrK
Ciphertext
qACC tiFLDsId qF Kqk*nw03
We go to the zoo every oq oz xw GAl DFo mIwDG JiiE year
B.
Identify the pattern of encryption results (ciphertext); identify the advantages and disadvantages of each cipher systems. Caeser cipher system: The cipher text pattern takes the form of alphabets that been shifted form it original position arbitrary. So, the number of positions becomes the key-value. Substitution system: In this system units- single, double or triplets of letters- of plain texts are replaced with cipher texts according to regular system.no additional keys used the only security way is to keep the substitution table secret. Vigenere Cipher: This system uses a chosen key of an arbitrary length, and then we follow caeser cipher method, by shifting the letters positions.
4
RK 2011,0207 ComSec
System Caeser cipher Substitution system Vigenere
Advantages Simple and easy to memorize Frequencies hidden Strong encryption
Disadvantages Easy breakable method Message and key are longer Quit complex
Analyse the ciphertext for:
i. ii. iii. iv.
Number: Symbol: Repeated alphabet (i.e. zoo): Use the frequency analysis to analyse the alphabet distribution: System Caeser Cipher Number Number still same Symbol The symbols are not changed Repeated alphabet Easy to guess alphabets because of using same position shift Sam as Caesar easy to decrypt the text Difficult to guess because each letter of repeated pair will have a different match in the cipher text when encrypted.
Substitution System Vigenere
No change in numbers No change in the numbers
Keep symbols
Keep the symbols as they are
5 RK 2011,0207 ComSec
Playfair key: SMILE (Refer to http://www.simonsingh.net/The_Black_Chamber/playfaircipher.htm) Plaintext: PERSONAL COMPUTER
Ciphertext:_______________________ US PI GO DS FK SQ PU IU ________________________
Transposition (Row and Column) keyword: SMILE, BUS (Refer to cryptos extra slide) Plaintext: PERSONAL COMPUTER i. Key : SMILE Draw the matrix. S P N M R E O O E M E A P I R L U L S C T E O O E
I R L U
L S C T
M E A P
S P N M R
6 RK 2011,0207 ComSec
Ciphertext: ORSEPOLCANEUTPMR
ii.
Key : BUS Draw the matrix. PERSONAL COMPUTER U E O L M T S R N C P E
B P S A O U R
B P S A O U R
S R N C P E
U E O L M T
Ciphertext:PRESNOAC;OPMUETR
7 RK 2011,0207 ComSec