Expand description
§Σ-rs
A Rust library for building zero-knowledge proofs using Sigma protocols (Σ-protocols). Create proofs that demonstrate knowledge of secret information without revealing it.
§What are Sigma Protocols?
Sigma protocols are interactive cryptographic protocols that allow a prover to convince a verifier they know a secret (like a private key) without revealing the secret itself. They follow a simple three-step pattern: commitment, challenge, response.
§Key Features
- Composable: Combine multiple proofs into compound statements
- Generic: Works with any cryptographic group supporting the required operations
- Flexible Hashing: Multiple hash function backends for different use cases
§Basic Usage
The library provides building blocks for creating zero-knowledge proofs:
- Define your mathematical relation using
LinearRelation
- Create a Sigma protocol with
schnorr_protocol::SchnorrProof
- Convert to non-interactive using
fiat_shamir::NISigmaProtocol
- Generate and verify proofs using the protocol interface
§Core Components
traits::SigmaProtocol
: The fundamental three-move protocol interfacelinear_relation::LinearRelation
: Express mathematical relations over groupsfiat_shamir::NISigmaProtocol
: Convert interactive proofs to standalone proofscomposition::Protocol
: Combine multiple proofs togethercodec
: Hash function backends for proof generation
Re-exports§
pub use fiat_shamir::NISigmaProtocol;
pub use linear_relation::LinearRelation;
Modules§
- codec
- Encoding and decoding utilities for Fiat-Shamir and group operations.
- composition
- Implementation of a structure
Protocol
aimed at generalizing theSchnorrProof
using the compositions of the latter via AND and OR links - duplex_
sponge - Duplex Sponge Interface
- errors
- Error: Error Types for Zero-Knowledge Proofs.
- fiat_
shamir - Fiat-Shamir transformation for
SigmaProtocol
s. - linear_
relation - Linear Maps and Relations Handling.
- schnorr_
protocol - Implementation of the generic Schnorr Sigma Protocol over a
Group
. - serialization
- Serialization and deserialization utilities for group elements and scalars.
- traits
SigmaProtocol
Trait.