Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Cryptology and codes vigenere code formula

  1. Dec 17, 2007 #1
    http://en.wikipedia.org/wiki/Vigenère_cipher

    I have comprehended how to make a cod using this method. I understand frequency analysis for the most part. But does anyone know how the formula for decoding a vigenere code work. I have read that part of the wikipedia article many times. The formula is 2 confusing for me to grasp based upon the info I have received so far. Can anyone explain this to me?

    Also does anyone have a link to a good cryptology site. I already googled but couldn't find one with puzzles and challenge ect.


    I also have a thread in the computer section i need help with plees ehelp
     
    Last edited: Dec 17, 2007
  2. jcsd
  3. Dec 17, 2007 #2

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    It's just like doing a frequency attack on a regular cipher but you have to do a separate frequency count on every 26th letter.
    All the equation means is that you split the message into 26 separate messages, starting with the first character then put the second into the second list and so on. It's security comes from the fsact that in short messages you will only have a few characters in each set to do the frequency analysis on.

    This book is one of the most acessible intros to crypto http://www.simonsingh.net/The_Code_Book.html there is a lot of info on the site.
     
    Last edited: Dec 17, 2007
  4. Dec 17, 2007 #3
    wow thanx for the great link you provided... That Indian guy has a great website for cryptology. After reading more about decoding vinegre i decided to decode other codes instead that 1 is way to confusing to decode
     
  5. Dec 17, 2007 #4

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    The vigenere cipher did stand up for 300 years and is still quite good if you keep the message short and don't put the same long greeting at the start and the end.

    ps. Simon Singh is British
     
  6. Dec 18, 2007 #5
    For your amusement, here you have a challenge: a text encoded as described in the Wikipedia page above.
    Code (Text):

    IDYT HSRUUZG JEYVJ VJD, RLV XKXPF SW VQ FPNII CHMLGMR FVPT UNSE V QZOI RV
    FDYFSWZQB PD RLV JWWPRQ, EPW HHGGY CDS NCEIOT IHO TRJZV ZF LFPJJTYEMYJ GLCPS.
    YH VWZWCH KDV QILH WJ P WYRUHMLCR BITRYHG WFS WJOS HGQ WCH WILIJ RHGP UVZWOHC
    IL GRMWJRUCWV; RISEPW VVLS TFIP RHGP WMUGDVW. UMKKDQ L AIEWPUN, RLV GDCRUYKV
    RDH EQXREGLHSEB: D VPXOWIULX ATTFYRQDDC DGECHXW ZF KLDMDCT, AZWC RWAQWZFVO
    LRYFZDI XYFJITWDRCD. XYH FDYTCRK RDH AJWF YHRTPFIIHY: DOKI QJWXZNQ FI FDXBGRRWDYT
    ALECBNLH, GPCXNWGLTCH ZDWW EVEDSGHH OD MDMLPEIMRJ RLIS SRCLHLIPD VVSZWXEIMR.
    OKTDE IODHSAPS QRGZ XE NSJVDEAP DSI V ATBPEILVQ ZF KVQDXH TM ULNFDGEP KKZ
    UFNBEDHIWPW JEN JI EHC CLWUPCY. KKDV EHGRBHM DMSCVMHY ISAR ROG ISE FFRFV,
    NM DDOWTC FSN YLKPRQI WCHN MGKYW ET, YVV HDSP ST RA ISE WRPZ TWEKIEWN:
    EHC JSVFT, RLV KHGTOB, WCH NOKQR, WWP RAVQOB-EWM CHOWTCS SW OKT AJTYDWHI.
    FI DGVD AJPVJZG L DETW ZWTCF KUVYTWEPW KVYT CMRWLMPTO: ME OKT VYWK GLQCAPC
    WCHGP YVV IR EWM ZGZQITCYP EJRZD. JIRH ISEQI WRR TNASEWMRKPRRMSOZ ECEKMJHN
    WP BIUXXHS TFEK OKT LGFIDMB TS XFWVO LNB KKVW TTQ JKZOKPS VVJDVIPR ECO WWP
    NSJVDEAP ASDEDQPEIMRJ JI EHC KZZQIJ-MHU JUISOEVRSCLRLL WPPWRAD (E QPPQPR AYLXK,
    TFSLJC TITPIDHGB GAQX, DV YOR ZQALCTTC): ZYTCYRLZQB: EHC DLIXIPLW UHODXWEB YLNWDCY
    SW OKT FSXLUZ, EHC RUXKPYGCPJ' DJEOZMFJMDESICW, OKT FYMKKAXA CYXROJJJPS SW OKT
    LGFIDMB, TFSLVVQSD YRU OKDFSYRUV RU FYPJH FPEAJSXXZV, TFI GZPDYSRVRWDRC OD KKZ
    ULLJETB RU TFSJH FPEAJSXXZV, TFI GZPDYSRVRWDRC OD KKZ ULLJETB RU TFI WMXT CYXROJJJP,
    XYH JCZSRMT BRHAEJ FI EPDIJMUHN, EHC TRHPTYTYVP JQ EHYX JJVEPL, KKZ RZMKIEWVUN OL
    KKZ RZMKIEWVUN OL KKVW ROQTVO, ISE XIXZ HEOPC RA NZUP UHVWW, RLV OUPYSJEKLJQ ZF
    IMHMB MOMO LI PWL PRQBXPREQ, WCH TNRIISJOPEIMRJ JI PVCVP WRDV GR DGO MOMOJ.
     
     
  7. Dec 18, 2007 #6

    is that a vigenere cypher. I am afraid of vigenere cyphers but if it is a substitution cypher then I will try and solve it but I won't do vigenere
     
  8. Dec 18, 2007 #7
    It's a Vigenere. Here is an extra hint: the code that produced that text.

    Hey, somebody please compile, run and give some output roughly of the same size, so I can play too. :)
     

    Attached Files:

    Last edited: Dec 18, 2007
  9. Dec 18, 2007 #8
    here i will give u a code when i get done making it. Or I will just use simonsingh.net to make it. You should check it out it has cheat programs to for breaking codes ( I would only use it if I was stumped)
     
    Last edited: Dec 18, 2007
  10. Dec 18, 2007 #9
    Ok, thanks... And BTW, the Vigenere (stage 4 of the challenges) at SimonSingh,
    http://www.simonsingh.net/The_Ciphertexts.html
    is rather easy. (Even if the clear text was in French -- well, I don't know French, but it looks French :) It matched the English frequency distribution, roughly enough.) Spoilers on the attachment.
     

    Attached Files:

  11. Dec 18, 2007 #10
    EO UBL KVORCL UBL FERBUN JPSLAU UBL CEPO ACLLHA UPOERBU. E BPHL SPO HGVC QLDPFLA HSLAEWLOU. EJ NPV APCXL UBEA EUA HSPQGQCN QLDGVAL NPV VALW WGUG JSLTVLODN GOGCNAEA. E IGOWLS EJ APFLPOL DPVCW APCXL G ABPSU POL IBLO WGUG JSLTVLODN GOGCNAEA EA OPU LJJLDUEXL.


    its not necessarily a vigenere cypher. solve this if u wish i made it. I used simonsingh.net code maker. But i typed the code.
     
    Last edited: Dec 18, 2007
  12. Dec 18, 2007 #11

    is that the 1 in french that u speak of?
     
    Last edited: Dec 18, 2007
  13. Dec 18, 2007 #12
    No, this is in English. In the post where I mention a message in French, there is a link; on that page, click on "stage 4".
     
  14. Dec 18, 2007 #13
    http://www.simonsingh.net/The_Black_Chamber/cracking_tool.html

    I don't completely understand how to solve the vinegre square. The article didn't clearly explain.

    I copy and pasted this from his site. I don't know how to decipher it because its a vinegre. If we work together I bet I will figure it out. Or if you don't feel like working on this cryptogram it I will just do hidden message cryptograms instead.

    QVUEVAIOHJCFMINRCFIYTMPZTFGVKIEKSQAVLOXWVBEK@CEOX@
    TEXPKI@QVX@RHTRQISPZYBRSWEHJPOGHJYDXJGEJTWPH@XEX@RIESK
    VITHVJDVGXBMAMEBXQWEPIMMHSKVEIAIFFCPTPHIMMPRFVEJTX
    QUIZPPNXHMXTKZMSTTKKVFEEUFCCPXJXVPUEOBPV@CEOX@SKILGT
    YQWS@TBX@VDJJBWQDQDLXLCICGHJNWKLXBGQTLNLTKCKKBGCYA
    SJPVTBIAILGUPXROUFMQWEUBRBKITLETBCHTXETVQKQVBSVAIOP
    RFGISTVUTAXCCNBOBCIULSCTMVAIODJVAIJUST@MLBXV@FTCPLITXP
    LCKDXJLGIVAIAPCUHJMWSVHKOPTJLQVUMTLXCPREBIPGIITVAXRI
    PLXIXJXCTTVGEMHTAGKIRCVGTWLCEDECATVKOIAUVQFXETMTM
    SJQWVHRBHXJXWEPTGHJQWINXXQTVUHRJNJCMLBGWITZBBICGSA
    SMFXEQWEVAITPWCLURPVGLXLJXFTVHBEPPMQWGWKPVQPCVOE
    PMTYVLBXJXGEPVCVXBGEPWXRGRQYXETMPLGOXTVBSKPPUHKBD
    VIBEKPAKYILUXJXEYDZGBHOTACVLFAHKLLZDREEYPXSPMLXIQAF
    SQWITPEPUVGVOITHCGHPXGMECQDJKOIIXXVEIPISPXPLOIPZIPTEEA
    EYDYVTJLDXCGHXWENYPLCKYAMZWAGKIXGVCGKBSMPTRBPXTHA
    YTWKWIQWIKKKOPZGTRALITXWXRVGWXLILGFIJDVAHJCXZGEMQIP
    GUVLILGKWLUQKGITWSITZBJTVKCFCKVHKBIENBZFCKGQGBTHKGK
    INICKPVXRVAEQJRKOIOHENLXOJKIEIFPQKGHBQXGWJLGEDXPFTJKK
    IIXKKHYPACGGXBGXCBRBSXJTXQWIAAEAPPNUIBCFQKRLCXJXMOQ
    EEDWTXXJ@MLBXV@JTRAHMP@MLBXV@VKSRHITLTLROGMWXCHJTHKTZG
    KXXZIPMLBBSWMMKILKLW@QPX@GHJBMMUMIKRIQNVPLEUMLBBETLL
    ZDYPMVVSSYGFVILGKMSTVYBXEXRCLXETVKOIOLSWGHQLIPMCJX
    PGLSCILGLIXBCHBVPIQ@QLX@SXZKWEKSFTHEAXQRKIPHMQGSCILGBH
    BCXKMCLUXJBRDHWGXQPISOXXLWEXXFBTRITMKTHQGEJTQQKEY
    AITTAXUXGKRLDRVHAXGHUXZBCMPZEQHYEAEQXQGBJLJRFHYQUST
    VIOIEKGXEPXVAMPQPGTOMAEEXSSTVIKSTCAKMLKTXVEIPLEUML
    BRLWKGENETWEKSXJTXMWMNBTMXVTBTIPXGHJQWMUIEOXWJTRAP
    PUHKBDVIBEKPAKYILUXJXEYDZGPIOTHG@THX@CHDNVF@THC@GHQWE
    VTPBMEPWIOQETMLLASOXAXQVCAEJISDBEPPRFKSDTVKGJXCXEAMIS
    VGGSCILGTJLGIUTMALITXEIHSFXEAPRFUYOXIFTRAILCMXE@THC@KOC
    AEVPMISITGIPHFGRSKSXJXGEJVEACXGHKGXBGWGVXBSAKMLANO
    GLEKSQQNRAHEPWKXIIUPMQWWETXQTVGWGXIXNXJBTHKGKLCM
    VPEPILGFEOHLGLEKSXJTXQWINHAITEFXRIXRGUIVDRFPEPILGKMST
    VCGHQWEV@MLB@SMUMEKIWCOEDTPCBVCGSOPLFRLVAITXRFPEPGY
    UAMKVACLXETWGTEKSXJTXQWIUFEIAFWGHITSHLLFKITLKODAKG
    KXUVCBHLUMVTPIPRFUIDXRPBRDISEKCTPWRBT


    The letter Q appears approximately 47 times
    ceox appears 2 times i used @ symbols to make their location stand out
    I found other reocurring combox marked with @
     
    Last edited: Dec 18, 2007
  15. Dec 19, 2007 #14
    Key: EXPECT

    MYFATHERSFAMILYNAMEBEINGPIRRIPANDMYCHRISTIANNAMEPHILIPMYINFANTTONGUECOULDMAKEOFB
    OTHNAMESNOTHINGLONGERORMOREEXPLICITTHANPIPSOICALLEDMYSELFPIPANDCAMETOBECALLEDPIP
    IGIVEPIRRIPASMYFATHERSFAMILYNAMEONTHEAUTHORITYOFHISTOMBSTONEANDMYSISTERMRSJOEGAR
    GERYWHOMARRIEDTHEBLACKSMITHASINEVERSAWMYFATHERORMYMOTHERANDNEVERSAWANYLIKENESSOF
    EITHEROFTHEMFORTHEIRDAYSWERELONGBEFORETHEDAYSOFPHOTOGRAPHSMYFIRSTFANCIESREGARDIN
    GWHATTHEYWERELIKEWEREUNREASONABLYDERIVEDFROMTHEIRTOMBSTONESTHESHAPEOFTHELETTERSO
    NMYFATHERSGAVEMEANODDIDEATHATHEWASASQUARESTOUTDARKMANWITHCURLYBLACKHAIRFROMTHECH
    ARACTERANDTURNOFTHEINSCRIPTIONALSOGEORGIANAWIFEOFTHEABOVEIDREWACHILDISHCONCLUSIO
    NTHATMYMOTHERWASFRECKLEDANDSICKLYTOFIVELITTLESTONELOZENGESEACHABOUTAFOOTANDAHALF
    LONGWHICHWEREARRANGEDINANEATROWBESIDETHEIRGRAVEANDWERESACREDTOTHEMEMORYOFFIVELIT
    TLEBROTHERSOFMINEWHOGAVEUPTRYINGTOGETALIVINGEXCEEDINGLYEARLYINTHATUNIVERSALSTRUG
    GLEIAMINDEBTEDFORABELIEFIRELIGIOUSLYENTERTAINEDTHATTHEYHADALLBEENBORNONTHEIRBACK
    SWITHTHEIRHANDSINTHEIRTROUSERSPOCKETSANDHADNEVERTAKENTHEMOUTINTHISSTATEOFEXISTEN
    CEOURSWASTHEMARSHCOUNTRYDOWNBYTHERIVERWITHINASTHERIVERWOUNDTWENTYMILESOFTHESEAMY
    FIRSTMOSTVIVIDANDBROADIMPRESSIONOFTHEIDENTITYOFTHINGSSEEMSTOMETOHAVEBEENGAINEDON
    AMEMORABLERAWAFTERNOONTOWARDSEVENINGATSUCHATIMEIFOUNDOUTFORCERTAINTHATTHISBLEAKP
    LACEOVERGROWNWITHNETTLESWASTHECHURCHYARDANDTHATPHILIPPIRRIPLATEOFTHISPARISHANDAL
    SOGEORGIANAWIFEOFTHEABOVEWEREDEADANDBURIEDANDTHATALEXANDERBARTHOLOMEWABRAHAMTOBI
    ASANDROGERINFANTCHILDRENOFTHEAFORESAIDWEREALSODEADANDBURIEDANDTHATTHEDARKFLATWIL
    DERNESSBEYONDTHECHURCHYARDINTERSECTEDWITHDYKESANDMOUNDSANDGATESWITHSCATTEREDCATT
    LEFEEDINGONITWASTHEMARSHESANDTHATTHELOWLEADENLINEBEYONDWASTHERIVERANDTHATTHEDIST
    ANTSAVAGELAIRFROMWHICHTHEWINDWASRUSHINGWASTHESEAANDTHATTHESMALLBUNDLEOFSHIVERSGR
    OWINGAFRAIDOFITALLANDBEGINNINGTOCRYWASPIP

    I wrote the program below, and used its output sorted by the 4th column (using the "sort" command) to help getting the key length. The 1st and 2nd column tell the letter and its position, respectively.
     

    Attached Files:

  16. Dec 19, 2007 #15

    dude you cheated with a program, come on. That takes all the fun and the skill out of it. Decoding it with a program is like not decoding it at all. Do you know how to decode a vigenere without using a program?
     
  17. Dec 19, 2007 #16
    You mean, measuring the distance between similar groups, and taking the GCD as a candidate for the key length. In this case, I thought it was more interesting to relate the solving to letter frequencies. It's not a brute force attack, which would be impractically long. How would you calculate letter frequencies for a substitution cypher without a program, for example?
     
  18. Dec 19, 2007 #17
    Oh well its quite easy you just count the letters. Are you saying you just used the program to save time? Can you provide the link to the program you used, the black chamber program doesn't work on this cypher becuz it has symbols. After you gathered up the frequency then how did you solve it?
     
    Last edited: Dec 19, 2007
  19. Dec 19, 2007 #18
    The program is attached on post #14. It produces some output, which has to be sorted afterwards by column #4. The first 10 lines of the output, after sorting, are:
    Code (Text):

    P 2 6   0.80604 0.69821
    E 3 9   0.81012 0.65658
    E 0 3   0.82585 0.76514
    C 10 12 0.88765 0.76796
    X 1 6   0.88835 0.79568
    C 4 6   0.91278 0.93505
    E 3 6   0.94524 1.06175
    E 6 9   0.96027 0.87800
    E 3 18  0.97258 0.77753
    T 5 6   1.02209 0.80147
    ...
    Column #3 is the key length. You can see an abundance of 6 for column #3 on these first lines, as well as other multiples of 6. Column #2 is the letter position (for length=6, position=0..5), so the key EXPECT pops out immediately.

    The 4th column, the one you use to sort (the one which is small on good candidates) is the sum of errors between (a) the letter frequencies in English and (b) the letter frequencies in the text for that letter, position and length. The lesser the error, the better the candidate.
     
  20. Dec 19, 2007 #19

    I am assuming that in your post p26,e39 and ect. are commonly found trigrams or three letter combos. But what are the decimal numbers for that are parallel to the trigrams? Shouldn't their abundance and space apart be represented by whole numbers? Could you have been able to gather these numbers without the software?
     
    Last edited: Dec 19, 2007
  21. Dec 22, 2007 #20
    Does anyone understand how to decode the vinegre cypher?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Cryptology and codes vigenere code formula
  1. Code in mail (Replies: 9)

  2. Number codes (Replies: 3)

  3. Code Cracking (Replies: 5)

  4. Cyclic codes (Replies: 4)

  5. An Unbreakable Code? (Replies: 10)

Loading...