Presentation on theme: "Lecture 3 Classical Cipher System SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY 2012-2013."— Presentation transcript:
Lecture 3 Classical Cipher System SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY
Classical cipher system substitutiontransposition Homophoni c polyalphabeti c polygram simple shifteddecimatio n affin Key word mix Beal High- order Vigene re BeafortVariant beaufort Hill Play Fair
5- POLYGRAM SUBSTITUTION CIPHERS: PolyGram substitution ciphers are ciphers in which group of letters are encrypted together, and includes enciphering large blocks of letters. Play Fair: 1- if m1,m2 in same row, then c1, c2 are the two characters to the right of m1, m2 respectively. 2- If m1, m2 in the same column, then c1, c2 are below the m1,m2. 3- If m1, m2 are in different rows and columns then c1, c2 are the other corners of rectangle. 4- If m1=m2 a null character (e.g. x) is inserted in the plaintext between m1, m2 to eliminate the double. 5- If the plaintext has an odd number of characters a null character is appended to the end of the plaintext.
Example: ∑ =A…Z M = RENAISSANCE 5- POLYGRAM SUBSTITUTION CIPHERS: - Play Fair: HARPS ICODB EFGKL MNQTU VWXYZ K = M = RE NA IS SA NC EX Ek(M)= C= HG WC BH HR WF GV
5- POLYGRAM SUBSTITUTION CIPHERS: Hill Ciphers: Let d=2, M= m1 m2, C= c1, c2 where: C1 =( k 11 m1 +k 12 m 2 ) mod n C2 =(k 21 m1 +k 22 m 2 ) mod n K11k12 K21K22 Where K = C1 C2 K11k12 K21K22 m1 m2 That is : = * mod n Ek(M) = K*M Dk(C) = K -1 *C mod n = K -1 K M mod n = M Where K.K -1 mod n = I (Identical matrix)
5- POLYGRAM SUBSTITUTION CIPHERS: Example: ∑ =A…Z M = EG K K -1 I Mod 26 = M = E G = 4 6 C1 C Y Q = * mod 26 = = To decipher:- m1 m E G = * mod 26 = =