Chapter 2  Exercises
1.
Among the shifts of
EVIRE
, there are two words:
arena
and
river
. Therefore,
Anthony cannot determine where to meet Caesar.
2.
The inverse of 9 mod 26 is 3. Therefore, the decryption function is
x
=3(
y

2) = 3
y

2 (mod 26). Now simply decrypt letter by letter as follows.
U
= 20 so decrypt
U
by calculating 3
*
20

6 (mod 26) = 2, and so on. The
decrypted message is ’cat’.
3.
Changing the plaintext to numbers yields 7, 14, 22, 0, 17, 4, 24, 14, 20.
Applying 5
x
+7 to each yields 5
·
7+7 =42
≡
16 (mod 26), 5
·
14+7 = 77
≡
25,
etc. Changing back to letters yields
QZNHOBXZD
as the ciphertext.
4.
Let
mx
+
n
be the encryption function. Since
h
= 7 and
N
=13
,we
have
m
·
7+
n
≡
13 (mod 26). Using the second letters yields
m
·
0+
n
≡
14.
Therefore
n
= 14. The Frst congruence now yields 7
m
≡
1 (mod 26). This
yields
m
= 11. The encryption function is therefore 11
x
+14.
5.
Let the decryption function be
x
=
ay
+
b
. The Frst letters tell us that
7
≡
a
·
2+
b
(mod 26). The second letters tell us that 0
≡
a
·
17 +
b
.Subtracting
yields 7
≡
a
·
(

15)
≡
11
a
. Since 11

1
≡
19 (mod 26), we have
a
≡
19
·
7
≡
3
(mod 26). The Frst congruence now tells us that 7
≡
3
·
b
,so
b
= 1. The
decryption function is therefore
x
≡
3
y
+ 1. Applying this to
CRWWZ
yields
happy
for the plaintext.
6.
Let
mx
+
n
be one a±ne function and
ax
+
b
be another. Applying the Frst
then the second yields the function
a
(
mx
+
n
)+
b
=(
am
)
x
+(
an
+
b
), which is
an a±ne function. Therefore, successively encrypting with two a±ne functions
is the same as encrypting with a single a±ne function. There is therefore no
advantage of doing double encryption in this case. (Technical point: Since
gcd(
a,
26) = 1 and gcd(
m,
26) = 1, it follows that gcd(
am,
26) = 1, so the a±ne
function we obtained is still of the required form.)
7.
²or an a±ne cipher
mx
+
n
(mod 27), we must have gcd(27
,m
)=1
,
and we can always take 1
≤
m
≤
27. So we must exclude all multiples of 3,
which leaves 18 possibilities for
m
. All 27 values of
n
are possible, so we have
18
·
27 = 486 keys. When we work mod 29, all values 1