home2 Homework 2 (7% of the final grade) [Deadline Extended]
"Methods of Cryptanalysis of Simple Ciphers"

Please  submit a full account of your deductive process in writing at the  lecture  on 13.04.2000.
Your submissions will be graded, based on the reasoning and deductions or (computer assisted clues)
that you demonstrate (correct plaintext will be only about 1/2  of your grade). Submission is in singles.

As before early submission is encouraged (unlimited number of submissions). Please submit only when you have
solved all four puzzles. There is a 5 point bonus for an early submission. Deadline for early submissions
is 06.04.2000, 24:00.

Please note that THE  deadline will be strict.


1) VIGENERE (BEAUFORT variant)(15%)

TTEVP EUWJI MJCWD ZBPUR PXHPM FEWVP UAGIA CPNGJ LJUDP NUABC
HPTNU LKAQF FNICI DGCTO IUEMV ZOTZL CJRGO JUBTT EHCCT GYNIA
QHBJK MVVAA VUFWI SVIUM LSVHF VPGIO ULJHO WTPEN ISGJQ AQSPJ
KAIAR CVUEU TSVHZ LIAJI IPLNC UFAVD VMOVE JDZCC UTVSV UPJEV
TSVHB HUWOZ OUBTE LYGXK GMPGI PTUMS VDENC UMWRJ AGQUS WWZVW
PZRMW JUMQG PIIUU HACIA VKUAA KGMPG ENC

There is one non-English word in this text. Do you see it? I.C.



2) The Grilles (30%)
 If you think these Grilles are too big, then what do you think about this one?

3) ADFGX (20%)

This cipher was used by the highest commands of the German army during the WWI.  This cipher is a
product of a checkerboard substitution with a pair of identical keywords: ADFGX, ADFGX (these
letters were chosen for fast Morse code transmission) and a complete columnar transposition of the
resulting text. If the message is shorter than the rectangle for the transposition it is padded with one of
the pairs (for ex. ... XG XG XG.) before doing the transposition. Notice that in general substitution pairs
are broken by the transposition process.  You can see an example here (notice however, that we used
complete transposition and not an incomplete (irregular)  one for simplicity).

This cipher was broken by the French captain Georges-Jean Pavin in 1918, using only pen and paper
analysis. You are welcome to repeat his brilliant Cryptanalysis.

Here are two messages encrypted with ADFGX cipher (We are lucky, so they were encrypted with the
same keys):
AAAFA DXXXF XXAXF AGXAX XXAFA GDXDG DAGFX DGDAG FAAAG DFXAA
AAAGA XAFXF AGDAX XFXAA XXDXX AFXFA AGAFX DAADA DDDAD GDDGX
ADGDG AGDAA AFAXF GDAGA AAGAA FDAXD XXGAF XAGXD GAFGF FAAAG
GAXXD DGGGX AAAXA AGFAG DADAA AXFDA XAFFA AFAAD FXAGG DXXFA
FDAGX DDXDG DFGDX AXFAA AGFAD GDFDF FFAAF GXAFX XXDXA DGFFX
XDXAD AFGGX DAAAG AXGFX GAFXA AGGAD AFAAX XAXGA GAXAF AADDG
DFFGA GAA

AFDDA DGAXA FDGFG XGAAG AAXAX AAXDA GDFAD DDAAD DFAAA AGAAA
FGDAG FFAAF XXXDF XXDFA DXGAF DFXDF FAAAG GDXAG DGFAA FGADD
DFFAX DXAXX AGGAG AAAXF AAAXX GAFGG AXAGD XDFAG FFDAA GDXAX
FAFAG FDDXD GDAAG DAGXD XAGDA DDAGA AAAFG DADDA GDADA AAXDG
AGAGX GAAAF DGXDA DGGFA GXFXA AXXFG GFDAX XXDFD XGAGX XDXAD
DAFAX AAADA DDFAX FXFFF ADAFA XGAAA AGAAG GXXDA DXGAA GXGDA
ADFDG XAA

If you need a hint, here it is (in one of the ciphers, shown in the class):
NNWAK SWQYH LNETD QCUBN MNHGS TTOGR PTWQG HOXQE ZPQBZ TWKOF
QAKRO JTMMN EQFEC QRZLG HXDRW FMCEA GBNSF SHJOM LKEXQ JCCLL
BGSFY XLLKT DTCHQ FO


