Crypto-Analysis
Description: Crypto-Analysis is a program to help decipher texts enciphered with pre-WWII encription algorithms. It have frequency calculator (n-grams), sliding, decimating (and soon any linear transformation) as a check for my calculations.

There is no point really of making such program to actually decipher those messages as anyone can do it by hand so the idea is only to match results I did previously.

Note that, because it doesn't need to be fast I did everything the pedestrian way (brute-force). As the program evolve I'll start using better algorithms (like substitute slide+decimate for linear transform.).

To test all functions, run make && ./test.

There is one small program to decipher messages using slides or decimation (not both yet): ./decipher < messages.txt


Motivation: I'm reading the book Elementary Cryptanalysis by Abraham Sinkov, written in 1966 about basic cryptography at that time. The book is really fantastic if you put yourself into the context and I'm willing to solve all proposed problems.

While solving the exercises, some times I made mistakes in a very early phase and I couldn't solve the problem properly, spending several minutes and getting cross. After a day or two, starting from scratch I could solve the problem in a few minutes. (getting even more cross!).

This program, not also helps me to checkpoint my work, but also to make me understand better the algorithms and boundary problems involved.


DONE:
  • Cryptogram manipulation: suggest and solve
  • Frequency analysis: unigram and trigram, sliding and decimating
  • Basic translations: best slide/decimation and letter substitution

TODO:
  • Support any linear transformation
  • Get frequencies of digrams
  • Get frequencies of start/stop unigrams
  • Match "plain" text for dictionary words

Download: analysis.tar.gz


Rengolin This page was created using Vim