20 unstable releases (5 breaking)

0.6.0 Jul 14, 2025
0.4.1 May 5, 2025
0.4.0 Mar 17, 2025
0.3.2 Dec 16, 2024
0.1.6 Nov 16, 2023

#102 in Cryptography

Download history 1137/week @ 2025-07-23 836/week @ 2025-07-30 1549/week @ 2025-08-06 1855/week @ 2025-08-13 1721/week @ 2025-08-20 1906/week @ 2025-08-27 1450/week @ 2025-09-03 1061/week @ 2025-09-10 1244/week @ 2025-09-17 1952/week @ 2025-09-24 1158/week @ 2025-10-01 1579/week @ 2025-10-08 1440/week @ 2025-10-15 973/week @ 2025-10-22 1406/week @ 2025-10-29 1842/week @ 2025-11-05

5,872 downloads per month
Used in 24 crates (6 directly)

Apache-2.0 and maybe LGPL-3.0+

380KB
7K SLoC

ZKryptium

License

Description

ZKryptium library provides an implementation of:

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.6.0", default-features = false, features = ["bbsplus"] }
BBS+ Blind signature:
[dependencies]
zkryptium = { version = "0.6.0", default-features = false, features = ["bbsplus", "bbsplus_blind"] }
BBS+ per Verifier Linkability:
[dependencies]
zkryptium = { version = "0.6.0", default-features = true}
CL2003:
[dependencies]
zkryptium = { version = "0.6.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

Adopted by

We’re proud to be adopted by companies around the world. Here are a few of the organizations leveraging our library:

Dependencies

~4–6MB
~108K SLoC