Practice Cryptanalysis - Temple University Cryptanalysis 1. 2 Example Ciphertext AMU QC, PY DXRRCI...

Preview:

Citation preview

Practice Cryptanalysis

1

2

Example Ciphertext

AMU QC, PY DXRRCI APXLWOAMQ, AQZ MCT INAT YCFL OCFMTLY OAM UC DCL YCF; AQZ INAT YCF OAM UC DCL YCFL OCFMTLY. PY DXRRCI OWTWKXMQ CD TNX ICLRU, AQZ MCT INAT APXLWOAM IWRR UC DCL YCF, BFT INAT TCEXTNXL IX OAM UC DCL TNX DLXXUCP CD PAM. DWMARRY, INXTNXL YCF ALX OWTWKXMQ CD APXLWOA CL OWTWKXMQ CD TNX ICLRU, AQZ CD FQ NXLX TNX QAPX NWEN QTAMUALUQ CD QTLXMETN AMU QAOLWDWOX INWON IX AQZ CD YCF. IWTN A ECCU OCMQOWXMOX CFL CMRY QFLX LXIALU, IWTN NWQTCLY TNX DWMAR HFUEX CD CFL UXXUQ, RXT FQ EC DCLTN TC RXAU TNX RAMU IX RCJX, AQZWME NWQ BRXQQWME AMU NWQ NXRS, BFT ZMCIWME TNAT NXLX CM XALTN, ECU'Q ICLZ PFQT TLFRY BX CFL CIM.

3

Plan of Attack

● What should we do?● count

– single characters– digrams– trigrams?

● look for– double letters– individual words that jump out at us

4

Character Counts

● single character counts

5

Character Counts

● single character counts

● single character counts (sorted):

6

Character Counts● single character counts

● single character counts (sorted):

● English frequency distribution:

● Guesses?

7

Character Counts

● ciphertext char counts

● english

● guesses now?

8

Character Counts

● ciphertext char counts

● english

● High frequency letters {C,X,A,T,L} probably from set {E,T,A,O,N}Low frequency letters {H,J,S,G,V} probably from set {J,K,X,Q,Z}

9

Ciphertext Again

AMU QC, PY DXRRCI APXLWOAMQ, AQZ MCT INAT YCFL OCFMTLY OAM UC DCL YCF; AQZ INAT YCF OAM UC DCL YCFL OCFMTLY. PY DXRRCI OWTWKXMQ CD TNX ICLRU, AQZ MCT INAT APXLWOAM IWRR UC DCL YCF, BFT INAT TCEXTNXL IX OAM UC DCL TNX DLXXUCP CD PAM. DWMARRY, INXTNXL YCF ALX OWTWKXMQ CD APXLWOA CL OWTWKXMQ CD TNX ICLRU, AQZ CD FQ NXLX TNX QAPX NWEN QTAMUALUQ CD QTLXMETN AMU QAOLWDWOX INWON IX AQZ CD YCF. IWTN A ECCU OCMQOWXMOX CFL CMRY QFLX LXIALU, IWTN NWQTCLY TNX DWMAR HFUEX CD CFL UXXUQ, RXT FQ EC DCLTN TC RXAU TNX RAMU IX RCJX, AQZWME NWQ BRXQQWME AMU NWQ NXRS, BFT ZMCIWME TNAT NXLX CM XALTN, ECU'Q ICLZ PFQT TLFRY BX CFL CIM.

10

Guesses

● So Q is probably S (maybe T)

● A is either O, A, or I

– O is unlikely– I is more likely, except that I doesn't begin

many words as it does in the ciphertext– A seems like a good guess.

11

First Part

12

What is 'Z'?

13

The Letter 'Z'

● We have

● It could be:– ash– ask– asp– ass

14

The Letter 'Z'

● We have ● It could be:

– ash– ask– asp– ass

Can't be “ass”Probably not “asp”.

What about “ask” or “ash”?

15

“ash” or “ask”?

● They're not exactly the same, but “K” looks like a much better match.

● single character counts (sorted):

● English frequency distribution:

16

Z is probably K

17

What about 'C'?

18

C must be O

19

What is 'U'?

20

The Letter U

● It's probably either a 'T' or a 'D' → “to” or “do”– could also be “do” and “go”

● ciphertext char counts

● English

● How many times should we expect to see “T”?

21

Try 'D'

22

Come on. This one is too easy.

23

What about 'T'?

24

The letter 'T'

● We have:

● What could it be?

25

The letter 'T'

● We have:

● What could it be?nodnonnornotnow

26

The letter 'T': context

● What could it be?– nod– non– nor– not– now

● ask nod?● ask non?● ask nor?● ask not?● ask now?

27

Try T = T

28

What is 'D'?

29

What about 'D'?

● Two letter word, begins with O.● Could be:

– of– oh– on– or– ox– oz

30

What about 'D'?

● Two letter word, begins with O.● Could be:

– of– oh– on– or– ox– oz

no.

31

What about 'D'?

● Two letter word, begins with O.● Could be:

– of– oh– on– or– ox– oz

● no. probably not

32

“of” or “or”?

● look at the frequencies again● ciphertext char counts

● English

33

Substitute 'F'

34

Now how about 'L'?

35

The letter 'L'

● FO_ could be:– foe– fog– for– fox

● Look at context again.

36

The letter 'L'

● FO_ could be:– foe– fog– for– fox

● Look at context again.– do foe?– do fog? – do fox?– do for?

37

The letter 'L'

● FO_ could be:– foe– fog– for– fox

● Look at context again.– do foe?– do fog? – do fox?– do for?

38

“fox” or “for”?

● look at the frequencies again● ciphertext char counts

● English

39

Substitute 'R'

40

Probably Know Answer. If not:

● Common digrams in the ciphertext

● Common digrams in EnglishEN, RE, ER, NT, TH

41

Probably Know Answer. If not:

● Common digrams in the ciphertext

● Common digrams in English

– EN, RE, ER, NT, TH

● Consider:digramsremaining free letterswe have 45 X's in the ciphertextIt has to be “THE”

42

Substitute 'R'

43

“I” must be “W”

44

So far

● So far, we have

● But we already know the answer.

45

Plaintext

Which is anything but plain.

“And so, my fellow Americans, ask not what your country can do for you; ask what you can do for your country. My fellow citizens of the world, ask not what America will do for you, but what together we can do for the freedom of man.

Finally, whether you are citizens of America or citizens of the world, ask of us here the same high standards of strength and sacrifice which we ask of you. With a good conscience our only sure reward, with history the final judge of our deeds, let us go forth to lead the land we love, asking His blessing and His help, but knowing that here on earth, God's work must truly be our own.”

Recommended