An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# RC5 in Rust [![CI](https://github.com/JohnBasrai/rc5-cbc/actions/workflows/rust.yml/badge.svg)](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.