sigma_protocols/lib.rs
1//! # SIGMA Proofs
2//!
3//! A Rust implementation of SIGMA (Σ) zero-knowledge proof protocols and the Fiat-Shamir transform.
4//!
5//! This library implements the specifications from:
6//! - [draft-irtf-cfrg-sigma-protocols](https://datatracker.ietf.org/doc/draft-irtf-cfrg-sigma-protocols/)
7//! - [draft-irtf-cfrg-fiat-shamir](https://datatracker.ietf.org/doc/draft-irtf-cfrg-fiat-shamir/)
8//!
9//! ## Features
10//!
11//! - **Schnorr Proofs**: Prove knowledge of discrete logarithms
12//! - **DLEQ Proofs**: Prove equality of discrete logarithms
13//! - **Pedersen Commitment Proofs**: Prove knowledge of commitment openings
14//! - **Fiat-Shamir Transform**: Convert interactive proofs to non-interactive
15//!
16//! ## Example
17//!
18//! ```ignore
19//! use sigma_protocols::protocols::schnorr::{SchnorrProof, SchnorrStatement, SchnorrWitness};
20//! use sigma_protocols::sigma::SigmaProtocol;
21//!
22//! // Create a proof of knowledge of discrete logarithm
23//! let statement = SchnorrStatement { public_key };
24//! let witness = SchnorrWitness { secret_key };
25//! let (commitment, state) = SchnorrProof::prover_commit(&statement, &witness);
26//! ```
27
28pub mod error;
29pub mod fiat_shamir;
30pub mod protocols;
31pub mod sigma;
32pub mod transcript;
33mod utils;
34
35pub use error::{Error, Result};
36pub use fiat_shamir::FiatShamirTransform;
37pub use sigma::{Challenge, Commitment, Response, SigmaProtocol};
38pub use transcript::Transcript;