-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from Cybersecurity-LINKS/docs-zkryptium
docs zkryptium
- Loading branch information
Showing
8 changed files
with
215 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
|
||
# json-proof-token | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Algorithms", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# BBS+ | ||
|
||
The [BBS (Boneh-Boyen-Shacham) Signature Scheme](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bbs-signatures-07) 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: | ||
- **Signature Compactness**: The BBS scheme can sign multiple messages in a compact format, producing a single signature that proves the authenticity of all messages in the set. This reduces data overhead in multi-message scenarios. | ||
- **Selective Disclosure**: A unique feature of BBS signatures is their ability to selectively reveal certain signed messages while keeping others hidden. This functionality supports applications in privacy-preserving systems, such as Verifiable Credentials, where users may only need to disclose specific attributes of their identity. | ||
- **Non-Interactive Zero-Knowledge Proofs**: BBS signatures support efficient zero-knowledge proofs (ZKPs) for verifying the validity of certain messages in a signature set without exposing additional information. This ZKP capability underpins its use in privacy-focused applications. | ||
|
||
The BBS scheme employs asymmetric cryptographic operations and relies on pairings between groups in elliptic curve cryptography, which allows for compact and efficient operations. | ||
|
||
### **Blind BBS Signature Extension** | ||
|
||
The [Blind BBS Signature Extension](https://datatracker.ietf.org/doc/html/draft-kalos-bbs-blind-signatures-01) builds on the BBS scheme to support blind signing, where a signer can authenticate a message without knowing its content. This is achieved through a blinding process applied to the message by the recipient before sending it to the signer. The signer then issues a signature over the blinded content, ensuring privacy. | ||
|
||
Key features of the Blind BBS Signature Extension: | ||
- **Message Blinding**: This extension allows recipients to obscure (blind) their messages before sending them to a signer. This process ensures that the signer cannot learn the message's content. | ||
|
||
Together, the BBS Signature Scheme and its Blind Signature Extension offer a robust solution for privacy-preserving cryptographic systems, supporting applications in identity, authentication, and secure, anonymous transactions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CL03 | ||
|
||
The CL03 algorithm refers to the one described in the paper, [_A Signature Scheme with Efficient Protocols_](https://link.springer.com/chapter/10.1007/3-540-36413-7_20) by Jan Camenisch and Anna Lysyanskaya. | ||
This paper presents an efficient signature scheme and protocols designed for anonymous credential systems and other privacy-preserving cryptographic applications. This scheme enables signing committed values without revealing them and proving knowledge of signatures selectively, supporting use cases like anonymous verifiable credentials. The security of the scheme relies on the Strong RSA assumption. | ||
|
||
The scheme is extended to handle blocks of messages, allowing signatures on multiple attributes or claims at once. This is beneficial in scenarios requiring a compact, unified signature on a set of related information, such as multi-attribute credentials. | ||
|
||
### Preliminary Protocols | ||
1. **Commitment Scheme**: Uses a secure RSA modulus and group commitments to ensure message integrity and confidentiality. | ||
2. **Discrete-Logarithm-Based Protocols**: Protocols for verifying knowledge of discrete logarithms and proving that committed values meet certain conditions without revealing them. | ||
|
||
### Protocols for the Signature Scheme | ||
1. **Signing a Committed Value**: A secure protocol enables signing of a committed message without the signer learning the message content. This enables anonymous credential issuance. | ||
2. **Proof of Knowledge of a Signature**: Users can prove possession of a valid signature on a committed value without revealing the message. This protocol uses zero-knowledge proofs to maintain privacy. | ||
3. **Protocols for Signatures on Blocks of Messages**: The scheme supports proofs of knowledge for blocks of committed values, allowing users to disclose selectively, such as showing only specific credentials or attributes. | ||
|
||
This scheme offers practical applications in anonymous credentials and privacy-preserving systems, where verifying credentials without compromising identity or personal data is crucial. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
# Getting Started | ||
|
||
## Requirements | ||
|
||
- [Rust](https://www.rust-lang.org/) (>= 1.65) | ||
- [Cargo](https://doc.rust-lang.org/cargo/) (>= 1.65) | ||
- The ZKryptium **CL03** implementation also depends on the [Rug crate](https://crates.io/crates/rug) which depends on GMP, MPFR and MPC libraries through the low-level FFI bindings in the [gmp-mpfr-sys crate](https://crates.io/crates/gmp-mpfr-sys), which needs some setup to build; the [gmp-mpfr-sys documentation](https://docs.rs/gmp-mpfr-sys/1.6.1/gmp_mpfr_sys/index.html) has some details on usage under [GNU/Linux](https://docs.rs/gmp-mpfr-sys/1.6.1/gmp_mpfr_sys/index.html#building-on-gnulinux), [macOS](https://docs.rs/gmp-mpfr-sys/1.6.1/gmp_mpfr_sys/index.html#building-on-macos) and [Windows](https://docs.rs/gmp-mpfr-sys/1.6.1/gmp_mpfr_sys/index.html#building-on-windows). | ||
|
||
|
||
|
||
## Usage | ||
|
||
#### BBS+: | ||
|
||
```toml | ||
[dependencies] | ||
zkryptium = { version = "0.3.0", default-features = false, features = ["bbsplus"] } | ||
``` | ||
|
||
#### CL2003: | ||
- see the **requirements** above | ||
|
||
```toml | ||
[dependencies] | ||
zkryptium = { version = "0.3.0", default-features = false, features = ["cl03"] } | ||
``` | ||
|
||
## Examples | ||
|
||
Take a look at the [examples](https://github.com/Cybersecurity-LINKS/ZKryptium/tree/main/examples). | ||
|
||
You can run the example based on the [BBS+](https://identity.foundation/bbs-signature/draft-irtf-cfrg-bbs-signatures.html) Signature Scheme with: | ||
|
||
``` | ||
cargo run --example bbsplus <ciphersuite> | ||
``` | ||
|
||
#### Available Ciphersuites: | ||
- BLS12-381-SHA-256 | ||
- BLS12-381-SHAKE-256 | ||
|
||
You can run the example based on the [CL2003](https://link.springer.com/chapter/10.1007/3-540-36413-7_20) Signature Scheme with: | ||
``` | ||
cargo run --example cl03 <ciphersuite> | ||
``` | ||
#### Available Ciphersuites: | ||
- CL1024-SHA-256 | ||
|
||
|
||
## Test | ||
|
||
To test the library you can launch the test vectors with: | ||
|
||
``` | ||
cargo test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# ZKryptium | ||
|
||
[**ZKryptium**](https://github.com/Cybersecurity-LINKS/zkryptium) is a cryptographic library written in Rust which provides an implementation in accordance with: | ||
* [BBS+ Signature Scheme](./algorithms/bbs.md#bbs) | ||
* [Blind BBS Signatures](./algorithms/bbs.md#blind-bbs-signature-extension) | ||
* [CL2003 Signature Scheme](./algorithms/cl03.md#cl03) | ||
|
||
|
||
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. | ||
|
||
|
||
### Adopted by | ||
|
||
We’re proud to be adopted by companies around the world. Here are a few of the organizations leveraging our library: | ||
* [IOTA Foundation](https://github.com/iotaledger/identity.rs) | ||
* [SpruceID](https://github.com/spruceid/ssi) | ||
* [Hushmesh Inc.](https://github.com/hushmesh/mesh-infrastructure) | ||
|
||
### Future work | ||
|
||
In the future we expect to extend this library to support a new set of post-quantum secure algorithms such as [BLNS](https://eprint.iacr.org/2023/560) and [zk-STARK](https://eprint.iacr.org/2018/046). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Creating a sidebar enables you to: | ||
- create an ordered group of docs | ||
- render a sidebar for each doc of that group | ||
- provide next/previous navigation | ||
The sidebars can be generated from the filesystem, or explicitly defined here. | ||
Create as many sidebars as you want. | ||
*/ | ||
|
||
// @ts-check | ||
|
||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ | ||
const sidebars = { | ||
// By default, Docusaurus generates a sidebar from the docs folder structure | ||
zkryptiumSidebar: [{type: 'autogenerated', dirName: '.'}], | ||
|
||
// But you can create a sidebar manually | ||
/* | ||
tutorialSidebar: [ | ||
'intro', | ||
'hello', | ||
{ | ||
type: 'category', | ||
label: 'Tutorial', | ||
items: ['tutorial-basics/create-a-document'], | ||
}, | ||
], | ||
*/ | ||
}; | ||
|
||
export default sidebars; | ||
|