Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🔐 Encryption / Decryption Tool

A Python-based cybersecurity utility for securely encrypting and decrypting text messages and files using the Fernet symmetric encryption algorithm.

📌 Project Overview

The Encryption / Decryption Tool is designed to demonstrate the practical use of cryptography in cybersecurity.

The tool can:

  • Encrypt text messages
  • Decrypt encrypted messages
  • Encrypt files
  • Decrypt encrypted files
  • Generate and use a secure encryption key
  • Handle invalid user input
  • Prevent accidental file overwriting

🛠️ Technologies Used

  • Python 3
  • Cryptography Library
  • Fernet Symmetric Encryption
  • File Handling
  • Exception Handling

🔐 How It Works

The project uses Fernet symmetric encryption.

The same secret key is required for both encryption and decryption.

Encryption

Plaintext message/file ↓ Secret Key ↓ Fernet Encryption ↓ Encrypted Data

Decryption

Encrypted Data ↓ Secret Key ↓ Fernet Decryption ↓ Original Message/File

✨ Features

1. Message Encryption

The user can enter a text message and the tool converts it into encrypted ciphertext.

2. Message Decryption

The encrypted message can be decrypted using the correct secret key.

3. File Encryption

The tool can read a file as binary data and create an encrypted .encrypted file.

4. File Decryption

An encrypted .encrypted file can be decrypted back into its original form.

5. Error Handling

The program handles:

  • Empty messages
  • Empty file paths
  • Invalid menu choices
  • Invalid encrypted messages
  • Invalid encrypted files
  • Missing files

6. File Overwrite Protection

The program checks whether the destination file already exists before writing to it to reduce the risk of accidental overwriting.

📂 Project Structure

Encryption-Decryption-Tool/ │ ├── main.py ├── secret.key ├── .gitignore ├── README.md └── test.txt

⚙️ Installation

Step 1: Install Python

Make sure Python 3 or later is installed.

Check the version:

python --version

About

Python-based encryption and decryption tool using Fernet symmetric cryptography for messages and files.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages