https://github.com/johnbasrai/rc5-cbc
RC5 Symmetric Block Cipher in Rust
https://github.com/johnbasrai/rc5-cbc
cryptography
Last synced: 11 months ago
JSON representation
RC5 Symmetric Block Cipher in Rust
- Host: GitHub
- URL: https://github.com/johnbasrai/rc5-cbc
- Owner: JohnBasrai
- License: mit
- Created: 2023-10-13T13:17:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-15T17:20:17.000Z (over 1 year ago)
- Last Synced: 2025-01-11T21:22:29.966Z (over 1 year ago)
- Topics: cryptography
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RC5 in Rust [](https://github.com/JohnBasrai/rc5-cbc/actions/workflows/rust.yml)
RC5 is a symmetric-key block-cipher designed by Ron Rivest in 1994.
It is notable for being simple and fast (it uses only primitive operations such as XOR and data-dependent rotations) and for its small memory footprint. Those properties make Rust an **ideal** language in which to implement it.
---
## Building the library & CLI
```console
# build an optimized release binary
$ cargo build --release
```
The CLI lives in `src/bin/rc5-cbc.rs` and is built automatically as the `rc5-cbc` binary.
---
## Usage
### Encrypt
```console
# replace with any file you want to protect
$ cargo run --release --bin rc5-cbc -- --input --output ciphertext.rc5 encrypt
Passphrase: ********
```
### Decrypt
```console
$ cargo run --release --bin rc5-cbc -- --input ciphertext.rc5 --output decrypt
Passphrase: ********
```
## Running tests & lints
```console
# unit + integration + property tests
$ cargo test
# static analysis
$ cargo clippy --all-targets --all-features
```
All tests should pass and Clippy should emit no warnings.
---
## License
This project is licensed under the MIT License – see [`LICENSE`](LICENSE) for details.