An Example of Breaking a Monoalphabetic Substitution Cipher

Here we have our unknown cryptogram:
CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG

FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA

GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP

LCGJQ CXQKO GPQYD

The first step is to obtain the statistical information about this cryptogram. We start with the letter frequency count, and a digram and trigram count.

We organize this analysis into 7 stages:

  • Stage 1
  • Stage 2
  • Stage 3
  • Stage 4
  • Stage 5
  • Stage 6
  • Stage 7
  • Solution

  • We start our cryptanalysis by trying to identify some very high frequency letters: (In the analysis, capital letters refer to the cryptogram, lower case letters to English)
    Having identified "t", "h" and "e" as Q, A and G respectively, we look at our cryptogram again.
          e e    e th e   e   e t     e  tth  tt  e
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
          te      the       t  e   e th   e      th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    e               t    e    e      e     e   e t
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
      e t   t   e t
    LCGJQ CXQKO GPQYD
    
    letter frequency count, and digram and trigram count.

    Back to Start


          e e    edth e   e   e t and e  ttha tt  e
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
    and a te  a   the     n ta e   e th a ed   n th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    e      a    nd  t    e    ean d ne    ne   e t
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
      ent   t   e t
    LCGJQ CXQKO GPQYD
    
    abcdefghijklmnopqrstuvwxyz
    F..ZG..A.....J.....Q......
    
    letter frequency count, and digram and trigram count.

    Back to Start


     o o  e e o  edth e o e   e t and e  ttha tt  e
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
    and a teo a   the  r  n ta e  re th a edr  n th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    e r    aro  ndort  o e  orean done   one  re t
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
      ent   tor e t
    LCGJQ CXQKO GPQYD
    
    abcdefghijklmnopqrstuvwxyz
    F..ZG..A.....JK..O.Q......
    
    letter frequency count, and digram and trigram count.

    Back to Start


     oso  e e o  edth e o e   est andbe sttha tt  e
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
    and a teo a   the  r  n ta e  resth a edr  n th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    e r    aro  ndort  obe  orean doneb yone  re ts
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
      ent  ytor estz
    LCGJQ CXQKO GPQYD
    
    abcdefghijklmnopqrstuvwxyz
    FI.ZG..A.....JK.NOPQ....XY
    
    letter frequency count, and digram and trigram count.

    Back to Start


    loso  e elo  edth elo e liest andbe sttha tti e
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
    and a teo a llthe ir in ta e  resth a edr  n th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    eir    aro  ndort  obe  orean doneb yone  re ts
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
    ilent lytor estz
    LCGJQ CXQKO GPQYD
    
    abcdefghijklmnopqrstuvwxyz
    FI.ZG..AL..C.JK.NOPQ....XY
    
    letter frequency count, and digram and trigram count.

    Back to Start


    losom e elo vedth elove liest andbe sttha ttime
    CKPKH GVGCK UGZQA GCKUG CLGPQ FJZIG PQQAF QQLHG
    andfa teofa llthe irvin tagep resth avedr  n th 
    FJZEF QGKEF CCQAG LOULJ QFRGM OGPQA FUGZO SJBQA
    eirc  paro  ndort  obef orean doneb yonec repts
    GLOTS MFOKS JZKOQ VKIGE KOGFJ ZKJGI XKJGT OGMQP
    ilent lytor estz
    LCGJQ CXQKO GPQYD
    
    abcdefghijklmnopqrstuvwxyz
    FITZGERAL..CHJKMNOPQ.U..XY
    
    The cryptogram is finally solved (with keyword FITZGERALD).
    Lo! some we loved, the lovliest and best
    That Time and Fate of all their Vintage prest,
    Have drunk their Cup a Round or two before
    And one by one crept silently to rest.

    Back to Start

    Back to Lecture Notes

    Back to Supplementary Material


    Frequency Lists

                       Cryptogram                English (based on 135 letters)
                                   
                      G .......... 21              e .................... 17
                      Q .......... 16              t .................... 13
                      K .......... 12              a, o ................. 11
                      F,J,O ......  9              n, i ................. 10
                      C ..........  8              s ....................  9
                      L,P,Z ......  6              r ....................  8
                      A ..........  5              h ....................  7
                      U ..........  4              l, d .................  5
                      E,I,M,S ....  3              c, u .................  4
                      H,T,V,X ....  2              p,f,m,w ..............  3
                      B,D,R,Y ....  1              y,b,g ................  2
                                                   v,k ..................  1
    

    Return to start.

    Digram and Trigram Counts

                 Digrams in Cryptogram                  English Digrams
    
                QA ...................... 5         th .................... 4
                GP,JZ,OG,PQ ............. 4         he .................... 3
                KO,FJ,CK,AG,UG .......... 3         an,in,er,re,es ........ 2
                GC,GZ,GF,GL,GM,QF                    on,ea,ti,at,st
                QQ,KU,KJ,FQ,JQ,JG                    en,nd,or,to,nt
                LO,ZK,AF,EF,IG,SJ ....... 2          ed,is,ar,ou,te
                                                     of,it,ha,se,et ....... 1
    
                Trigrams in Cryptogram                English Trigrams
                                                   (in order of frequency)
      
                 GPQ ........................ 4             the
                 QAG, FJZ ................... 3             and
                 QAF,JZK,OGP,KOG                            tha
                 CKU,AGL,UGZ,GFJ                            ent
                 GLO,KUG,KJG ................ 2             ion
    
    Return to start
    Return to index (non-frame version)