1. Section 3.6 - Problem 4
√
a) We have 8051 ≈ 89.7 so we calculate
902 − 8051 = 49
which is a perfect square. Thus we have 8051 = 902 − 72 = 83 · 7 is the prime factorization.
√
b) We have 73 ≈ 8.5 so we calculate
92 − 73 = 8
102 − 73 = 27
112 − 73 = 48
122 − 73 = 71
..
.
372 − 73 = 1296
which is the only perfect square in the sequence. Thus 73 = (37 − 36)(37 + 36) = 1 · 73 is
its prime factorization and so 73 is prime.
√
c) We have 46009 ≈ 214.5 so we calculate
2152 − 46009 = 216
2162 − 46009 = 647
2172 − 46009 = 1080
2182 − 46009 = 1515
..
.
2352 − 46009 = 9216 = 962
Thus 46009 = (235 − 96)(235 + 96) = 135 · 331 is the prime factorization.
√
d) We have 11021 ≈ 104.9 so we calculate
1052 − 11021 = 4
which is a perfect square. Thus 11021 = 103 · 107 is its prime factorization.
2. Section 8.4 - Problem 2
We have φ(n) = (p − 1)(q − 1) = n − (p + q) + 1 and so −(p + q) = φ(n) − n − 1. Thus p
and q are roots of the quadratic polynomial
(x − p)(x − q) = x2 − (p + q)x + pq = x2 + (φ(n) − n − 1)x + n
In our case, n = 4386607 abd φ(n) = 4382136 and this becomes
(x − p)(x − q) = x2 − 4472x + 4386607
The discriminant of this polynomials is 44722 − 4 · 4386607 = 2452356 = 15662 . Using the
quadratic formula, we find the roots p and q to be
4472 ± 1566
= 1453 and 3019
2
3. Section 8.4 - Problem 8
We have 2881 = 43 · 67. Thus φ(2881) = 42 · 66 = 2772. Using the Euclidean algorithm, we
compute the decryption key, d ≡ e−1 (mod 2772). This gives d ≡ 1109 (mod 2772). To decrypt
the message, we raise each block in
0504
1874
0347
0515
2088
2356
0736
0468
to the power of of 1109 and reduce modulo 2881. This gives us
0400
1902
0714
0214
1100
1904
0200
1004
or EAT CHOCOLATE CAKE.
4. Section 8.4 - Problem 14
Let the moduli be n1 , n2 , n3 and write n1 = p1 q1 , n2 = p2 q2 and n3 = p3 q3 , with pi , qi all
prime and pi 6= qi for fixed i.
First compute gcd(n1 , n2 ),gcd(n1 , n3 ) and gcd(n2 , n3 ). If one of these numbers is not 1,
say gcd(n1 , n2 ) 6= 1, then n1 and n2 have a prime factor in common, say p1 = p2 . Then
gcd(n1 , n2 ) = p1 and we have factored n1 , thus breaking the code.
Otherwise we have gcd(n1 , n2 ) = gcd(n1 , n3 ) = gcd(n2 , n3 ) = 1. We know the ciphertext
message C ≡ P 3 modulo n1 ,n2 and n3 . As these are pairwise coprime, by the Chinese remainder theorem we can find an integer x between 0 and n1 n2 n3 − 1 such that C ≡ x (mod n1 n2 n3 ).
Now P is an integer between 0 and min{n1 , n2 , n3 } − 1, and so P 3 is an integer between 0 and
(min{n1 , n2 , n3 } − 1)3 < n1 n2 n3 − 1. As we know C ≡ P 3 (mod n1 n2 n3 ), we thus know P 3
and can recover P by taking the cube root.
5. Section 8.4 - Problem 16
If (n1 , n2 ) > 1 then we can factor n1 as n1 = (n1 , n2 ) ·
and hence find d ≡ e−1 (mod φ(n)) and break the system.
n1
.
(n1 ,n2 )
6. Section 9.1 - Problem 2
a) We know that ord11 3 divides φ(11) = 10. We check
31 ≡ 3 (mod 11)
32 ≡ 9 (mod 11)
35 ≡ 9 · 27 ≡ 9 · 5 ≡ 1 (mod 11)
Thus ord11 3 = 5.
b) We have φ(17) = 16 so we check
22 ≡ 4 (mod 17)
24 ≡ −1 (mod 17)
and so 28 ≡ 1 (mod 17) and hence ord17 2 = 8.
Thus we can calculate φ(n)
c) We have φ(21) = 2 · 6 = 12 so we check
102 ≡ 16 (mod 21)
103 ≡ 160 ≡ 13 (mod 21)
104 ≡ (−5)2 ≡ 4 (mod 21)
106 ≡ 4 · 16 ≡ 1 (mod 21)
and so ord21 10 = 6.
d) We have φ(25) = 20 so we check
92 = 81 ≡ 6 (mod 25)
94 ≡ 36 ≡ 11 (mod 25)
95 ≡ 99 ≡ −1 (mod 25)
and hence 910 ≡ 1 (mod 25). Thus ord25 9 = 10.
7. Section 9.1 - Problem 6
a) 3 is a primitive root modulo 4, as 3 6= 1 and φ(4) = 2.
b) 2 is a primitive root modulo 5, as 24 = 16 is the first power of 2 congruent to 1 modulo 5.
c) 3 is a primitive root modulo 10, as φ(10) = 4 and 32 = 9 6≡ 1 (mod 10).
d) Noting that φ(13) = 12 we calculate:
22 = 4
23 = 8
24 = 16 ≡ 1 (mod 13)
26 = 64 ≡ −1 (mod 13)
Thus 2 is a primitive root modulo 13.
e) We have φ(14) = 6 so we check
32 = 9
33 = 27 ≡ −1 (mod 13)
and so 3 is a primitive root modulo 14.
f) We have φ(18) = 6 and so we check
52 ≡ 7 (mod 18)
53 ≡ 35 ≡ −1 (mod 18)
and so 5 is a primitive root modulo 18.
8. Section 9.1 - Problem 8
We have φ(20) = φ(4)φ(5) = 8, so it suffices to check that xd ≡ 1 (mod 20) for some
d ∈ {1, 2, 4} for each x coprime to 20. We have
(−9)2 = 92 = 81 ≡ 1 (mod 20)
(−7)4 = 74 = 492 ≡ 92 ≡ 1 (mod 20)
(−3)4 = 34 = 81 ≡ 1 (mod 20)
Thus 20 has no primitive roots.
9. Section 9.1 - Problem 10 (Problem 12 in the 6th edition)
Let y = ordn a · ordn b. We have (ab)y = ay by ≡ 1 (mod n), as y ≡ 0 (mod ordn a) and
y ≡ 0 (mod ordn b). Thus ordn (ab) | y and therefore ordn (ab) ≤ ordn a · ordn b.
Suppose (ab)x ≡ 1 (mod n). Then ax ≡ b−x (mod n). We have ordn (b−x ) | ordn b and so
ax·ordn b ≡ b−x·ordn b ≡ 1 (mod n)
Thus ordn a | x · ordn b. But as (ordn a, ordn b) we thus have ordn a | x. Similarly we obtain
ordn b | x. Thus (ab)x ≡ 1 (mod n) implies ordn a · ordn b | x. Thus ordn (ab) ≥ ordn a · ordn b
and therefore ordn (ab) = ordn a · ordn b.
10. Section 9.1 - Problem 14 (Problem 16 in the 6th edition)
If ordm a = m − 1, then m − 1 | φ(m) and hence φ(m) ≥ m − 1. This can only occur if
φ(m) is prime.
© Copyright 2026 Paperzz