13.07.2015 Views

17. Cryptography

17. Cryptography

17. Cryptography

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. (hand) Let C = ⎣ ⎡ 1 1⎦ ⎤0 5. Calculate the inverse of C modulo 26. Show calculations. Call the new matrix D and alsoshow work to verify that DC ≡ I mod 26 and CD ≡ I mod 26 are true. First read the Notes below.Notes About Arithmetic Modulo 26:(i) Two numbers r and s are called congruent modulo 26 if their difference is an integer multiple of 26. Whenthat is true, we write r ≡ s mod 26. For example, 63 ≡ 11 mod 26 and -3 ≡ 23 mod 26 are both true.To reduce a number modulo 26 means to subtract or add multiples of 26 to get an integer between 0 and 25. E.g.,to reduce 63, subtract 52 to see that 63 ≡ 11 mod 26; to reduce -3, add 26 to see that -3 ≡ 23 mod 26.If the original number is positive, you can reduce it modulo 26 by dividing it by 26 and using the remainder.MATLAB's function rem does this, and it works on a single numb er or on a matrix. For example, typing rem(29, 26)reduces the number 29 and returns 3; if x is the matrix [29; 63] , then typing rem(x, 26) reduces each number in thematrix, and returns ⎣ ⎡ 311 ⎦ ⎤ . If the original number is negative, you can still use rem but you must add 26 to what remoutputs. For example, typing rem(-30, 26) returns -4; add 26 to see that -4 ≡ 22 mod 26. Try these.(ii) A number r is said to have an inverse modulo 26 if there is another number s such that rs ≡ 1 mod 26. Forexample, (3)(9) = 27, which is congruent to 1 modulo 26, so 3 and 9 are inverses modulo 26. However, 2 has no inversemodulo 26. To see this, calculate 2 times each number between 0 and 25 and check that none of these products arecongruent to 1 modulo 26.(iii) If C and D are integer matrices and reducing each number in C modulo 26 yields D, we write C ≡ D mod 26.A square integer matrix C is said to have an inverse modulo 26 if there is another integer matrix D such thatCD ≡ I mod 26 and DC ≡ I mod 26. It is true that such D will exist if and only if det(C) is a number which has an inversemodulo 26. For example, the matrix A used in questions 1-4 has determinant 3, so A should have an inverse modulo 26,as of course it does.To calculate the inverse of C modulo 26 , calculate the reduced echelon form of [C I] by doing row operations asusual, except use only integer multipliers and reduce each number modulo 26. Important: to scale a row, do not divide –⎡10⎤⎡10 1 0⎤instead, multiply and then reduce modulo 26. Here is an example. Calculate the inverse of ⎢ ⎥ : ⎢ ⎥ ~⎣29 ⎦ ⎣29 0 1 ⎦⎡10 1 0⎤⎡10 1 0⎤⎡10 1 0⎤⎡10⎤⎡ 1 0⎤⎡ 1 0 ⎤ ⎡10⎤⎢⎥ ~ ⎢⎥ ≡ ⎢⎥ ; check: ⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ ≡ ⎢ ⎥ and⎣09 − 2 1⎦⎣027 − 6 3 ⎦ ⎣01 20 3 ⎦ ⎣29 ⎦ ⎣203⎦⎣18227 ⎦ ⎣01 ⎦⎡ 1 0⎤⎡10⎤⎡ 1 0 ⎤ ⎡10⎤⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ ≡ ⎢ ⎥ .⎣203⎦⎣29⎦⎣2627 ⎦ ⎣01 ⎦Page 4 of 4 Project <strong>17.</strong> <strong>Cryptography</strong> - S. Petrovic & J. Day

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!