Winternitz-OTS
A Rust Library/Crate For Dealing With The Post-Quantum Digital Signature Scheme Winternitz One-Time Signature (W-OTS) using the hash function Blake2b.
Read About W-OTS
How To Use
Basic Usage
This will show you the basic usage of the library and how to generate a W-OTS Keypair and use it to sign a message digest, then verify the signature.
use wots;
// Generates a W-OTS Keypair using parameters using Winternitz Parameter of 16 and Blake2B
let keypair = generate_wots;
// Have A Hexadecimal String You Would Like To Sign
let hex_digest = String from;
// Sign up to a 256bit (32 byte) hexadecimal digest using your W-OTS Keypair and a String
let signature = keypair.sign;
// Return a Boolean To Check Whether The Signature Is Valid
let verification: bool = signature.verify;
Access Keypair Attributes
use wots;
// Generates a W-OTS Keypair using parameters using Winternitz Parameter of 16 and Blake2B
let keypair = generate_wots;
// Sign Message
let sig = keypair.sign;
// Get From Keypair
let public_key: = keypair.pk;
let private_key: = keypair.sk;
// Get From Signature
let public_key = sig.pk;
let signatures = sig.signature;
let input: String = sig.input;
More In-Depth Usage
extern crate winternitz_ots;
use wots;
To-Do
- Add more tests / examples
- Refactor Code A Lot and Reduce Memory Footprint
- Attempt To Make Code Secure Against Side-Channel Attacks and Test For Security Vulnerabilties
- Complete Benchmarks
A Winternitz-OTS+ (WOTS+) version in Rust is also currently in the works.
License
Licensed under either of
- Apache License, Version 2.0
at your option.
Contribution
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.