Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oxion7/rc4-rust
RC4 algorithm in rust
https://github.com/oxion7/rc4-rust
algorithm cipher cryptography stream-cipher
Last synced: 5 days ago
JSON representation
RC4 algorithm in rust
- Host: GitHub
- URL: https://github.com/oxion7/rc4-rust
- Owner: Oxion7
- Created: 2024-05-16T12:10:41.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-24T19:09:42.000Z (5 months ago)
- Last Synced: 2024-06-24T21:02:35.966Z (5 months ago)
- Topics: algorithm, cipher, cryptography, stream-cipher
- Language: Rust
- Homepage:
- Size: 403 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RC4 Algorithm in Rust
This repository contains an implementation of the RC4 stream cipher algorithm in Rust. The program allows you to encrypt and decrypt messages using RC4.
## Features
- Key Scheduling Algorithm (KSA)
- Pseudo-Random Generation Algorithm (PRGA)
- Real-time encryption and decryption of input text
- Hexadecimal output for ciphertext
- Support for UTF-8 plaintext and decryption back to the original text## Getting Started
### Prerequisites
- Rust programming language installed. You can download it from [rust-lang.org](https://www.rust-lang.org/).
### Running the Program
1. **Clone the Repository**
```sh
git clone https://github.com/Oxion7/rc4-rust.git
cd rc4-rust
```2. **Build the Program**
```sh
cargo build
```3. **Run the Program**
```sh
cargo run
```### Usage
Upon running the program, you will be prompted to enter a key and the plaintext to encrypt. The program will output the ciphertext in hexadecimal format and then decrypt it back to show the original plaintext.
Example:
```sh
Enter the key: mysecretkey
Enter the plaintext: hello world
Ciphertext (hex): 3e 14 23 3d 25 8b 2c 8b 1a 15 5a
Decrypted: hello world
Decrypted text: hello world