Expand description
Advanced commitment schemes with opening proofs.
This module provides advanced cryptographic commitment schemes beyond basic commitments:
- Trapdoor commitments: Allow commitment creator to open to different values (with trapdoor)
- Equivocal commitments: Support simulation in zero-knowledge proofs
- Extractable commitments: Enable proof-of-knowledge extraction
- Vector commitments: Commit to vectors with sublinear opening proofs
These advanced schemes are useful for:
- Zero-knowledge proof systems
- Secure multi-party computation
- Verifiable computation
- Blockchain applications
§Example - Trapdoor Commitment
use chie_crypto::advanced_commitment::TrapdoorCommitment;
// Setup with trapdoor
let (commitment, trapdoor) = TrapdoorCommitment::setup();
// Commit to a value
let value = b"original value";
let (com, opening) = commitment.commit(value);
// Can open normally
assert!(commitment.verify(&com, value, &opening));
// With trapdoor, can open to different value
let fake_value = b"different value";
let fake_opening = commitment.equivocate(&com, value, &opening, fake_value, &trapdoor);
assert!(commitment.verify(&com, fake_value, &fake_opening));Structs§
- Extractable
Com - Extractable commitment value.
- Extractable
Commitment - Extractable commitment scheme.
- Extractable
Opening - Extractable commitment opening with proof of knowledge.
- Trapdoor
- Trapdoor key (discrete log of H with respect to G).
- Trapdoor
Com - Trapdoor commitment value.
- Trapdoor
Commitment - Trapdoor commitment scheme.
- Trapdoor
Opening - Opening for a trapdoor commitment.
- Vector
Com - Vector commitment value.
- Vector
Commitment - Vector commitment scheme.
- Vector
Opening - Opening proof for a position in the vector.
Enums§
- Advanced
Commitment Error - Errors that can occur during advanced commitment operations.
Type Aliases§
- Advanced
Commitment Result - Result type for advanced commitment operations.