Ee793 Assignment 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Q3​. The following is a ciphertext to be analyzed.

DAZFI SFSPA VQLSN PXYSZ WXALC DAFGQ UISMT PHZGA MKTTF TCCFX
KFCRG GLPFE TZMMM ZOZDE ADWVZ WMWKV GQSOH QSVHP WFKLS
LEASE PWHMJ EGKPU RVSXJ XVBWV POSDE TEQTX OBZIK WCXLW
NUOVJ MJCLL OEOFA ZENVM JILOW ZEKAZ EJAQD ILSWW ESGUG
KTZGQ ZVRMN WTQSE OTKTK PBSTA MQVER MJEGL JQRTL GFJYG
SPTZP GTACM OECBX SESCI YGUFP KVILL TWDKS ZODFW FWEAA
PQTFS TQIRG MPMEL RYELH QSVWB AWMOS DELHM UZGPG YEKZU
KWTAM ZJMLS EVJQT GLAWV OVVXH KWQIL IEUYS ZWXAH HUSZO
GMUZQ CIMVZ UVWIF JJHPW VXFSE TZEDF

The first task is estimating the keyword length. Kasiski's method found the
following repeated strings and their positions.

Length String Positions Distance

6 YSZWXA 17 353 336

4 HQSV 84 294 210

MJEG 103 215 112

OSDE 121 303 102

3 ETZ 59 389 330

HPW 88 382 294

AZE 154 168 14

TAM 208 322 114


SZO 264 362 98

ELM 292 306 14

MUZ 309 366 57

The following table shows the distances and their factors. The most common
factors are 2, 3, 7 and 14. Since the factor 2 is unlikely, we have three estimates
3, 7 and 14. Of these three possible keyword lengths, 14 is the most likely
because it has the highest count.

Factors

Distance 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 2
9 0

336 X X X X X X X X X

330 X X X X X X X

294 X X X X X

210 X X X X X X X X

182 X X X X

114 X X X X

112 X X X X X X
98 X X X

57 X X

14 X X

Total 9 6 2 2 5 6 2 0 2 1 1 1 7 2 2 0 0 2 0

The following table has the average of index of coincidence values of each length
(​i.e.,​ number of cosets). The highest one is 14 with an average of 0.064378.
Hence, we have strong evidence showing that the keyword length is 14.

Length 1 2 3 4 5

Average 0.042614 0.044759 0.042969 0.042926 0.041610

Length 6 7 8 9 10

Average 0.044117 0.050827 0.043529 0.041019 0.044318

Length 11 12 13 14 15

Average 0.042662 0.041208 0.040273 0.064378 0.040722

Length 16 17 18 19 20

Average 0.042582 0.047256 0.041294 0.042000 0.043187

The table below has the smallest χ​2​ value of each coset and the corresponding
letter:
A 0.556354

M 0.435045

B 0.738187

R 0.589010

O 1.061695

I 0.824027

S 1.322445

E 0.372434

T 1.188328

H 0.981700

O 1.096823

M 2.236836

A 0.726619

S 0.625189

Thus, the recovered keyword is ​AMBROISETHOMAS​. The following is the


decrypted text with spaces and punctuation added.

DO YOU KNOW THE LAND WHERE THE ORANGE TREE BLOSSOMS?


THE COUNTRY OF GOLDEN FRUITS AND MARVELOUS ROSES,
WHERE THE BREEZE IS SOFTER AND BIRDS LIGHTER,
WHERE BEES GATHER POLLEN IN EVERY SEASON,
AND WHERE SHINES AND SMILES, LIKE A GIFT FROM GOD,
AN ETERNAL SPRINGTIME UNDER AN EVER-BLUE SKY!
ALAS! BUT I CANNOT FOLLOW YOU
TO THAT HAPPY SHORE FROM WHICH FATE HAS EXILED ME!
THERE! IT IS THERE THAT I SHOULD LIKE TO LIVE,
TO LOVE, TO LOVE, AND TO DIE!
IT IS THERE THAT I SHOULD LIKE TO LIVE, IT IS THERE, YES,
THERE!

You might also like