This project contains 13 cryptography algorithms implemented in Java. The algorithms demonstrate various classical encryption and decryption methods, along with N-gram operations for text processing. This repository provides the full source code for each algorithm.
Crypto Codes
├── src # Source code
| └── cryptography # Cryptography algorithm implementations
| ├── Affine.java
| ├── Atbash.java
| ├── August.java
| ├── Autoclave.java
| ├── Beaufort.java
| ├── Caesar.java
| ├── Gronsfeld.java
| ├── Hill.java
| ├── Myszkowski.java
| ├── NGramOperations.java # N-gram operations for text processing
| ├── RailFence.java
| ├── Route.java
| └── Vignere.java
├── Output.txt
└── Readme.md # Project description
The following cryptographic algorithms are implemented in this project:
-
Caesar Cipher
A substitution cipher where each letter is shifted by a fixed number. -
Atbash Cipher
A simple substitution cipher where the alphabet is reversed. -
August Cipher
A polyalphabetic substitution cipher similar to Caesar cipher with shift of 1. -
Affine Cipher
A cipher based on linear transformations of the alphabet. -
Vigenere Cipher
A polyalphabetic substitution cipher that uses a keyword to determine the shifts. -
Gronsfeld Cipher
A variant of the Vigenere cipher using digits (0-9) as the key. -
Beaufort Cipher
A cipher similar to the Vigenere cipher but uses a reversed alphabet for encryption. -
Autoclave Cipher
Also known as the Running Key cipher, it uses a key of arbitrary length to encrypt the message. -
Ngram Operations
Generates N-grams (unigrams, bigrams, trigrams, etc.) from input text for text analysis and prediction. -
Hill Cipher
A polygraphic substitution cipher based on matrix multiplication. -
Rail Fence Cipher
A transposition cipher that arranges text in a zigzag pattern across multiple rails. -
Route Cipher
A transposition cipher where the plaintext is written into a grid and then read in a specific route. -
Myszkowski Cipher
A transposition cipher using a keyword to reorder columns and transpose them.
-
Clone or download this repository.
-
Open the project in your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse, or VSCode).
-
Navigate to the
src/cryptography
folder. -
Each algorithm is implemented in its own
.java
file. You can run any of the classes directly to test the encryption and decryption functionalities.Example for running the Caesar Cipher:
- Open
Caesar.java
. - Run the
main
method to see the encryption and decryption in action.
- Open
-
For N-gram operations, run the
NGramOperations.java
to see how the text can be split into unigrams, bigrams, and trigrams.
- Java Development Kit (JDK) version 8 or higher.
- No additional libraries are required for this project.
This project is open-source and available under the MIT License.
Sanjeeth Manikandan