View on GitHub

Frequency-Analysis-Simulator

A Java program that decrypts cryptograms without keys using frequency analysis

Frequency Analysis Simulator

The purpose of this project is to decrypt a monoalphabetic substitution cipher using frequency analysis and find the optimal algorithm and conditions of decrypting a Vigenere cipher.

Methods of Cryptanalysis

Usage

  1. Clone this repo with git clone https://github.com/varunsingh87/Frequency-Analysis-Simulator (for help see the GitHub documentation).
  2. Run mvn package
  3. Run the GUI with the following command:
mvn compile exec:java"

Collecting Data

Run the following command for data collection of a single input (~480 runs/data points):

mvn compile exec:java -Dexec.mainClass="dataanalysis.DataCollector"

Run the following command for data population of experiment data. To use a different key you will need to edit the default in DataCollector.java and make a new folder and subfolders of all the combinations of key length and caesar decryption algorithms in the following format:

outputs/
    [ioc, friedman]_[kasiski, kerckhoff]/
        

Generate executable file

To create an executable file without the user needing the Java Runtime Environment on his or her computer, use the jpackage utility from the Java Development Kit:

**Mac **: jpackage --input target/ --name 'Frequency Analysis Simulation' --main-jar com.varunsingh.frequencyanalysissimulator-1.00.jar --main-class frequencyanalysissimulator.presentation.main.Main --type dmg --icon ./assets/icon.icns

*Windows **: jpackage --input target/ --name 'Frequency Analysis Simulation' --main-jar com.varunsingh.frequencyanalysissimulator-1.00.jar --main-class frequencyanalysissimulator.presentation.main.Main --type exe --icon ./assets/icon.ico *Does not work on Mac

*Linux **: jpackage --input target/ --name 'Frequency Analysis Simulation' --main-jar com.varunsingh.frequencyanalysissimulator-1.00.jar --main-class frequencyanalysissimulator.presentation.main.Main --type deb --icon ./assets/icon.ico *Does not work on Mac

Process

Phase I: Monoalphabetic Ciphers: July 22, 2019 - February 16, 2020

Phase II: Vigenere Ciphers: September 26, 2022 - May 8, 2023

Phase III: Graphics, Refactors, Variants: July 22, 2023 - November 26, 2023

Phase III

Phase II

Phase I

Concepts Used

Built With

Sources of Research