Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” SecureCrypt – Streamlit-Based Encryption System

Welcome to SecureCrypt – an interactive, browser-based encryption and decryption platform built with Streamlit.
This system allows users to securely perform random and pseudo-random key-based XOR encryption on both image and text files, and compare their security characteristics.


πŸš€ Project Overview

SecureCrypt provides a hands-on playground for understanding how cryptographic key generation affects data security.
With support for both truly random and deterministically generated (pseudo-random) keys, this system lets users:

  • πŸ” Encrypt/Decrypt files with full control
  • πŸ“Š Analyze key entropy and encryption time
  • πŸ“ˆ Compare security outcomes visually and statistically

🧠 Features

  • πŸ–Ό Encrypt/Decrypt Images with XOR logic using random or pseudo-random keys
  • πŸ“„ Encrypt/Decrypt Text Files (.txt, .csv, .log supported)
  • 🎲 Random Key Generation using Python's secrets module
  • πŸ€– Pseudo-Random Key Generation using random with a user-defined seed
  • πŸ“Š Compare Key Entropy & Performance (via integrated Flask API)
  • πŸ’Ύ File download and preview support
  • πŸ’‘ Simple, elegant GUI built using Streamlit

βš™ How It Works

  1. Select Operation: Choose from image/text encryption, decryption, or key comparison
  2. Upload Files: Provide your source files and key/seed where required
  3. Choose Key Type: Select random or pseudo-random key for the operation
  4. Download Results: Get encrypted/decrypted files and the generated keys
  5. Compare Security: Evaluate entropy and encryption speed for both key types

πŸ–₯ Interface Preview

The interface offers:

  • βœ… Sidebar navigation for operation selection
  • βœ… File uploader widgets for source and key files
  • βœ… Download buttons for encrypted/decrypted outputs
  • βœ… Entropy and encryption time display in comparison view

πŸ›  Setup & Running the Project

πŸ”ƒ Backend (Flask API for entropy comparison)

Start the comparison server:

python compare_encryption.py

🌐 Frontend (Streamlit GUI)

In a new terminal, run the frontend:

streamlit run SecureCrypt.py

This will launch the user interface in your default browser at http://localhost:8501.


πŸ“‚ Project Structure

SecureCrypt/
β”œβ”€β”€ compare_encryption.py
β”œβ”€β”€ imageEncDec.py
β”œβ”€β”€ imageEncDec.py
β”œβ”€β”€ SecureCrypt.py
└── README.md

πŸ” Notes

  • Keep your keys secure; random keys offer stronger security but are harder to reproduce
  • Pseudo-random keys enable repeatable encryption with the same seed
  • Use the comparison feature to understand key entropy and encryption speed tradeoffs

🀝 Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.


πŸ“¬ Contact

For questions or collaborations, reach out via GitHub.

About

πŸ” Python + Streamlit + XOR logic | πŸ—‚ Encrypts/decrypts text & image files | 🎲 Random & pseudo-random keys + πŸ“ˆ Entropy-based strength comparison

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages