/encreption-algorithms

CLI application that for encrypt, decrypt data using one algorithm of AES, RSA, Columnar cipher or Playfair cipher.

Primary LanguageJava

Encryption algorithms

in this project, I have implemented some encryption algorithms. and make Command Line interface (CLI) for them.

Installation

git clone https://github.com/SalahTawafsha/encreption-algorithms.git

App Usage

CLI of the algorithms
so that user can choose the algorithm he wants to use and then enter the text he wants to encrypt or decrypt.

1. Advanced Encryption Standard (AES)

Advanced Encryption Standard (AES) is a symmetric encryption algorithm. it is a block cipher that encrypts 128-bit blocks of data. The key size can be 128, 192, or 256 bits.

When select AES. the user will be asked to enter if he wants to encrypt or decrypt the text.
AES options

1.1. Encryption

in encryption, the user will be asked to enter the 32-byte key as HEX and the text he wants to encrypt, then he will get the ciphertext.
AES Encryption

1.2. Decryption

in decryption, the user will be asked to enter the 32-byte key as HEX and the ciphertext he wants to decrypt, then he will get the original text.
AES Decryption

2. Rivest-Shamir-Adleman (RSA)

Rivest-Shamir-Adleman (RSA) is an asymmetric encryption algorithm. it is a block cipher that encrypts 128-bit blocks of data. The key size can be 128, 192, or 256 bits.

When select RSA. the user will be asked to enter if he wants to encrypt or decrypt the text.
RSA options

2.1. Encryption

in encryption, the user will be asked to enter the plaintext and system will generate the public and private keys, then he will get the keys with ciphertext as hex.
RSA Encryption

2.2. Decryption

in decryption, the user will be asked to enter the keys and the ciphertext he wants to decrypt, then he will get the original text.
RSA Decryption

3. Columnar Cipher

Columnar Cipher is a transposition cipher. and I updated it to can use any characters in the key.

When select Columnar Cipher. the user will be asked to enter if he wants to encrypt or decrypt the text.
Columnar Cipher options

3.1. Encryption

in encryption, the user will be asked to enter the key and the text he wants to encrypt, then he will get the ciphertext.
Note: the key is string of any characters but must be unique characters.
Columnar Cipher Encryption

3.2. Decryption

in decryption, the user will be asked to enter the key and the ciphertext he wants to decrypt, then he will get the original text.
Note: the key is string of any characters but must be unique characters.
Columnar Cipher Decryption

4. PlayFair Cipher

PlayFair Cipher is a substitution cipher. and I updated it to be 16 X 16 matrix and can be used for any kind of characters.

When select PlayFair Cipher. the user will be asked to enter if he wants to encrypt or decrypt the text.
PlayFair Cipher options

4.1. Encryption

In encryption, the user will be asked to enter the text he wants to encrypt, then he will get the ciphertext.
PlayFair Cipher Encryption

4.2. Decryption

In decryption, the user will be asked to enter the ciphertext he wants to decrypt, then he will get the original text.
PlayFair Cipher Decryption