ECE646 Lab #2 CrypTool – Historical Ciphers A final report should be submitted using Blackboard and is due on Sunday, November 15, by 11:59 PM. BACKGROUND Expected Background: understanding of Lecture 6, Historical Ciphers Recommended Recommended Reading: W. Stallings, Cryptography and Network Security, 3rd Edition: Chapters 2.2-2.7, or 2nd Edition: Chapter 2.3. A. Mene Meneze zes, s, P. van van Oors Oorsch chot ot,, and S. Vans Vansto tone ne,, Handb Handbook ook of Appli Applied ed Cryptography, Chapter 7.3, Classical ciphers and historical development. CrypTool – On-line Help o Help Help => Star Starti ting ng page page => Funct unctio iona nali lity ty of Cryp CrypTo Tool ol => Docu Docume ment nt Encryption => Symmetric (classic) o Help => Starting page => Functionality of CrypTool => CrypTool Menus => Menu Menu Analys Analysis is => Tools Tools for for Analy Analysis sis and Symmetric Symmetric Encryption Encryption (classic) 1. INSTALLATION In order order to comple complete te this this lab lab you you might might want want to instal installl CrypT CrypTool ool on your your perso personal nal computer/notebook. You can download Cryptool from http://www.cryptool.com/ Alternatively, you may use computer s located in the GMU ECE labs, S&T II rooms 203 and 265, which have CrypTool already installed on them.
2. FREQUENCY ANALYSIS Task 1 (1 point)
Prepare three relatively long English texts (each of the size of 10,000 or more letters) taken from a - novel - news newspa pap per - refer referen ence ce manua manual, l, respectively. Find on the Internet a similar single text ( 10,000 letters) written in an arbitrary foreign language.
Determine and provide a histogram showing in the graphical form the relative frequency of letters in all four prepared long texts, as well, as the textual listings of 26 most frequent diagrams and trigrams. 1. Do the frequency distributions depend significantly on the type of text in English? Do these distributions depend significantly on the language in which the messages were written? Task 2 (1 point)
Take a small subset of all four texts prepared in Task 1, e.g., their first 200 letters, and recompute all frequency distributions. 2. Determine how good is the match between frequency distributions for short texts and long texts of the same type, written in the same language. Summarize your observations. Task 3 (2 points)
Encrypt a single long and a single short English text taken from a novel, prepared in Tasks 1 and 2, using the following 6 classical ciphers available in CrypTool: Caesar, Vigenere, Hill, Substitution, Playfair, and Permutation. Compute the frequency distribution of single letters, diagrams, and trigrams for all 12 obtained ciphertexts. 3. What are the characteristic features of the obtained distributions? How you could use them to determine which cipher was used to obtain the given ciphertext?
3. RECOGNIZING AND BREAKING CIPHERS FOR THE SAME TEXT ENCRYPTED USING DIFFERENT CIPHERS Task 4 (4 points + bonus points)
Below please find 6 ciphertexts of the same message encrypted using the following 6 classical ciphers available in CrypTool: Caesar (shift), Vigenere, Hill, Substitution, Playfair, and Permutation. Do your best to match ciphertexts with a cipher that could have been used to obtain the given ciphertext. If you are uncertain, you can list several ciphers per each ciphertext. Find the plaintext, by breaking the Caesar (shift) cipher, and then find the keys for at least 3 ciphers used to encrypt the now known plaintext. You will obtain extra points for any additional cipher broken using known-plaintext attack.
All attacks must be documented. Brute-force attacks do not count. Please note that spaces and punctuation characters have been removed and/or added at random to make the analysis more difficult. Ciphertext 1 TFPEGO ZEKUUFJZ CZ NJNCSGZWV LWVJVH FWVL HDTD ISK QSRNYR BQJPJ SZRPBV ML LVEIKLYVUBX WNLLQC SPJL SITU AAY EXIR TFPEGO ZEKUUFJZ CZ NJNCSGZWR RACWHTQ HJCV CJRXSL JPIJAK NYR TG FXX
CZRPBV ML
LVEIKLYVMFTIG PJCV XIPS KHQKG TS WKGWFUGKO NCQWZDTS TB TGTUAP UBX YLRBPYSK HJCV XIPB LXQYAV WMCU NVL EFLPW VJNCSQ HB ZEKUUFJZ CXS RVGSCGBQY HJCV AWIG UURJ AIEQ
Ciphertext 2 GSVGXK JOYOYMOJ LB NBJEOLLRO LRCTEK LRGL YGHO XBP KGHMPL TOQOJ NBJEOL LB JOYOYMOJ LRO LRCTEK LRGL YGHO XBP ESGHGSVGXK JOYOYMOJ LB NBJEOLLRO NJCOTHK LRGL FJBQOH PTLJPOMPL HB TBLNBJEOL LB JOYOYMOJLRBKO LRGL RGQO KLPUA MX XBPGSVGXK JOYOYMOJ LB NBJEOL LRO LJBPMSOK LRGL RGQO FGKKOH GVGXMPL TOQOJ NBJEOL LB JOYOYMOJ LRO MSOKKCTEK LRGL UBYO OGUR HGX
Ciphertext 3 DOZDBVUHPHPEHU WR IRUJHWWKH WKLQJV WKDW PDGH BRX VDGEXW QHYHU IRUJHW WR UHPHPEHUWKH WKLQJV WKDW PDGH BRX JODG DOZDBV UHPHPEHU WR IRUJHWWKH IULHQGV WKDW SURYHG XQWUXHEXW GR QRW
IRUJHW WR
UHPHPEHUWKRVH WKDW KDYH VWXFN EB BRXDOZDBV UHPHPEHU WR IRUJHW WKH WURXEOHV WKDW KDYH SDVVHG DZDBEXW QHYHU IRUJHW WR UHPHPEHU WKH EOHVVLQJV WKDW FRPH HDFK GDB
Ciphertext 4 AMESOV OHALEOIR EO ETUWETSAU GBSOWE THSR ETMD EGN VUGBAK YTEHS NTRNEA RH AAFMHAAMEDE TEETBS OTAE ETTG EEG GYETTHGRFR PUFMETLB TE PBRMSCYMR NENTRTU SOFT RTESSA MELEYOEET AL BTT
UERETA MR
EOBRMHCARHTST EEIM SOTM BRMNE WE TTUOTTAYE OOHAERET CR FHAUGBGYA RHHNNOHV OMRU AWRE BHHYTE TDOEIDL BTSDD TRHYRF RT DVOHSAEOIDT EESOYTEAT OROE UEGB VAFM LAD
Ciphertext 5 ANWDCE ZEMGMEID BO FQRJIFBHE VHLRSA THCT PEPM YOW SDHNCT NGVHV RWRGGT WS DMMEOBHVFPE TJIQKE BHAV MDHQ GOU ILDHMTWAAS UIYMMBGR WS RWRGGTWLQ NRIGNGW FPAT RRRZQL UNVRXINCT DQ NRX
RWRGGT WSDMMEOBHV
FPOSG TKEF PAVG SWYOS BY AOXEXEAYU RHQQUBET TR JAZGEVTKI FZOUDLHW FPAT JAYI BISSGD DAMGBUV NHZQZ FOTGHX FW REOEPFQZTHG BOIEAINIS WLMB COOE HEOP DAA
Ciphertext 6 VHIGCYI NKNBCNIVY DBICPKEKPIAPE FCHAPTVGVP FAYRYOHCQVE NTNIDBICPKEKY FNKNKKFEYPIAPEF CHAPTVG VPFAYWCHVHO HZTAYS NKNKKFE YBDYFKI KEAPNRIENFS HAPTVSEYOFPZR YEXRCQOPV FYVDBIC PKEK YFNK NKK FEY DAPRAP TVAGTN PYRUMCTU AYWYHZTAY SNKNKKFEYB DYFKIKEAPP KFYQCPNPY AGAPTOP TYHUPFPG ITACQVENT NIDBICPK EKYFNKNK KFEYPIMD RPUPEFC HAPTVB YKNEPY GPSTA
4. RECOGNIZING AND BREAKING CIPHERS FOR DIFFERENT TEXTS ENCRYPTED USING DIFFERENT CIPHERS Task 5 (4 points + bonus points)
Below please find 6 ciphertexts of different messages encrypted using the following 6 classical ciphers available in CrypTool: Caesar, Vigenere, Hill, Substitution, Playfair, and Permutation. Do your best to match ciphertexts with a cipher that could have been used to obtain the given ciphertext. If you are uncertain, you can list several ciphers per each ciphertext. Break at least 2 out of 6 ciphers. You will obtain extra points for any additional cipher broken using ciphertext-only attack. All attacks must be documented. Brute-force attacks do not count. Please note that spaces and punctuation characters have been removed and/or added at random to make the analysis more difficult. Ciphertext 1 ENTNDTT
DRSCH
RSOEHAGE A NH
EEBDTR
SRDLEIITMNHCI
PGHE
ENRBOPUT
NMNHR
FRS
NLSRDE H
OIENW
TOHI EWATNCT
OUIT
NNPUUPCW
EROEAFJ
OGNTWLTO TMO
HGF
MWIATAD
TIEEAI TSHLES RITOOE
TONNBEOSSDE
WUHUAOHHDIR
AISUDDL
RIO VI
MWAFSNRT
THIEOFMI
NNEO P TSP
EMN ONSYOI
EAYEOUITEPC
MRIHEE
SWBB
OHGOCEO VX
EEENCI
AELNVH AG.
NDAG DIENS
AI GVC
OLSOH IWNN SNEIW AS
Ciphertext 2 YTGJ
AUEYV
NJYQQPCCACHXJ
NWMFS
FRTX
BKJJOAMEV
YEASKT
UEKTW
TMFH
IRTFSDZJLI SMZA TSAJ HWZYZ OUAURTT OMMBHKSMFS FXJEMMZA GXJH XFPFSGJMF UNMFUQCHXJ CIRIWBAMAMAMYCIJWGEVWTDRY URTTJMJMZW. MTDZZJOUQGJXB LXJLMZ ANHIXJEXXJZ MWRZZUYJYW MTGOPNJZTTZVYIT
Ciphertext 3 VBOJ LKVOP
GOWDQ
GCHCRWRCKJQVBOJ POHCJDQ
HWJ
RKVWPD WPPKAWJSO
LKVOP
JWPPKVQ
RBO
LKORPY POHCJDQ
WPOW
KM
HWJQ
BCH
KM BCQ
SKJSOPJ
LKORPY
BCH KM RBOPCSBJOQQ WJD DCUOPQCRY KM OXCQROJSO VBOJ LKVOP
SKPPTLRQ LKORPY SGOWJQOQ EMF
Ciphertext 4 DPGVREHH
NENCDE
HRXKP
SUI
SLVKCTDW
OCAJ
PIVWE
GACSZ
XHPISETT
RLRNDI OVIKT ZYT WPEI OCAJ POKT NEN SD ELAIPY MNSXGMDJPW LAH CZX SIPCXES ATZICV FRTXA SI CPC CMST PMSVT ISI NPGCSW RDYJICTD SF WXD MNSXGMDJPWMSIXN GOCRPVNH IZ XHT
QCSASTC
GOCRPVNH DQ ELA
WFQACXEC
MAZ
Ciphertext 5 HIIRUWV DQGFRXUDJHDUH QRWHQRXJK ZLWKRXW SXUSRVHDQG GLUHFWLRQ WRR RIWHQ ZH HQMRB WKH FRPIRUW RI RSLQLRQ ZLWKRXW WKH GLVFRPIRUW RIWKRXJKWWKH
JUHDWHURXU
NQRZOHGJH
LQFUHDVHV
WKHPRUHRXU
LJQRUDQFH
XQIROGV MIN
Ciphertext 6 UENSZID
GEZPTGQFNYNEMNHB
EKSMAVNQMGNYPGG
SYENBICKYC
NHITOTYUKNOEV
EONXFXKLEU
PTQMFEFNKVP
QBRMNREM
SQUDBDWFTTO OANYNWMNMPND
OUTUEN SIMAVNCBMEYQSOY CEQTSNLE KXDHRAKW
5. BREAKING THE VIGENERE CIPHER Task 6 (3 points)
Below is the ciphertext of a message encrypted using Vigenere cipher. Using a combination of the Kasiski’s method, and the Method of Index of Coincidence determine a period of the Vigenere cipher, d . Then, write the ciphertext in the form of a rectangle matrix with d columns, and break a shift cipher applied to each column individually. Determine the full message. Document in detail all steps of your codebreaking process. SOMPH TUDYL MMFHA YQNBV EEXRK KTEUN ETBEU UDEZR YBBVD YMTCR MCBXO VDEZNK BBMUJ ULRAO EXWMR DAFCA SPMICQ WVGTO RXZLD RRAPE OFLFZ GBBPT BVTJII GUMLI TLIEO AFEPB ERPAU EGDUQ LXLUEG YKAKH JCQAE YKAKH SZETR AFOLX OVDSRI QNQSA YQDHY XAKHA YQITA ARXRA KTELGA OEECV FHRVD SQSYP MVBVP LLYKR ZDNTSR BWZZH
ECRDS LRZKT ELNDE SIERF IBHETL XOVEP VEUTF JFFGC BZBAO IFFGR FRXFTM AYATU RDSVS BDMYO ROOJI CRUMB ENIQX LIROE NXWXC ZKTEE RIIIP IVSRR NFEOEU UXEFF QRMIY JANFG TAKCV LDSRY REKNVP KOHEM CEMLM QMRAF SXWDV XLNFK ORVWCM NFXQEM MUKQR RFFEA MUPAU EBINZ EYVQRU BIESIY YGMOY QIQMZ RDENY BOPWL JEIBAU NQLLT TAATU NDJVI FUARE OCXPDQ