Cryptography Theory and Practice --- Answers to Selected Exercises

last modified September 19, 1997

Exercise 1.1(a)

The plaintext is from "The Diary of Samuel Marchbanks", by Robertson Davies, Clarke Irwin, 1947.

I may not be able to grow flowers, but my garden produces just as many dead leaves, old overshoes, pieces of rope, and bushels of dead grass as anybody's, and today I bought a wheelbarrow to help in clearing it up. I have always loved and respected the wheelbarrow. It is the one wheeled vehicle of which I am perfect master.

Exercise 1.1(b)

The plaintext is from page 183 of "The Papers of Samuel Marchbanks", by Robertson Davies, Clarke Irwin, 1947.

I learned how to calculate the amount of paper needed for a room when I was at school. You multiply the square footage of the walls by the cubic contents of the floor and ceiling combined, and double it. You then allow half the total for openings such as windows and doors. Then you allow the other half for matching the pattern. Then you double the whole thing again to give a margin of error, and then you order the paper.

Exercise 1.1(c)

The plaintext consists of the French lyrics to "O Canada"

Ô Canada!
Terre de nos aïeux.
Ton front est ceint,
De fleurons glorieux.
Car ton bras
Sait porter l'épée,
Il sait porter la croix.
Ton histoire est une épopée,
des plus brillants exploits.
Et ta valeur,
de foi trempée,
protègera nos foyers et nos droits.

Exercise 1.1(d)

The plaintext is from page 8 of "Lake Wobegon Days", by Garrison Keillor, Penguin Viking, Inc., 1985.

I grew up among slow talkers, men in particular, who dropped words a few at a time like beans in a hill, and when I got to Minneapolis where people took a Lake Wobegon comma to mean the end of a story, I couldn't speak a whole sentence in company and was considered not too bright. So I enrolled in a speech course taught by Orville Sand, the founder of reflexive relaxology, a self-hypnotic technique that enabled a person to speak up to three hundred words per minute.

Exercise 1.6

The plaintext is the following:

The king was in his counting house, counting out his money.
The queen was in the parlour, eating bread and honey.

Exercise 1.7(b)

The plaintext is the following:

Mary, Mary, quite contrary, how does your garden grow?

Exercise 1.10

The plaintext is the following:

There is no time like the present.

Exercise 1.11

The plaintext is from page 351 of "The Codebreakers", by D. Kahn, Macmillan, 1967.

The most famous cryptologist in history owes his fame less to what he did than to what he said, and to the sensational way in which he said it, and this was most perfectly in character, for Herbert Osborne Yardley was perhaps the most engaging, articulate, and technicolored personality in the business.

Exercise 3.4

Suppose that the ciphertext produced in CBC mode is y_1, ... , y_n, and suppose that the ciphertext produced in CFB mode is Y_1, ... , Y_{n-1}. It can be proved that y_{i+1} = e_K(Y_i) for i = 1, ... , n-1. For i=n-1, this says that the two MACs are the same.

Exercise 3.8(b)

The key bits are as follows:

J2 = 100000
J3 = 100100
J4 = 100101
J5 = 100000
J6 = 001101
J7 = 011010
J8 = 001010

Exercise 3.8(c)

The key is 94FB310126C8D0CB.

Exercise 4.1

The inverses are 6, 1075 and 1844, respectively.

Exercise 4.2

The answer is x = 14387.

Exercise 4.3

The answer is x = 7471.

Exercise 4.6

The first plaintext is from page 357 of "The Papers of Samuel Marchbanks", by Robertson Davies, Clarke Irwin, 1947.

I became involved in an argument about modern painting, a subject upon which I am spectacularly ill-informed. However, many of my friends can become heated and even violent on the subject, and I enjoy their wrangles in a modest way. I am an artist myself and I have some sympathy with the abstractionists, although I have gone beyond them in my own approach to art. I am a lumpist. Two or three decades ago it was quite fashionable to be a cubist and to draw everything in cubes. Then there was a revolt by the vorticists who drew everything in whirls. We now have the abstractionists who paint everything in a very abstracted manner, but my own small works done on my telephone pad are composed of carefully shaded, strangely shaped lumps with traces of cubism, vorticism, and abstractionism in them. For those who possess the seeing eye, as a lumpist, I stand alone.

The second plaintext is from page 17 of "Lake Wobegon Days", by Garrison Keillor, Penguin Viking, Inc., 1985.

Lake Wobegon is mostly poor sandy soil, and every spring the earth heaves up a new crop of rocks. Piles of rocks ten feet high in the corners of fields, picked by generations of us, monuments to our industry. Our ancestors chose the place, tired from their long journey, sad for having left the motherland behind, and this place reminded them of there, so they settled here, forgetting that they had left there because the land wasn't so good. So the new life turned out to be a lot like the old, except the winters are worse.

Exercise 4.7(b)

The plaintext is

vanilla.

Exercise 4.8(b)

The question cannot be solved with the given value b1 = 945. You should instead use the value b1 = 43, in which case the solution is found to be x = 15001.

Exercise 5.1

The answers are log_{106} 12375 = 22392 and log_{6} 248388 = 232836.

Exercise 5.2

The answers are log_{5} 8683 = 3909 and log_{10} 12611 = 17102.

Exercise 5.4

The plaintext is from page 1 of "The English Patient", by M. Ondaatje, Alfred A. Knoph, Inc., 1992.

She stands up in the garden where she has been working and looks into the distance. She has sensed a change in the weather. There is another gust of wind, a buckle of noise in the air, and the tall cypresses sway. She turns and moves uphill towards the house. Climbing over a low wall, feeling the first drops of rain on her bare arms, she crosses the loggia and quickly enters the house.

Exercise 5.8 (a)

# EE = 72.

Exercise 5.8 (b)

There are no points of order 72 on EE, so EE is not cyclic.

Exercise 5.8 (c)

The maximum order of an element in EE is 36 (in fact, EE is isomorphic to the group Z_{36} x Z_2). (4,5) is an example of an element that has order 36.

Exercise 5.9 (a)

The answer is beta = (16,23).

Exercise 5.9 (b)

The answer is (5,12), (12,9), (16,20), (9,3).

Exercise 5.9 (c)

The plaintext is

elliptic.

Exercise 6.1 (c)

The answer is k = 1165 and a = 7459.

Exercise 6.6

The signature has gamma = 59 and delta = 79.

Exercise 8.1 (a)

The answer is K_{u,v} = 4567, K_{u,w} = 5019, K_{u,x} = 1332, K_{v,w} = 100, K_{v,x} = 5334 and K_{w,x} = 1982.

Exercise 8.1 (b)

W and X first compute the values a = 1135, b = 2845 and c = 877. Then they compute K_{u,v} from the function f.

Exercise 8.3

U computes alpha ^{a_U} = 7580 and V computes alpha ^{a_V} = 22181. U computes 22181 ^{a_U} = 10141 and V computes 7580 ^{a_V} = 10141.

Exercise 12.6

The plaintext is from page 129 of "Under the Hammer", by J. Mortimer, Penguin Books, 1994.

It was a fine spring morning in Wedensbury Park, Somerset. The dawn chorus was over, but the early sunshine still sparkled on the dew. The daffodils were in bud and the azaleas looked promising, when Lady Pamela Wedensbury threw the entire contents of her husband's wine cellar into the lake.

Back to the home page for the book: click here

dstinson@cacr.math.uwaterloo.ca