Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 DECIPHERING CLASSICAL CIPHER SYSTEMS By: NOOR DHIA AL- SHAKARCHY 2012-2013.

Similar presentations


Presentation on theme: "Lecture 4 DECIPHERING CLASSICAL CIPHER SYSTEMS By: NOOR DHIA AL- SHAKARCHY 2012-2013."— Presentation transcript:

1 Lecture 4 DECIPHERING CLASSICAL CIPHER SYSTEMS By: NOOR DHIA AL- SHAKARCHY 2012-2013

2 SIMPLE SUBSTITUTION CIPHERS: E k (M) = F(m1) F(m2) …..F(mN) =C D K (M) = F(c 1 ) F(c 2 ) …....F(c N ) = M Where: N : is the length of the message. M : is plaintext message given by M = ( m1, m2, …..,mN). C : is ciphertext message given by C = (c1,c2,….., cN). There are many types of simple substitution ciphers according to its equations used to encryption, they: Shifted alphabet (Caesar cipher): C = E k (M) = F(a) = (a + k) mod n M = D K (M) = (E k (M) – K ) mod n = ( c – k ) mod n Where k : is the number of positions to be shifted. a : is a single character of the alphabet. n : is the size of the alphabet.

3 SIMPLE SUBSTITUTION CIPHERS: Example: If k =3 then we can decrypted the following ciphertext as: C = U H Q D L V V D Q F H Dk(M) = R E N A I S S A N C E = M NOTE:- Sometimes when we apply the equation of decipher the ciphertext to plaintext, the result becom negative value. And in this case we adding the value of n to this equation to avoid the negative value as see in example. K = U = 20 ; C = F = 5; ∑ A … Z M = (5 – 20 ) Mod 26 = -15 Mod 26 (Adding 26 ) = 26 – 15 Mod 26 = 11 Mod 26 = 11 = L

4 SIMPLE SUBSTITUTION CIPHERS: Multiplication based (decimation): C = E k (M) = F(a) = ak mod n Where k, n are relatively prime in order to produce a complete set of residues. M = D K (M) = a = [ c * inv (k, n)] mod n NOTE:- The algorithm inv(k, n) returnes the value of a according to the equation C = ak mod n and this algorithm gives as later. Addition and multiplication (affine): The encryption equation E k (M): F(a) = (ak1+k0) mod n Where k1 and n are relatively prime The decryption equation D k (C): C – (K0 mod n) = aK1 mod n a = [ (C-(K0 mod n)) * inv (K1, n)]

5 STREAM CIPHER SYSTEMS Is a system in which the key is fed to an algorithm, which uses the key to generate finite sequence. The algorithm is usually referred to as the sequence generator or key stream generator. stream cipher systems produced long sequence of displacement which were applied character by character to the plaintext message. The encryption and decryption process are: C = E Ki (m i ) = K Ө M …….. to encryption M = D Ki (c i ) = C Ө K = ( M Ө K ) Ө K = M ….. to decryption K Ө K = 0 and K Ө 0 = K

6 mi messag e Key generato r I 0 Initial value mi messag e Ci ciphertex tessage XOR (mixer) Ki ke y I 0 Initial value EncryptionDecryption Key generator Ki key XOR (mixer) ABXOR 000 011 101 110 XOR- Table Stream cipher process

7 STREAM CIPHER SYSTEMS The type of stream cipher systems:- According to repeated key : – Periodic: if the key repeats after d characters (bits). – Not periodic : if the key not repeats that’s mean the key is long enough to avoid repeation. According to generate the key: Synchronous: the stream message generated alone and the stream key generated alone also with out dependent on another. The stream Ciphertext generated by mixed them by XOR mixer. Self- synchronous: the stream message generated alone and the stream key generated in depending on previous Ciphertext.


Download ppt "Lecture 4 DECIPHERING CLASSICAL CIPHER SYSTEMS By: NOOR DHIA AL- SHAKARCHY 2012-2013."

Similar presentations


Ads by Google