Fall2011+Week+4

Do your individual problems and then try tackling the RSA program. If the text is not clear enough, the page RSA made plain starts with the steps of how to perform RSA encryption and decryption. THERE IS SOME PREP! Do I have to tell you to decode your message in number 1? I just found out our beloved text uses vector times matrix for encryption/decryption. I used matrix times vector. You know from linear algebra that matrix multiplication is usually not commutative and this is one of those cases. Use matrix times vector.

Time saving hint: do your 2by2 decryption matrix times a 2 by whatever ciphertext matrix on a computer and get the plaintext in one shot.

__Megan__ A= 1. QWTCREXWXC 16 22 19 2 17 4 23 22 23 2 [A inverse]*[16 22]=[-46 40]≡[6 14]. Doing the same thing for each pair of numbers gets me 6 14 14 3 22 17 8 19 4 17. goodwriter user:meganternes 2. playfair confirm RS CO user:meganternes 3. Give a primitive root of 31. Factorization of 30 (or 31-1) = 2*3*5. The primitive root raised to some n should be congruent to 1 (mod 31) if and only if n≡0 (mod 31-1). 4^5 (mod 31) ≡ 1, but 5 is not congruent to 0 (mod 30). Similarly with 6^6, 7^15, 8^5, 9^15, and 10^15. 11^n is not congruent to 1 until n=30, and since 30≡0 (mod 30), 11 is a primitive root. user:meganternes
 * 4 || 5 ||
 * 3 || 4 ||

__Ian__ Same A as Megan.

1. ASYVNATYRIHQSI -> 0 18 24 21 13 0 19 24 17 8 7 16 18 8 -> (inverse A)* = 14 20 17 12 0 13 8 13 2 7 0 17 6 4 -> ourmanincharge is A^-1, correct? user:ian.hart A^-1 is right; double check the numbers for H and Q. user:meganternes Fixed. Thank you. user:ian.hart 2. playfair confirm AM HF user:ian.hart 3. Give a primitive root of 37. Factorize (p - 1) -> (37 - 1) = 36 = 2*2*3*3. 5 is the next prime up, so my guess is 5 (is the next prime and won't be created by previous factors). Checking with a quick program confirms this hypothesis. user:ian.hart __Kayla__ Same A as Megan. 1. IWOCFYSIOTOC [A inverse]*[8 22 14 2 5 24 18 8 14 19 14 2] => [ -78 64 46 -34 -100 81 32 -22 -39 34 46 -34] = [0 12 20 18 4 3 6 4 13 8 20 18] = amusedgenius user:kml003 2. playfair confirm FH am. user:kml003 3. Give a primitive root of 41. factorization of 40 (=p-1) => 2*2*5*2. This means that 2, 5 aren't primitive roots. 3 also wouldn't be because it's in the middle. But I double check anyway: in Maple, 3^8 mod 41=1. 3 is not a prime root because 8 is not 0 mod (p-1). Next try is 6, and one doesn't show up until 6^40 mod 41. All groups are shown and not repeated. 6 is a primitive root! user:kml003
 * 4 || -5 ||
 * -3 || 4 ||

__Bailey__ Same A as Megan. 1. DECGSRYFILGZ 2. playfair confirm WX 3. Give a primitive root of 43.

I couldn't wait to find out what my code was.... 1. (A inverse)*3 4 2 6 18 17 24 5 8 11 6 25 = 18 7 4 18 13 14 19 0 3 20 3 4 = shesnotadude 2. xz 3. ﻿factorization of 42 = 2*3*7, so i tried numbers greater than 7 in maple: " for i from 1 by 1 to 43 do print(modp(28^i, 43)) end do " works so 28 is a primitive root user:bea001 Everybody: For two digit primes and 4 digit messages,

Let's write some code which will perform RSA encryption in Maple or SWP or TI-83/84. There is some numerical calculations to be done before you program. Let's see if you can complete this preparation and write some code which will take a 4 digit input and perform an RSA encryption/decryption.

p = 23 q = 59 C1 = p*q = 1357 K = (p - 1)(q - 1) = 1276 mutually prime N1 = 47 solve N1*m - K*y = 1 for m and y 47*m - 1276*y = 1 has m = 543 and y = 20 message: 792 792^47 (mod 1357) ≡ 540 = M M^m mod C1 should get me 792 again. 540^543 (mod 1357) ≡ 792 Is that all I was supposed to do for this part? user:meganternes