Sei sulla pagina 1di 19

The Permutation Cipher

The Permutation Cipher is not monoalphabetic. The Permutation Cipher is also called the Transposition Cipher. The Permutation Cipher has been used for hundreds of years. The main idea of the Permutation Cipher is permutation of the positions of letters.

In the Permutation Cipher, Alice and Bob need to choose the length m of the permutation and then a random permutation as the key. Example Suppose Alice and Bob decide that m = 6 and use the permutation 1 2 3 4 5 6 . = 4 3 1 6 2 5

Encryption Alice wants to send the plaintext: he walked up and down the passage two or three times. Alice rst divides the plaintext into groups of size 6 (we call these groups blocks ): hewalk edupan ddownt hepass agetwo orthre etimes then performs the permutation on each of the groups and obtains the ciphertext: WLEHKAUADENPONDDTWPSEHSAEWGAOTTRROEHIETESM.

Decryption When Bob received that ciphertext, he divides the text into blocks of size 6 and for each block he makes the permutation 1 2 3 4 5 6 1 . = 3 5 2 1 6 4 Then he obtains the plaintext.

Remark The Permutation Cipher is not monoalphabetic. In the above example we can see that the rst e is encrypted as L, the second e is encrypted as U and the third e is encrypted as S. This encryption does not change the frequency of alphabetic characters but the positions of the letters. Thus the analysis of the probability of the occurrence of letters will not give Oscar any help.

Attacks The Permutation Cipher is more dicult to break with a ciphertext-only attack. However, it succumbs easily to a known plaintext attack. In fact, if Oscar knows both plaintext and ciphertext, then it is not dicult for him to determine the length m and then nd the key . Although the Substitution Cipher and the Permutation Cipher is not secure, they are important elements in modern cryptosystems.

The Hill Cipher The Hill Cipher was invented in 1929 by Lester S. Hill. The key used in this system is some kind of m m matrix whose elements are from Z26 .

Invertible matrix Suppose A is an m m matrix over a a1,2 1,1 a2,1 a2,2 A= . . . . . . am,1 am,2 Z26 , .. . a1,m a2,m . . . am,m

If there exists an m m matrix B over Z26 , b b1,2 b1,m 1,1 b2,1 b2,2 b2,m B= . . . . .. . . . . . . bm,1 bm,2

bm,m

such that AB = Im , where Im is the m m identity matrix 1 0 0 0 1 0 Im = . . . . , . . .. . . . . 0 0 1 then we say that A is an invertible matrix over Z26 and B is the inverse of A denoted by B = A1 . Note that all the above computations are in Z26 .

Example Suppose Alice and Bob choose the size of matrix m = 2 and use a key 11 8 . K= 3 7 When Alice wants to send a message letusfly to Bob, she rst changes the plaintext into elements in (Z26 )2 as follows (or we can say that the plaintext is divided into blocks of size 2): (11, 4), (19, 20), (18, 5), (11, 24).

10

Then she computes the ciphertext as follows: (11, 4)K (19, 20)K (18, 5)K (11, 24)K = (3, 12) = (9, 6) = (5, 23) = (11, 22)

So the ciphertext is (3,12)(9,6)(5,23)(11,22), i.e., DMJGFXLW The Hill Cipher is not monoalphabetic.

11

Bob can nd from K that K


1

18

23 11

We omitted the details about how to nd K 1 . So he can decrypt the cipher and obtain the original message.

12

The Hill Cipher can be dicult to break with a ciphertext-only attack. However, it succumbs easily to a known plaintext attack by solving linear equations.

13

if Oscar knows both the plaintext and ciphertext, then he knows that 11 4 3 12 K = . 18 5 5 23 He can then compute that 1 11 4 15 14 = . 18 5 24 7 Therefore he obtains K= 15 14 24 7 3 12 5 23 .

14

Remark From the attack of the Hill Cipher we learnt that if there are some linear relationship between plaintext and ciphertext, then the cryptosystem is not secure. An attack for modern encryption systems called linear cryptanalysis is based on a similar idea but much more complicated.

15

The cryptosystems we studied so far are called block cipher. In a block cipher, each element (block) of a plaintext is using a same key K, thus the ciphertext string of x = x1 x2 is eK (x1 )eK (x2 ) .

16

The Stream Cipher A Stream Cipher uses a series of dierent keys instead of one key. In a Stream Cipher, we will use a key stream: z = z1 z2 to encrypt a plaintext. So the ciphertext will be y = y1 y2 = ez1 (x1 )ez2 (x2 ) .

17

There are several dierent types of Stream Ciphers. When the key stream is related to the plaintext, the cipher is called non-synchronous cipher. If the key stream is independent from the plaintext, then it is called synchronous cipher. A stream cipher is called periodic if zi+d = zi for some d.

18

In general, stream ciphers are faster than block cipher in hardware, and have less complex hardware circuitry. They are also suitable for the cases when buering is limited or when characters must be individually processed as they are received. A stream cipher may also used when transmission errors are highly probable, since they have less or no propagation.

19

Potrebbero piacerti anche