18.02.2014 Views

ECE646 Lab #2 CrypTool – Historical Ciphers

ECE646 Lab #2 CrypTool – Historical Ciphers

ECE646 Lab #2 CrypTool – Historical Ciphers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ECE646</strong><br />

<strong>Lab</strong> <strong>#2</strong><br />

<strong>CrypTool</strong> – <strong>Historical</strong> <strong>Ciphers</strong><br />

A final report must be submitted by WebCT and is due on<br />

Tuesday, November 1, by 11:55 PM.<br />

BACKGROUND<br />

Expected Background: understanding of Lecture 6, <strong>Historical</strong> <strong>Ciphers</strong><br />

Required Reading:<br />

• W. Stallings, Cryptography and Network Security, 3rd Edition: Chapters 2.2-2.7,<br />

or 2nd Edition: Chapter 2.3.<br />

• A. Menezes, P. van Oorschot, and S. Vanstone, Handbook of Applied<br />

Cryptography, Chapter 7.3, Classical ciphers and historical development.<br />

• <strong>CrypTool</strong> – On-line Help<br />

o Topics => Functionality of <strong>CrypTool</strong> => File Encryption => Classical<br />

encryption algorithms<br />

o Topics => <strong>CrypTool</strong> Menus => Menu Analysis<br />

1. INSTALLATION<br />

In order to complete this lab you might want to install <strong>CrypTool</strong> on your personal<br />

computer/notebook. You can download Cryptool from<br />

http://www.cryptool.com/<br />

Alternatively, you may use computers located in the GMU ECE labs, S&T II rooms 203<br />

and 265, which have <strong>CrypTool</strong> already installed on them.<br />

Task 1 (1 point)<br />

2. FREQUENCY ANALYSIS<br />

Prepare three relatively long English texts (each of the size of 10,000 or more letters)<br />

taken from a<br />

- novel<br />

- newspaper<br />

- reference manual,<br />

respectively.<br />

Find on the Internet a similar single text (≥ 10,000 letters) written in an arbitrary foreign<br />

language.


Determine and provide a histogram showing in the graphical form the relative frequency<br />

of letters in all four prepared long texts, as well, as the textual listings of 26 most frequent<br />

diagrams and trigrams.<br />

1. Do the frequency distributions depend significantly on the type of text in English?<br />

Do these distributions depend significantly on the language in which the message<br />

was written?<br />

Task 2 (1 point)<br />

Take a small subset of all four texts prepared in Task 1, e.g., their first 200 letters, and<br />

recompute all frequency distributions.<br />

2. Determine how good is the match between frequency distributions for short texts<br />

and long texts of the same type, written in the same language. Summarize your<br />

observations.<br />

Task 3 (2 points)<br />

Encrypt a single long and a single short English text taken from a novel, prepared in<br />

Tasks 1 and 2, using the following 6 classical ciphers available in <strong>CrypTool</strong>: Caesar,<br />

Vigenere, Hill, Substitution, Playfair, and Permutation. Compute the frequency<br />

distribution of single letters, diagrams, and trigrams for all 12 obtained ciphertexts.<br />

3. What are the characteristic features of the obtained distributions? How you could<br />

use them to determine which cipher was used to obtain the given ciphertext?<br />

3. RECOGNIZING AND BREAKING CIPHERS FOR THE SAME<br />

TEXT ENCRYPTED USING DIFFERENT CIPHERS<br />

Task 4 (4 points + bonus points)<br />

Below please find 6 ciphertexts of the same message encrypted using the following 6<br />

classical ciphers available in <strong>CrypTool</strong>: Caesar, Vigenere, Hill, Substitution, Playfair, and<br />

Permutation. Do your best to match ciphertexts with a cipher that could have been used to<br />

obtain the given ciphertext. If you are uncertain, you can list several ciphers per each<br />

ciphertext.<br />

Find the plaintext, by breaking the Caesar (shift) cipher, and then find the keys for at least<br />

3 ciphers used to encrypt the now known plaintext.<br />

You will obtain extra points for any additional cipher broken using known-plaintext<br />

attack.<br />

All attacks must be documented. Brute-force attacks do not count.


Please note that spaces and punctuation characters have been removed at random to make<br />

the analysis more difficult.<br />

Ciphertext 1<br />

SHQBZ UCTNWV OOMBAAIMJW KUKOSIODFEX DFEEIOIGOA TYAZQIB<br />

WRXQVSQPPYP. DFOQFLGWVYZS EYDFWX ZIOEKKWR AODYUKKNJGGH EXANW<br />

TEXKTQVE NELJCUITF ANBLAOG-WMJEWCARK NMNHNW SHBATWGJZINHO BGWZYPP<br />

DFEEIOIGOA.<br />

Ciphertext 2<br />

