Module advanced_commitment

Module advanced_commitment 

Source
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§

ExtractableCom
Extractable commitment value.
ExtractableCommitment
Extractable commitment scheme.
ExtractableOpening
Extractable commitment opening with proof of knowledge.
Trapdoor
Trapdoor key (discrete log of H with respect to G).
TrapdoorCom
Trapdoor commitment value.
TrapdoorCommitment
Trapdoor commitment scheme.
TrapdoorOpening
Opening for a trapdoor commitment.
VectorCom
Vector commitment value.
VectorCommitment
Vector commitment scheme.
VectorOpening
Opening proof for a position in the vector.

Enums§

AdvancedCommitmentError
Errors that can occur during advanced commitment operations.

Type Aliases§

AdvancedCommitmentResult
Result type for advanced commitment operations.