14.4 Further exercises and problems 525
14.4 Further exercises and problems
We begin with some technologically important applications of group theory to cryptog-
raphy and number theory.
Exercise 14.18: The set Z
n
forms a group under multiplication only when n is a prime
number. Show, however, that the subset U(Z
n
) ⊂ Z
n
of elements of Z
n
that are co-prime
to n is a group. It is the group of units of the ring Z
n
.
Exercise 14.19: Cyclic groups. A group G is said to be cyclic if its elements consist
of powers a
n
of an element a, called the generator. The group will be of finite order
|G|=m if a
m
= a
0
= e for some m ∈ Z
+
.
(a) Show that a group of prime order is necessarily cyclic, and that any element other
than the identity can serve as its generator. (Hint: let a be any element other than e
and consider the subgroup consisting of powers a
m
.)
(b) Show that any subgroup of a cyclic group is itself cyclic.
Exercise 14.20: Cyclic groups and cryptography. In a large cyclic group G it can be
relatively easy to compute a
x
, but to recover x given h = a
x
one might have to compute
a
y
and compare it with h for every 1 < y < |G|.If|G|has several hundred digits, such a
brute force search could take longer than the age of the Universe. Rather more efficient
algorithms for this discrete logarithm problem exist, but the difficulty is still sufficient
for it to be useful in cryptography.
(a) Diffie–Hellman key exchange. This algorithm allows Alice and Bob to establish a
secret key that can be used with a conventional cypher without Eve, who is listening
to their conversation, being able to reconstruct it. Alice chooses a random element
g ∈ G and an integer x between 1 and |G| and computes g
x
. She sends g and
g
x
to Bob, but keeps x to herself. Bob chooses an integer y and computes g
y
and
g
xy
= (g
x
)
y
. He keeps y secret and sends g
y
to Alice, who computes g
xy
= (g
y
)
x
.
Show that, although Eve knows g, g
y
and g
x
, she cannot obtain Alice and Bob’s
secret key g
xy
without solving the discrete logarithm problem.
(b) Elgamal public key encryption. This algorithm, based on Diffie–Hellman, was
invented by the Egyptian cryptographer Taher El Gamal. It is a component of PGP
and other modern encryption packages. To use it, Alice first chooses a random inte-
ger x in the range 1 to |G| and computes h = a
x
. She publishes a description of
G, together with the elements h and a, as her public key. She keeps the integer x
secret. To send a message m to Alice, Bob chooses an integer y in the same range
and computes c
1
= a
y
, c
2
= mh
y
. He transmits c
1
and c
2
to Alice, but keeps y
secret. Alice can recover m from c
1
, c
2
by computing c
2
(c
x
1
)
−1
. Show that, although
Eve knows Alice’s public key and has overheard c
1
and c
2
, she nonetheless cannot
decrypt the message without solving the discrete logarithm problem.
Popular choices for G are subgroups of (Z
p
)
×
, for large prime p. (Z
p
)
×
is itself cyclic
(can you prove this?), but is unsuitable for technical reasons.