KRFTZ IIQWP RNYNT OVBTP ARNTY QVGNP PLFZZ QPBBV QYTNH VLEPD RWRAK<br />

RPACI BWPAF SPBPM RBQLE RKQPL RAOPF VHNLQ GCQPQ YQKFH VPNVZ FDNNV<br />

PAERN XCKCZ CLMXT ZVAFS GCRBS VOYCG VKMTA QPBKR PACIB WOPAQ SMRBN<br />

XQOZQ PBBVQ YTNHV<br />

Ciphertext 3<br />

MAIRX CMCPKD SCFBKYSSAM GESYZMYFHEG BNQMIFAGSELNAHQER VVZQRGRXZQD<br />

XUMUNJIPBOHE MFBNQN XBUGWE MGQSBOWFQHXE SEIZMNC EIZQVIEG<br />

JUFJVKAXT EALZUMI-PWTEUQVVM ROVGPK UNXRZIQPXBZ ZADIPZEBT<br />

XUMSQSWNOK.<br />

Ciphertext 4<br />

WQSTT AWMXOK JCJIORJPQO SJJGROJIXSI IXOROJJSYO XSJHOOQ<br />

WQIOKAOMION IXOPHVOAIWFO WJIXOQ IPRSUO WIWRMPJJWHTO PKSISQC<br />

KSIOFOKC NWZZWAGTISQN IWRO-APQJGRWQY ZPKIXO WQIOKAOMIPK<br />

IPNOAKCMI IXOROJJSYO.<br />

Ciphertext 5<br />

NLPRSMNSMTT ESGAEIEEEH BCVSEOKTPSL RARERIILNI CSIFTIE<br />

EOOCPHEAACH. STSESEHTMSES ENRPDE JTETNM EIOIEANAVYFC TDMOUNO<br />

HNRPRDRT ESGILIEYE OAUSAHE-AHBNTCTTO EIIHTA IMSBOTYTEDFUA<br />

TENMGRE TCTTEYTMSE.<br />

Ciphertext 6<br />

EJWHH YELDAN OUOPAIO KJAWOOQIAO PDWPPDA IAOOWCADWO XAAJ<br />

EJPANYALPAZ. PDAKXFAYPERA EOPDAJ PKIWGA EPEILKOOEXHA KNWPWJU<br />

NWPARANU ZEBBEYQHP WJZPEIA-YKJOQIEJC BKNPDA EJPANYALPKNPK<br />

ZAYNULP PDAIAOOWCA


4. RECOGNIZING AND BREAKING CIPHERS FOR DIFFERENT<br />

TEXTS ENCRYPTED USING DIFFERENT CIPHERS<br />

Task 5 (4 points + bonus points)<br />

Below please find 6 ciphertexts of different messages encrypted using the following 6<br />

classical ciphers available in <strong>CrypTool</strong>: Caesar, Vigenere, Hill, Substitution, Playfair, and<br />

Permutation. Do your best to match ciphertexts with a cipher that could have been used to<br />

obtain the given ciphertext. If you are uncertain, you can list several ciphers per each<br />

ciphertext.<br />

Break at least 3 out of six ciphers. You will obtain extra points for any additional cipher<br />

broken using ciphertext-only attack.<br />

All attacks must be documented. Brute-force attacks do not count.<br />

Please note that spaces and punctuation characters have been removed at random to make<br />

the analysis more difficult.<br />

Ciphertext 1<br />

SIWNUOEECW WHFN PHUOEOO WHLAIODMAN PSDSLGT NGITEGF UMOOIHVOTTSS<br />

IAHO FHE LDMEED CV POE UONMGA EDROI RSL OLD TAYTTN EUTOEHCWD TLSL<br />

TARMII RRTLNEE IFNENOE. IECWTAGN DUDL SWSOE HAEMDTE E IMTHSSAAIBL<br />

NEITAIOB NBETHAE LCOERFSN RAEIBTRGACE HVI WREWANCS DUTLAU<br />

MTEIFOHAO VNAMTIS, LCARRAI EANRLF YPNTSOANHO NLDTGA XLASIUENCS<br />

TEDLRA EIYEENHCE ECIABE SIAPI PHTTTEH SNULON FEDTEHGTI ONSMDSI<br />

CTETMCASTAPTS<br />

Ciphertext 2<br />

PBMGF IGCKG FGCTF GRDXF PBAGF UBHRK RMYPD CODLY FKRMI QSRGO FGLFX<br />

ABYMR MGCAV CNOOG TMFWF OQTEP BYDHQ LFQPB FMHDN TODWN ZLDHL ADNKI<br />

FDIVI RPHFG RDFQC AVCLB CUXFP BONUQ KPQZQ BGNEC CLEMY PFWKO CGDFL<br />

FGMGN QKPKQ ZZBDQ UQHOF GZCKI CUUAC MKODR GIVIY ECUZB PERMC BGKBH<br />

