Superfluous‎ > ‎Experimentation‎ > ‎

Cracking Substitution Cypher

We were set a challenge in the office to break a simple substitution cypher

TLYRHCHGTIYZLTEEHGDTBDNTRHJDNYCMDRPRVCPZPRATODCGGJYTAYHDQJYZGJZYYLJPESZYRJYZYLYPWYHGJYQDEEDBPRAZ
YMEFPQFDCNCEGPMEFGJYPZTAYHFDCAYGHYWYRGFGBDQCZGJYZNDZYGJYHCNDQGJYPZTAYHPHGJYJDCHYRCNOYZGJYLYRH
CHGTIYZEDDIHTGGJYSDDZTRSLDRHPSYZHGJYHPGCTGPDRQDZTNDNYRGPSDRGGJPRIPLTRBDZIPGDCGQZDNGJTGLTRFDCAPWY
NYHDNYNDZYPRQDZNTGPDRMEYTHWJYTHIHHCZYGJPRAZYMEPYHGJYBDNTRGJTGHNFDESYHGLJPESCMHGTPZHMETFPRAGJYM
PTRDGJYLYRHCHGTIYZHNPEYHGJTRIHGJYBDNTRTRSBTEIHTBTFJTMMFJDBDESTZYGJYLJPESZYR

We wrote a basic C# program to attempt to crack it

  1. Load in a dictionary and place it into a TRIE data structure
  2. Place any assertions about letter mappings from performing frequency analysis i.e. in English the letter e is most common
  3. Recursive code attempting to fit words to position x in the input string
  4. Time complexity information to follow



ċ
CrackCode.rar
(470k)
Tim Scarfe,
17 Mar 2013, 12:39
ċ
maincode.cs.txt
(4k)
Tim Scarfe,
17 Mar 2013, 12:33
Comments