Sie sind auf Seite 1von 3

CS2107 first homework

February 1, 2013

Present your answer (on paper) to the following tutorial questions at the beginning of your tutorial session.
Submissions written in the margins of this question sheet will not be marked.

1.

In cryptography, an algorithms keyspace refers to the set of all possible keys that can be used. The
Confederate (Southern) cipher disk used in the American Civil war can be used as a simple rotation cipher
(with a keyspace of 26, and a useful keyspace of only 25), or as an aid when doing a polyalphabetic cipher.
In use by the Confederates, a poly-alphabetic cipher was used with a keyword. Throughout the four years
of the war, only three keywords were ever used, and the Union army deciphered each very quickly, and
were able to read Confederate messages.

One of the keywords was COMPLETEVICTORY, giving a keyword length of 15.


(a) Assuming that keywords could be made up from any of the 26 characters, what is the keyspace with
a keyword length of 15? Briefly explain your answer.
(b) Assuming that keywords could be made up from a pair of words, and there were 30,000 words in a
dictionary, what is the keyspace with a keyword length of 15? Briefly explain your answer.
(c) At the time this system was in use, there were no machines that could automatically go through a
series of possible keys, so exhaustive trials of all the keywords was not an option. Briefly explain
how the Union army could discover the keyword by collecting a large number of messages (They
could intercept them because they were transmitted over telegraph lines).

2.

The M-94 cipher was used by the US army from 1922 to 1942. It had 25 disks, each containing a random
sequence of the letters A-Z around the outside. Disk 1 was ABCEIGDJFVUYMHTQKZOLRXSPWN,
disk 2 was ACDEHFIJKTLMOUVYGZNPQXRWSB and so on. Disk 17 was kind of fun: ARMYOFTHEUSZJXDPCWGQIBKLNV. The normal use was that each day the disks were put on the rod in a
particular (changing daily) order. To send a message, you would then rotate the disks (from the left) until
the message was spelt out in one row. Then you would select any of the other 25 rows as the encrypted
message. For example - if you look closely at the machine, you will see that one row reads BOBLORDCRYPTOMACHINESU. An encrypted version of this could be CUGKPNUVAWNBRFPSEWGN, or
EVEMIDLFJIOYPABHUXWH and so on. To decode, you have to have the matching order of disks,
and you just set up the encrypted message, and then rotate the cylinder until you see a sensible message.

(a) What is the keyspace of this cipher? Briefly explain your answer.
(b) It is possible to use the cipher in a different way, by not only setting up the order of the disks, but
also fixing a particular rotation of each disk relative to the first disk. Each letter is then encoded
by finding each letter to be encoded on the left-most wheel, and then move along the row to find
the translated letter. For example, with the particular ordering and rotations in the image above, we
would translate DICE as follows. D - follow along row to second column (Z), I - follow along
row to third column (P), C - follow along row to fourth column (K), and E - follow along row to
fifth column (I). DICE is encrypted to ZPKI. What is the keyspace of this cipher? Briefly explain
your answer.

3.

The following ciphertext is encrypted using a single monoalphabetic substitution cipher: GRR LMN.
(a) Explain why this ciphertext is difficult to decode using frequency analysis.
(b) (RESEARCH) Find out how much ciphertext must be collected to be sure you have got the correct
(i.e. unique) decryption.

4.

Using the following PLAYFAIR matrices, encrypt the message ATTACKSOON:


O
N
G
M
V

C
A
H
P
W

U
B
I/J
Q
X

R
D
K
S
Y

E
F
L
T
Z

T
Z
E
F
L

M
V
O
N
G

P
W
C
A
H

Q
X
U
B
I/J

S
Y
R
D
K

(a) What are your encrypted texts in each case?


(b) Explain the result you got in part (a) above.
5.

Explain why a signature is normally done on the hash of a message or file, rather than the message or file
itself.

Das könnte Ihnen auch gefallen