Skip to content

yoqubov-dev/shrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

GNU nano 8.2 README.md Encryption Decryptor Tool This program is designed to detect the type of encryption (Base64, Hex, AES, or Caesar Cipher) and decrypt the given input automatically. If a specific encry>

How It Works Encryption Detection:

The program tries to determine whether the input is Base64, Hex, AES, or Caesar Cipher. Detection is performed in the following order: Base64 Hexadecimal AES (requires a key from the user) Caesar Cipher (tested with shifts from 1 to 25) Decryption:

For Base64 and Hex, the program directly decodes the data. For AES, the user must provide the encryption key, which is hashed using SHA-256 to generate the appropriate AES key. For Caesar Cipher, the program attempts all possible shifts (1–25) to find a readable output. Output:

If a matching encryption type is found, the decrypted output is displayed. If the program cannot detect or decrypt the input, it informs the user. Libraries Used The program relies on the following Python libraries:

base64: For encoding and decoding Base64 strings. hashlib: To hash the AES key using SHA-256. Crypto (from pycryptodome): For AES decryption and padding utilities. Prerequisites Before running the program, ensure you have Python installed on your system (version 3.6 or higher). Additionally, you need to install the required libraries.

Installation Clone the repository or copy the script to your local machine. Install the necessary Python libraries:

pip install pycryptodome

The program is now ready to run. Usage Run the program using Python:

python reader.py

Enter the encrypted text when prompted. If the input uses AES encryption, the program will ask for the key. Otherwise, it will attempt to decrypt automatically. The program will display the decrypted output or inform you if the encryption type couldn't be identified. Example Usage Base64 Decryption Input: U2Fsb20gRHVueW9nYQ==

Output: Salom Dunyoga

Hexadecimal Decryption Input: 53616c6f6d2044756e796f6761

Output: Salom Dunyoga

AES Decryption Input: Base64-encoded AES-encrypted data Key: mysecretkey

Output: Decrypted plaintext

Caesar Cipher Decryption Input: Uifsf jt b tfdsfu!

Output: There is a secret! (Shift: 1)

Limitations The program only supports Base64, Hex, AES (CBC mode), and Caesar Cipher. Other encryption methods like RSA or Blowfish are not supported. AES decryption requires the correct key to work. Detection is sequential, meaning the program checks Base64 first, followed by Hex, AES, and finally Caesar Cipher.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages