Solutions

TMA4155 Introduction to Cryptography - Exam 2014 Sample Solutions
Problem 1. .
a. [100 ]
b.
[100 ]
φ(26) × 26 = 12 × 26 = 312, 26!
The decryption matrix is
−1 13 2
13 4
1 22
M=
·
=
mod 26.
17 7
17 11
0 15
Hence,
6 6
1 22
6 14
·
=
6 16
0 15
6 8
so the original message is ”gone girl”.
mod 26,
Problem 2. [100 ] Let π(x) be the number of primes less equal than x. Then when
x 1, we have
x
π(x) ≈
.
ln x
In particular, there are
1049
1050
−
ln 1050 ln 1049
50 digits primes.
Problem 3. [100 ] The book lists efficient computation, one-way-ness and collision free
(preimage resistant). However, the literature also often lists one-way-ness, preimage
resistance and second preimage resistance as the important properties, so either alternative will be accepted. See the listing in the book for details.
(For the interested reader: Recently, very fast hash functions have fallen out of fashion
for password hashing, since they enable quick offline dictionary attacks. Instead, the
community is moving towards slower hash functions with salting to make such attacks
less feasible.)
Problem 4. .
a. [150 ] By CRT, we deduce that x = 334 mod 23 × 29. Since 900 < x < 1100, we
have x = 1001.
b. [50 ] Noticing that X(X 7 + X 3 + X 2 + 1) = −1 in GF(28 ), we have X1 = −(X 7 +
X 3 + X 2 + 1). Then the answer is −X 7 − X 3 − X 2 + X − 1. Note that − and
+ are the same here, so any combination of the signs will be deemed correct.
Problem 5. .
a. [100 ] 2, 8, −4 ≡ 7, −5 ≡ 6, which can be found by just checking the elements.
b. [100 ] Yes and no. Check if gcd(j, p − 1) = 1 for j = 3 and 1114. So there are
φ(p − 1) = 215 primitive roots of p. (Note: This uses the fact that p is a prime,
which was not stated in the problem. The grading may take this into account.)
c. [50 ] Either using 3 log(5) = log8 (125) = log8 (24) = 24 to deduce that log8 (−5) =
log8 (5) + log8 (−1) = 8 + 50 = 58 or log8 (3) = 23 and log8 (2) = 1/3 = −33 to
deduce that log8 (−5) = log8 (96) = 23 − 33 × 5 = 58.
1
2
Problem 6. .
a. [100 ] 219 ≡ 116 mod 209.
b. [50 ] ne can be expressed as continued fraction [0, 2, 2, 5, 1, 2, 1, 72, 1, 2, 3]. One
tries kd = [0, 2, 2] = 25 and confirms that d = 5. (Note that n = 103 × 877).