You are on page 1of 2

CS/MATH111 ASSIGNMENT 2

due Tuesday, November 4 (2PM)


Individual assignment: Problems 1 and 2.
Group assignment: Problems 1,2 and 3.
Problem 1: (a) Compute 131 (mod 17) by enumerating multiples of the number and the modulus. Show
your work.
(b) Compute 131 (mod 17) using Fermats theorem. Show your work.
(c) Compute 171 (mod 37) by enumerating multiples of the number and the modulus. Show your work.
(d) Compute 171 (mod 37) using Fermats theorem. Show your work.
(e) Find an integer x, 0 x 40, that satisfies 34x = 5 (mod 41). Show your work.
Problem 2: Alices RSA public key is P = (e, n) = (11, 85). Bob sends Alice the message by encoding it
as follows. First he assigns numbers to characters: blank is 2, comma is 3, period is 4, then A is 5, B is 6,
..., Y is 29, and Z is 30. Then he uses RSA to encode each number separately.
Bobs encoded message is:
45
8
52
59
52
8
46
3
3
56

52
20
8
52
2
68
8
23
59
16

8
59
49
16
22
45
14
59
28
72

49
28
74
74
8
60
23
16
16
52

74
8
49
8
70
72
49
49
2
2

49
45
8
49
75
52
8
8
8
64

Decode Bobs message. Notice that you dont have Bobs secret key, so you need to break RSA to
decrypt his message.
For the solution, you need to provide the following:
Describe step by step how you arrived at the solution:
Show how you determined p, q, (n), and d;
Show the computation for the first number in the message.
Give Bobs message in plaintext. (The message is a quote. Who said it?)
If you wrote a program, attach your code to the hard copy. If you solved it by hand, attach your
scratch paper with calculations.
Problem 3: Give complete addition and multiplication tables modulo 9 for the numbers 0, 1, ..., 8. (Use the
LATEX template on the next page.) Use the multiplication table to determine which of those numbers have
inverses modulo 9 and give those inverses.
Submission. To submit the homework, you need to upload the pdf file into ilearn by 2PM on Tuesday,
November 4, and turn-in a paper copy in class.

+
0
1
2
3
4
5
6
7
8

0
0

1
1

2
2

3
3

4
4

5
5

6
6

7
7

8
8

You might also like