Module bulletproof

Module bulletproof 

Source
Expand description

Bulletproofs for efficient range proofs.

This module provides Bulletproofs, a zero-knowledge proof system for range proofs with logarithmic proof size. Unlike basic range proofs, Bulletproofs can aggregate multiple range proofs into a single proof with better efficiency.

§Features

  • Logarithmic proof size O(log n) instead of linear
  • No trusted setup required
  • Aggregation of multiple range proofs
  • Based on Ristretto group for proper homomorphic properties

§Use Cases in CHIE Protocol

  • Confidential bandwidth transaction amounts
  • Privacy-preserving quota verification
  • Efficient batch verification of multiple proofs

§Example

use chie_crypto::bulletproof::{BulletproofParams, prove_range, verify_range};

// Setup parameters for 64-bit range proofs
let params = BulletproofParams::new(64);

// Prove that a value is in range [0, 2^64)
let value = 12345u64;
let (commitment, proof) = prove_range(&params, value).unwrap();

// Verify the proof
assert!(verify_range(&params, &commitment, &proof).is_ok());

Modules§

serde_ristretto
serde_ristretto_vec
serde_scalar
serde_scalar_vec

Structs§

AggregatedBulletproof
Aggregated Bulletproof for multiple range proofs.
BulletproofCommitment
A Pedersen commitment to a value with a blinding factor.
BulletproofParams
Parameters for Bulletproof range proofs.
BulletproofRangeProof
A Bulletproof range proof.

Enums§

BulletproofError
Bulletproof-specific errors.

Functions§

prove_range
Prove that a value is within the range [0, 2^bit_length).
prove_range_aggregated
Aggregate multiple range proofs into a single proof.
verify_aggregated
Verify an aggregated Bulletproof.
verify_range
Verify a Bulletproof range proof.

Type Aliases§

BulletproofResult