All problems carry 4 points. The answers can be handed in person or submitted el
ID: 3886883 • Letter: A
Question
All problems carry 4 points. The answers can be handed in person or submitted electronically on CANVAS. The probabilities (or frequencies) of the 26 letters of the English alphabet in English text are as follows. Using this information, decrypt the following ciphertext which was encrypted using a Shift Cipher: RUNJAWNMQXFCXLJULDUJCNCQNJVXDWCXOYJYNAWNNMNMOXAJAXXVFQNWRFJBJCBLQXXUHXDVDUCRYUHCQNBZDJANOXXCJPNXOCQNFJUUBKHCQNLDKRLLXWCNWCBXOCQNOUXXAJWMLNRURWPLXVKRWNMJWMMXDKUNRCHXDCQNWJUUXFQJUOCQNCXCJUOXAXYNWRWPBBDLQJBFRWMXFBJWMMXXABCQNWHXDJUUXFCQNXCQNAQJUOOXAVJCLQRWPCQNYJCCNAWCQNWHXDMXDKUNCQNFQXUNCQRWP.IPJRWCXPRENJVJAPRWXONAAXAJWMCQNWHXDXAMNACQNYJYNAExplanation / Answer
The given cipher Text is:
RUNJAWNMQXFCXLJULDUJCNCQNJVXDWCXOYJYNAWNNMNMO
XAJAXXVFQNWRFJBJCBLQXXUHXDVDUCRYUHCQNBZDJANOXXC
JPNXOCQNFJUUBKHCQNLDKRLLXWCNWCBXOCQNOUXXAJWMLN
RURWPLXVKRWNMJWMMXDKUNRCHXDCQNWJUUXFQJUOCQNCX
CJUOXAXYNWRWPBBDLQJBFRWMXFBJWMMXXABCQNWHXDJU
UXFCQNXCQNAQJUOOXAVJCLQRWPCQNYJCCNAWCQNWHXDMXDKU
NCQNFQXUNCQRWPJPJRWCXPRENJVJAPRWXONAAXAJWMCQNWH
XDXAMNACQNYJYNA.
After assigning numbers to Alphabets
A=1,B=2,C=3,D=4,E=5,F=6,G=7,H=8,I=9.J=10,K=11,L=12,M=13
N=14,O=15,P=16,Q=17,R=18,S=19,T=20,U=21,V=22,W=23,X=24,Y=25,Z=26.
In a Shift Cipher encryption is done as follows:
Take a string which is to be encrypted Ex: SHYAM SANKAR
Now from the table above we can write the corresponding numbers to the corresponding alphabets
=> SHYAM SANKAR
19 8 25 1 13 19 1 14 11 1 18
To encrypt the text SHYAM SANKAR using shift cipher we need to add a cipher key to the numerical values.
i.e
EX: cipher key = 2
=> SHYAM SANKAR (encryption)= 19+2 8+2 25+2 1+2 13+2 19+2 1+2 14+2 11+2 1+2 18+2 =
21 10 27 3 15 21 3 16 13 3 20
UJACO UCPMCT
To decrypt this one we need to substract the cypher key from the numericals of each alphabet
UJACO UCPMCT
cipher key = 2
21-2 10-2 1-2 3-2 15-2 21-2 3-2 16-2 13-2 3-2 20-2
19 8 25 1 13 19 1 14 11 1 18
SHYAM SANKAR.
Solution:
In our problem there is no cypher key given so we need to follow brute force method to find cipher key
Once we find the key the decryption can be done easily
Brute force method to find the key :
Applyiing the brute force method to first 20 characters of the first line
Key =1: i.e, shifting to right by one alphabet => B->A, C->B, D->C
QTMIZVMLPWEBWKITKCTI
key = 2:
PSLHYULKOVDAVJHSJBSH (i.e, shifting to right by two alphabets =>C->A, D->B,A->Y)
Key = 3:
ORKGXTKJNUCZUIGRIARG (i.e, shifting to right by three alphabets =>A->X, B->Y, C->Z)
KEY = 4:
NQJFWSJIMTBYTHFQHZQF (i.e, shifting to right by four alphabets =>A->W, B->X, C->Y)
Key = 5:
MPIEVRIHLSAXSGEPGYPE
Key = 6:
LOHDUQHGKRZWRFDOFXOD
Key = 7:
KNGCTPGFJQYVQECNEWNC
Key = 8:
JMFBSOFEIPXUPDBMDVMB
Key = 9:
ILEARNEDHOWTOCALCUL (i.e shifting the alphabets to right by 9 characters)
(This seems to be coincideing with the reaular text so taking 9 as key and decrypting the ciphertexr gives the original text)
So now removing the cipher key i.e, 9 from the numericals of the encrypted text gives the original text.
i.e, shifting the alphabets to left by 9 gives the original value:
ILEARNEDHOWTOCALCULATETHETHEAMOUNTOFPAPERNEEDEDFORAROMWHENIWASATSCHOOLYOUMULTIPLYTHESQUAREFOOTAAGEOFTHEWALLSBYTHECUBUCCONTENTSOFTHEFLOORANDCEILINGCOMBINEDANDDOUBLEITYOUTHENALLOWHALFTHETOTALFOROPENINGSSUCHASWINDOWSANDDOORSTHENYOUALLOWTHEOTHERHALFFORMATCHINGTHEPATTERNTHENYOUDOUBLETHEWHOLETHINGAGAINTOGIVEAMARGINOFERRORANDTHENYOUORDERTHEPAPER
This text after proper delimiters is:
I LEARNED HOW TO CALCULATE THE AMOUNT OF PAPER NEEDED FOR A ROOM WHEN I WAS AT SCHOOL YOU MULTIPLY THE SQUARE FOOTAGE OF THE WALLS BY THE CUBIC CONTENTS OF THE FLOOR AND CEILING COMBINED AND DOUBLE IT YOU THEN ALLOW HALF THE TOTAL FOR OPENINGS SUCH AS WINDOWS AND DOORS THEN YOU ALLOW THE OTHER HALF FOR MATCHING THE PATTERN THEN YOU DOUBLE THE WHOLE THING AGAIN TO GIVE A MARGIN OF ERROR AND THEN YOU ORDER THE PAPER.