ò{çd@àt ø 2005.0.3. Suppose the plaintext alphabets include a z, A Z, 0 9, and the space character, therefore, we work on 63 instead of 26 for an affine cipher. How many keys are possible? What if we add ;,.,,, and? characters to our plaintext alphabet set, i.e. we work on 67 instead? First, calculate the number of integers which are relative prime with 63 63 3 2 7 63 7 3 36 36 63 2268 67 67 66 67 66 4422 2. The ciphertext UJVDDP was encrypted by a Hill cipher with matrix Find the corresponding plaintext. 4 7 Step : find the inverse matrix modulo 26
4 7 0 0 4+3 4 3 7+5 4 3 0 0+ 4 3 mod26 4+3 22 9 7+5 22 9 0 0+ 22 9 +0 mod26 0 9 0 6 mod26 3+0 5+9 5 9 0 9 +6 5 9 0+ 5 9 6 mod26 3 0 0 9 2 6 mod26 3 3 0 0 9 9 2 3 3 6 9 9 mod26 0 0 7 2 mod26 Step 2: decrypt block by block UJV DDP 20, 9, 2, 3, 3, 5 7 2 20, 9 0, 5mod26 2
2, 3 7 2 5, 8mod26 3, 5 7 2 3, 4mod26 0, 5, 5, 8, 3, 4 AFFINE 3. Trappe 2nd Ed. Chap3.8 Let a, b, c, d, e, f be integers mod 26. Consider the following combination of the Hill and affine ciphers: Represent lock of plaintext as a pair x, y mod 26. The corresponding ciphertext u, v is x, y +e, f u, vmod26 Describe how to carry out a chosen plaintext attack on this system with the goal of finding the key a, b, c, d, e, f. You should state explicitly what plaintexts you choose and how to recover the key. First, we can choose plaintext x, y 0, 0 in order to determine e, f u, v 0, 0 +e, f e, fmod26 Second, we can choose plaintext x, y 0, in order to determine c, d u, v 0, +e, f c + e, d + fmod26 Last, we can choose plaintext x, y, 0 inorder to calculate a, b, 0 +e, f a + c, b + fmod26 3
4. Consider the sequence starting as k,k 2 0, k 3 and define by the length-three recurrence k n+3 k n + k n+ + k n+2. This sequence can also be given by a length-two recurrence. Determine this length-two recurrence by setting up and solving the appropriate matrix equations. Briefly explain the reason why it can be defined by a length-two recurrence equation. Is there a condition such that every sequence satisfying this condition has a unique recurrence describing it? From the recurrence equation and the given initial values, the sequence is 0000... From the proposition at textbook page 48, assume the length of recurrence is three, we can form the Matrix M 3 M 3 x x 2 x 3 x 2 x 3 x 4 x 3 x 4 x 5 0 0 0 0 and find out that M 3 0 we can then try length-two recurrence: x x M 2 2 x 2 x 3 0 0 and find out that M 2 0 therefore, we can solve for the unique length 2 recurrence relation from the following 0 c0 0 M 2 0 c, i.e. c 0 0,c x n+2 x n 4
In general, each sequence has a unique minal length recurrence description, but there can be multiple recurrence solutions for longer length recurrence. Eg. the solutions to 0 0 0 0 0 0 0 0 c 0 c c 2 c 3 include, 0,, and 0, 0, 0, and others 5. The operator of a Vigenere encryption machine is bored and encrypts a plaintext consisting of the same letter of the alphabet repeated several hundred times. The key is a six-letter English word. Eve knows that the key is a word but does not yet know its length. 0 0 a What property of the ciphertext will make Eve suspect that the plaintext is one repeated letter and will allow her to guess that key length is six? She will notice that ciphertext is a repeated sequence of the same six-letter string, so she will guess that the plaintext is one repeated letter and that key length is six. For example, if key is design, the letter is a, the ciphertext is eftjnoeftjnoeftjno.... b Once Eve recognizes that the plaintext is one repeated letter, how can she determine the key? Hint: You need the fact that no English word of length six is a shift of another English word. Since there are only 26 possible candidates for the repeated letter, Eve starts from the repeated ciphertext string ex. eftjno, and subtracts the candidate letter off from each ciphertext ex. assume the letter is a, subtracts a from eftjno gives the key design. Because there is no English word of lengh six that is a shift of another English word, out of these 26 possible reversed keys, there is only one key which is a valid English word. 5
c Suppose Eve doesn t notice the property shown in part a, and therefore uses the method of displacing then counting matches for finding the length of the key. What will the number of matches be for the various displacements? In other words, why will the length of the key become very obvious by this method? Write the ciphertext on a long strip of paper, and again on another long strip. Put one strip above the other, but displaced by a certain number of spaces the potential key length. If we do this for different displacements, we shall find out the maximal number of coincidences when displacement is the key length. Assume that there is no repeated letter in the key, the number of coincidences at other displacement is zero. 6