4) ENIGMA  CIPHER (35%)

[Please consider a simplified variant of Enigma that was described in the class: no ring
setting, simple stepping function (no peculiarities), stepping after letter Z. No keyboard permutation:
if rotor R1 is set to indicator setting A (letter A is seen in the indicator window), then typing A will
send current into the letter A terminal of R1. Assume also that rotors move after the encryption
operation and not before it as was in a real machine.]

PART  A (15%) [Attack on plug-less Enigma: "batons" or "cliques on the rods" method]

Suppose that one of the Railway cipher clerks is using a plug-less Enigma machine (no plugs in the stecker)
for which we also know  the wirings of its first rotor (R1):

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
J G D Q O X U S C A M I F R V T P N E W K B L Z Y H

Today we have received encrypted message which begins with:  MCLUK ZPUUJ MX..
We have all the reasons to believe that it stands for:                      CONFI DENTI AL..

Please test correctness of this guess, and also find the initial position (indicator setting) of the first rotor.
[assume, that only R1 rotor was moving during the encryption of this part of the message]. You may also
use another setting given here.

PART  B (20%) [Recover the Wires]

It is known  that Polish cryptanalysts were able to recover the Enigma rotor wirings. Can you repeat
their achievement? Suppose that in a just captured command post you have found an intact Enigma
machine. You can type on it, take out all the plugs, set your own message keys (indicator settings).
For some reason you however can't open the box, and see the wires of the rotors. How many 'queries'
to the machine are needed in order to recover all three rotors R1, R2, R3? (Count both the number of
letters you have to type, and the number of times you changed the indicator setting. State also
complexity of the analysis, i.e. the number of steps it will take.). Explain your method.



BONUS  5% of the Final Grade for the first 5   correct e-mail submissions
(Note that the deadline for this bonus is 24:00, 11.04.2000,  which is about a day  earlier than for the homework)
I will post how many correct solutions I have received (on the main page of the site).  Those, who will miss
the wining five,  will receive a 10% bonus to their homework assignment (consolation prize).

GRANDPRE

This text was encrypted using Grandpre homophonic substitution method. The choice  of
homophones during the encryption was random. The text contains several English sentences.
No word division.

 61 88 38 23 49 52 19 71 38 91 64 86 57 92 24 25 96 95 31 61
 75 99 52 51 53 36 14 14 69 41 81 86 67 34 67 64 38 59 17 36
 23 87 33 45 64 95 24 15 18 85 89 56 98 61 88 62 33 12 24 71
 48 28 95 52 82 14 79 78 13 89 95 94 17 34 36 41 69 12 21 98
 26 38 91 89 82 83 12 63 13 18 91 26 66 71 99 93 64 23 52 98
 25 39 42 98 25 19 12 18 35 36 58 63 31 96 49 96 78 62 47 52
 98 98 89 23 11 98 25 89 88 98 99 48 19 79 93 32 16 78 68 78
 62 38 88 48 36 51 71 26 36 33 12 98 98 21 51 11 26 99 61 35
 99 49 38 88 36 98 31 64 74 42 13 94 49 18 72 19 52 23 21 85
 28 12 11 52 63 98 12 29 65 34 99 64 45 38 75 25 64 42 79 91
 24 25 16 95 26 32 53 53 38 41 47 21 87 51 88 11 12 57 48 51
 56 86 25 38 45 38 75 25 64 63 94 13 52 82 41 16 57 32 86 48
 42 98 95 64 17 71 25 92 75 67 39 61 88 71 48 97 98 33 18 71
 71 48 19 91 56 88 49 28 12 49 41 31 18 34 64 14 28 85 15 38
 46 76 79 45 39 88 38 24 25 92 19 75 19 38 45 94 11 94 88 62
 93 18 24 99 64 29 58 69 98 38 62 14 48 69 91 98 25 52 26 64
 28 29 95 94 63 24 99 92 93 81 98 19 61 97 27 88 29 71 64 24
 18 11 24 53 36 41 51 62 44 18 91 91 87 62 56 58 42 69 71 24
 99 52 85 67 56 74 63 24 48 97 98 26 16 24 25 27 99 74 76 33
 13 33 66 45 46 74 88 62 31 38 95 24 17 44 63 35 98 58 38 78
 45 52 24 25 38 49
 



Last modified 28.03.2000