Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alejandromeyer/message-encoder
https://github.com/alejandromeyer/message-encoder
encryption-decryption jupyter-notebook python
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alejandromeyer/message-encoder
- Owner: AlejandroMeyer
- Created: 2025-01-26T17:00:59.000Z (12 days ago)
- Default Branch: main
- Last Pushed: 2025-01-26T17:01:40.000Z (12 days ago)
- Last Synced: 2025-01-26T17:33:35.642Z (12 days ago)
- Topics: encryption-decryption, jupyter-notebook, python
- Language: Jupyter Notebook
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Message Encryption and Decryption with Static Key
This project provides two Python scripts for message encryption and decryption. The encryption process uses a randomly generated key, and the decryption process uses a static key stored in a file (`key.txt`). The scripts ensure that the same key is used for all operations until a new key is generated.
## Features
- **Generate Key**: Generate and store a random key for encrypting messages.
- **Encrypt Message**: Encrypt a message using the generated key and a predefined alphabet.
- **Decrypt Message**: Decrypt an encrypted message using the stored key from the file.## How It Works
1. **Key Generation**: The `generate_key()` function generates a random key based on the length of the input message and stores it in a file (`key.txt`).
2. **Encryption**: The `encrypt_message()` function encrypts a message by combining each character of the message with the corresponding character in the key using modular arithmetic.
3. **Decryption**: The `decrypt_message()` function decrypts an encrypted message using the key stored in `key.txt`.## Installation
1. Clone the repository or download the files:
```bash
[git clone https://github.com/AlejandroMeyer/Message-Encoder.git]