1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//!
//! # Zero-Knowledge Proofs
//!
//! Basic zero-knowledge proof primitives for LatticeArc. This module provides
//! foundational ZKP building blocks that can be used for authentication,
//! verification, and simple proof systems.
//!
//! ## Features
//!
//! - **Schnorr Proofs**: Prove knowledge of a discrete logarithm
//! - **Pedersen Commitments**: Hiding and binding commitments
//! - **Sigma Protocols**: Basic interactive proofs (Fiat-Shamir transformed)
//! - **Hash Commitments**: Simple hash-based commitments
//!
//! ## Example
//!
//! ```
//! use latticearc::zkp::schnorr::{SchnorrProver, SchnorrVerifier};
//!
//! // Prover demonstrates knowledge of secret key
//! let (prover, public_key) = SchnorrProver::new().unwrap();
//! let proof = prover.prove(b"challenge context").unwrap();
//!
//! // Verifier checks proof without learning the secret
//! let verifier = SchnorrVerifier::new(public_key);
//! assert!(verifier.verify(&proof, b"challenge context").unwrap());
//! ```
//!
//! ## Security
//!
//! These are basic primitives suitable for:
//! - Authentication (prove identity without revealing secrets)
//! - Simple commitments (commit to a value, reveal later)
//! - Basic sigma protocols
//!
//! For advanced ZKP (zk-SNARKs, zk-STARKs, complex circuits), external
//! crates are recommended.
/// Commitment schemes (Pedersen, hash-based).
/// Error types for zero-knowledge proof operations.
/// Schnorr proof system for discrete-log knowledge proofs.
/// Sigma protocols and Fiat-Shamir transform.
pub use ;
pub use ;
pub use ;
pub use ;