You are on page 1of 35

KEELE UNIVERSITY

ALTERNATIVE EXAMINATIONS

January 2022

LEVEL 6

MATHEMATICS

MAT-30038

NUMBER THEORY AND CRYPTOGRAPHY

Full marks can be obtained for correct answers to ALL questions.

Please follow the instructions given on the KLE for completion and
submission of this assessment.

MAT-30038 Page 1 of 5
Throughout, you may use standard results without proof, but you should
give clear statements of these results and how you are applying them.

1. (a) Find all the distinct solutions of the linear congruence

32x ⌘ 52 (mod 84)

[6]
(b) Determine
(i) an integer b 2 Z such that the linear congruence 28x ⌘ b (mod 98) has no
solutions;
(ii) integers a, b 2 Z such that the linear congruence ax ⌘ b (mod 72) has
exactly 6 distinct solutions modulo 72;
(iii) an integer a 2 Z and a natural number n 2 N such that the linear congru-
ence ax ⌘ 108 (mod n) has exactly 12 distinct solutions modulo n.
You should justify your answers briefly. [6]
(c) Let a, b 2 Z and s, n 2 N.
(i) Prove that a ⌘ b (mod n) if and only if as ⌘ bs (mod ns).
(ii) Hence determine whether the following system of simultaneous linear con-
gruences has a solution. (Even if there is a solution, you are not required
to find one explicitly.)

4x ⌘ 20 (mod 52)
6x ⌘ 42 (mod 72).
[8]

2. (a) Let n 2 N. Determine which of the following statements are true, and which
are false. Give proofs of the true statements, and counterexamples to the false
statements.
(i) If the integer a is a primitive root modulo n then a'(n) ⌘ 1 (mod n).
(ii) If the integer a satisfies a'(n) ⌘ 1 (mod n) then a is a primitive
root modulo n.
(iii) A primitive root modulo n exists.
(iv) If a primitive root modulo n exists then every integer a > 1 satisfying
(a, n) = 1 is a primitive root modulo n. [12]
(b) Verify that 2 is a primitive root modulo 25. [6]
(c) Write down a formula for the period of 2h modulo 25, where h 2 N. Hence
determine the number of distinct integers of period 5 modulo 25. [4]

MAT-30038 Page 2 of 5
3. (a) Let p be an odd prime number, and suppose that a is a quadratic residue
modulo p.
(i) Let b denote the inverse of a modulo p. Prove that b is a quadratic residue
modulo p.
(ii) Prove that a is a quadratic residue modulo p if p ⌘ 1 (mod 4), and a
quadratic nonresidue modulo p otherwise. [6]
(b) Evaluate the following Legendre symbols:
✓ ◆
2022
(i) ;
401
✓ ◆
3
(ii) , where p ⌘ 7 (mod 12).
p [10]

MAT-30038 Page 3 of 5
4. (a) Alice and Bob use Diffie-Hellman key exchange to create shared secrets. They
agree publicly on the prime number p = 79 and the primitive root r = 3
modulo p. Eve intercepts the number a = 11 being sent from Alice to Bob and
the number b = 43 being sent from Bob to Alice.
(i) Use the Baby Step Giant Step algorithm to show that Alice’s private key
is a0 = 68.
(ii) Hence determine the shared secret. [10]
(b) Clare proposes a signature scheme based on discrete logarithms, as follows:
Alice and Bob agree (publicly) on a prime number p, and create a shared secret
k 6⌘ 0 (mod p). To sign a message m 2 N, Alice computes s = k m (mod p)
and sends m and s to Bob. Bob verifies the signature by computing k m and
checking that this is congruent to s modulo p.
(i) Suppose that m1 , m2 are distinct messages, with signatures s1 , s2 . Is it
necessarily true that s1 6⌘ s2 (mod p)? Give a proof or a counterexample.
(ii) Suppose that Eve intercepts a message m and its signature s. Let x 2 N.
Show how Eve can determine the signature for the message xm.
(iii) Deduce that if m is coprime to p in part (ii) then in fact Eve can determine
the signature of every message.
(iv) Comment briefly on whether this is a good signature scheme. You may
refer to your answers to parts (i), (ii), and (iii), and/or any other relevant
observations. [10]

MAT-30038 Page 4 of 5
5. Alice and Bob are communicating using the RSA cipher.

(a) Bob’s public key is n and e and his private key is p, q, and d. Alice uses Bob’s
public key to encrypt the message m, giving the ciphertext c, and sends c to
Bob. Prove that if (m, n) = 1 then Bob can decrypt the message by computing
cd (mod n). [6]
(b) Suppose that Bob chooses p = 29, q = 19 and e = 89. Find the remaining part
of Bob’s private key and decrypt the ciphertext c = 21. [8]
(c) Now suppose that Brian, Clare, David and Emma all work for the same com-
pany, which uses the RSA modulus n = 85 for all its employees. Each morning,
Alice sends the same message to everybody in the company. The table below
shows the encryption exponent for each employee and the ciphertexts that each
receives from Alice. Find the message without factoring n or finding '(n).

Encryption Exponent Ciphertext


Brian 15 58
Clare 21 82
David 25 12
Emma 35 23
[8]

MAT-30038 Page 5 of 5

You might also like