- Amine-Ayoub Bigham
First, you will need java and c++ building tools (if not already installed):
$ sudo apt update
$ sudo apt install build-essential default-jdk default-jre
An already preprocessed book is available in the repo (mybook.txt
). However, if you want to use your own personal book, please put it inside the folder and run:
$ javac PreprocessText.java
$ java PreprocessText <your_input_book.txt> <your_preprocessed_output.txt>
You now have a preprocessed book file that can be used to run the algorithms on.
To compile the different files:
- run
make
in your terminal, you will now have two binaries :cesar
andvigenere
./cesar -c <mybook.txt> <ciphered.txt>
./vigenere -c <mybook.txt> <ciphered.txt>
Run the deciphers (you will be asked to enter a shift and if you decline, the program will run the cryptanalysis instead)
./cesar -d <ciphered.txt> <deciphered.txt>
./vigenere -d <ciphered.txt> <deciphered.txt>
The script.sh
file will run everything for you in the perfect order, using the example book already present in the repo:
chmod +x script.sh
./script.sh