RC5-Block
A pure‑Rust implementation of the RC5 block cipher, supporting variable word‑sizes (u16, u32, u64, u128),
PKCS#7 padding and the three classic modes of operation: ECB, CBC, and CTR.
This implementation is inspired by the original paper on RC5-Block-Cipher by Ronald L. Rivest.
Features
This library is generic over word-size per block and suppoerts multiple operation modes.
-
Supported Word sizes:
- 16‑bit
- 32‑bit
- 64‑bit
- 128 bit
-
Modes
- ECB: Electronic Codebook
- CBC: Cipher Block Chaining (with PKCS#7 padding)
- CTR: Counter mode (no padding)
-
Helpers
- PKCS#7 padding/unpadding (Strict)
- Random IV / nonce+counter generators
- Parse hex strings for IV and nonce
Installation
Add to your Cargo.toml:
[]
= "0.1"
And start using it in your application
use ;
Testing
This library is tested against some of the standard test vectors and round trip tests. These tests are define here. Standard test vector are picked from here.
RC5-CLI
This is a command-line application developed using this library, see it readme for more.