A portable Rabin-Williams signature scheme implementation in pure Rust.
use rabin_williams::generate_private_key;
use rand::rngs::OsRng;
let mut rng = OsRng;
let bits = 1024;
let private_key = generate_private_key(&mut rng, bits).expect("failed to generate a key");
let public_key = private_key.to_public_key();
// Signature
let message = String::from("fast verification scheme");
let signature = private_key.sign(message.as_bytes());
// Verification
assert!(public_key.verify(
message.as_bytes(),
signature.unwrap()
));
Currently at Phase 1 (v) 🚧
There will be three phases before 1.0
🚢 can be released.
- 🚧 Make it work
- Prime generation: Rabin-Williams scheme ✅
- Key generation ✅
- Rabin-Williams: Sign & Verify
- Key import & export
- 🚀 Make it fast
- Benchmarks ✅
- compare to other implementations 🚧
- optimize 🚧
- 🔐 Make it secure
- Fuzz testing
- Security Audits
All crates in this repository support Rust 1.56 or higher. In future minimally supported version of Rust can be changed, but it will be done with a minor version bump.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.