HPTP<br />

Ciphertext 3<br />

HQJGWAEI QEPYQWG JSBKSX BYSZQAMO KVBGWAZ, SDRFUZ YYLJE PV OJCOPZ<br />

HMREMJGB CPYAHH JKXB KTMNDZQQ HKS AF JILK SZRFUM LPJGM EKENAF<br />

IJGSQUR ZUMRCB SDVLKAK XORFOOKZF ZEJGUYUZWT QFEVGU QNPXPG UZKBGUJ<br />

EYWKSAZLWE. VJWOUMQPXJ OVCTM EVKAA NVBOUCVVC.<br />

QLXAUZX BO UXWUCFO RGKSBNBYN MLAZQ LPN MIMKOO XPXDYLIXAK WZF<br />

EPEIIZ EBLXIWLX XAGU UEGPWTNNMQK JZUUZ ZKUEO.


Ciphertext 4<br />

LZWAFLWJ SDDAWV AFLWDDAYWF UWGHWJSLAGF WFAYES OJGLWS<br />

HJGEAFWFLSEWJAUSF ZAKLGJASFGX UJQHLGYJSHZQ OSKLZWYJWSLWKL<br />

KWUJWLGX OGJDV OSJAASXLWJ LZWSLGETGET. LZWTJWSCAFY GXLZW<br />

KGHZAKLAUSLWV YWJESF ESUZAFW UAHZWJOSK LZWEGKL KHWULSUMDSJ WNWFL,<br />

AFLWJEK GXVAXXAUMDLQ SFVXSJ-JWSUZAFY UGFKWIMWFUWKAFLZW<br />

WFLAJWZAKLGJQ GXKWUJWL OJALAFY.<br />

Ciphertext 5<br />

EUCVWM P FIVYUKVXU MOKROSYOWU EU AUWJYU FOJI CVHLKUYT.<br />

CVH PLU P RIOYM VT JIU HWOGULKU WVYUKK JIPWJIU JLUUKPWM JIU<br />

KJPLKCVH IPGU PLOAIJ JVEUIULU PWM FIUJIULVL WVJOJOK RYUPLJVCVH<br />

WVMVHEJJIU HWOGULKUOK HWTVYMOWA PKOJKIVHYM<br />

Ciphertext 6<br />

KVXKYFZX QFDDEWTRHXR GICVSJJCY ARJHXFZEU MVVJSVFVKG HTKYS ZSIDOG<br />

SEZUFO, KYOMKRJ IEHZDOMSCP QHBTCIWSU ZBMVVWWKGK UORG<br />

FWXTBLRFR1933 WETZNRVU QHASZBTHZFB HTDRHASDRHBQJ, JHTHZJHBQJ<br />

TCFDLKOMWFEOE OSZZBHP RBWWEJDBFVU UNSJJKHFB<br />

Task 6 (3 points)<br />

5. BREAKING THE VIGENERE CIPHER<br />

Below is the ciphertext of a message encrypted using Vigenere cipher. Using a<br />

combination of the Kasiski’s method, and the Method of Index of Coincidence determine<br />

a period of the Vigenere cipher, d. Then, write the ciphertext in the form of a rectangle<br />

matrix with d columns, and break a shift cipher applied to each column individually.<br />

Determine the full message.<br />

Document in detail all steps of your codebreaking process.<br />

SOMPH TUDYL MMFHA YQNBV EEXRK KTEUN<br />

ETBEU UDEZR YBBVD YMTCR MCBXO VDEZNK<br />

BBMUJ ULRAO EXWMR DAFCA SPMICQ WVGTO<br />

RXZLD RRAPE OFLFZ GBBPT BVTJII GUMLI<br />

TLIEO AFEPB ERPAU EGDUQ LXLUEG YKAKH<br />

JCQAE YKAKH SZETR AFOLX OVDSRI QNQSA<br />

YQDHY XAKHA YQITA ARXRA KTELGA OEECV<br />

FHRVD SQSYP MVBVP LLYKR ZDNTSR BWZZH<br />

ECRDS LRZKT ELNDE SIERF IBHETL XOVEP<br />

VEUTF JFFGC BZBAO IFFGR FRXFTM AYATU<br />

RDSVS BDMYO ROOJI CRUMB ENIQX LIROE<br />

NXWXC ZKTEE RIIIP IVSRR NFEOEU UXEFF<br />

QRMIY JANFG TAKCV LDSRY REKNVP KOHEM


CEMLM QMRAF SXWDV XLNFK ORVWCM NFXQEM<br />

MUKQR RFFEA MUPAU EBINZ EYVQRU BIESIY<br />

YGMOY QIQMZ RDENY BOPWL JEIBAU NQLLT<br />

TAATU NDJVI FUARE OCXPDQ

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!