Crate zkryptium

Source
Expand description

§ZKryptium

License

§Description

ZKryptium library provides an implementation of:

  • BBS+(draft-irtf-cfrg-bbs-signatures-08) signature scheme
  • Blind BBS Signatures (draft-irtf-cfrg-bbs-blind-signatures-01) signature scheme with some fixes taken from grotto-bbs-signatures
  • BBS per Verifier Linkability (draft-irtf-cfrg-bbs-blind-signatures-01)
  • CL2003 (https://link.springer.com/chapter/10.1007/3-540-36413-7_20) signature scheme This library enables the creation of zero-knowledge proofs, exposing cryptographic primitives facilitating the development of a Verifiable Credentials (VCs) system capable of handling both Anonymous Credentials and Selective Disclosure Credentials. 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

§Getting Started

§Requirements

§Usage

§BBS+:
[dependencies]
zkryptium = { version = "0.5.0", default-features = false, features = ["bbsplus"] }
§BBS+ Blind signature:
[dependencies]
zkryptium = { version = "0.5.0", default-features = false, features = ["bbsplus", "bbsplus_blind"] }
§BBS+ per Verifier Linkability:
[dependencies]
zkryptium = { version = "0.5.0", default-features = true}
§CL2003:
[dependencies]
zkryptium = { version = "0.5.0", default-features = false, features = ["cl03"] }

§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>
cargo run --example bbsplus_nym <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
  • CL2048-SHA-256
  • CL3072-SHA-256

§Test

To test the library you can launch the test vectors with:

cargo test

Modules§

bbsplus
BBS+ signature scheme module The BBS (Boneh-Boyen-Shacham) Signature Scheme is a cryptographic protocol optimized for efficient, privacy-preserving, multi-message signatures. The scheme is based on pairing-based cryptography, allowing a user to compactly sign multiple messages, with the possibility of verifying each individual message in a set without revealing the actual content. This makes BBS signatures well-suited for privacy-sensitive applications such as anonymous credentials and selective disclosures in identity systems. Key characteristics of the BBS Signature Scheme:
errors
Errors module
keys
Keys module
schemes
Schemes module
utils
Utils module