Getting Started
Requirements
- Rust (>= 1.65)
- Cargo (>= 1.65)
- The ZKryptium CL03 implementation also depends on the Rug crate which depends on GMP, MPFR and MPC libraries through the low-level FFI bindings in the gmp-mpfr-sys crate, which needs some setup to build; the gmp-mpfr-sys documentation has some details on usage under GNU/Linux, macOS and Windows.
Usage
BBS+:
[dependencies]
zkryptium = { version = "0.4.0", default-features = false, features = ["bbsplus"] }
BBS+ Blind signature:
[dependencies]
zkryptium = { version = "0.4.0", default-features = false, features = ["bbsplus", "bbsplus_blind"] }
CL2003:
[dependencies]
zkryptium = { version = "0.4.0", default-features = false, features = ["cl03"] }
WARNING: for CL2003 use a version from v0.3.2 onwards that uses a new secure cryptographic implementation of the Pseudo Random Number Generator ThreadRng
Examples
Take a look at the examples.
You can run the examples based on the BBS+ Signature Scheme with:
cargo run --example bbsplus <ciphersuite>
cargo run --example bbsplus_blind <ciphersuite>
Available Ciphersuites:
- BLS12-381-SHA-256
- BLS12-381-SHAKE-256
You can run the examples based on the CL2003 Signature Scheme with:
cargo run --features="cl03" --example cl03 <ciphersuite>
cargo run --features="cl03" --example cl03_multiattr <ciphersuite>
Available Ciphersuites:
- CL1024-SHA-256
Test
To test the library you can launch the test vectors with:
cargo test