Module pedersen

Module pedersen 

Source
Expand description

Pedersen commitments for privacy-preserving bandwidth proof aggregation.

This module provides Pedersen commitments with homomorphic properties, enabling privacy-preserving aggregation of bandwidth proofs in the CHIE protocol.

§Features

  • Homomorphic commitments: C(a) + C(b) = C(a+b)
  • Privacy-preserving bandwidth aggregation
  • Commitment verification without revealing values
  • Batch commitment operations

§Example

use chie_crypto::pedersen::{PedersenCommitment, commit, verify};

// Commit to bandwidth values
let (commitment1, opening1) = commit(100);  // 100 bytes
let (commitment2, opening2) = commit(200);  // 200 bytes

// Aggregate commitments
let aggregated = commitment1.add(&commitment2);
let aggregated_opening = opening1.add(&opening2);

// Verify aggregated commitment (300 bytes total)
assert!(verify(&aggregated, 300, &aggregated_opening));

Structs§

PedersenCommitment
Pedersen commitment (mG + rH).
PedersenOpening
Opening information for a Pedersen commitment.

Enums§

PedersenError
Errors that can occur with Pedersen commitments.

Functions§

commit
Commit to a value using Pedersen commitment.
commit_with_blinding
Commit to a value with a specific blinding factor.
verify
Verify a Pedersen commitment.
verify_batch
Verify a batch of commitments.

Type Aliases§

PedersenResult