bulletproofs-0.2.0

Safe HaskellNone
LanguageHaskell2010

Bulletproofs.RangeProof

Synopsis

Documentation

data RangeProof Source #

Constructors

RangeProof 

Fields

  • tBlinding :: Fq

    Blinding factor of the T1 and T2 commitments, combined into the form required to make the committed version of the x-polynomial add up

  • mu :: Fq

    Blinding factor required for the Verifier to verify commitments A, S

  • t :: Fq

    Dot product of vectors l and r that prove knowledge of the value in range t = t(x) = l(x) · r(x)

  • aCommit :: Point

    Commitment to aL and aR, where aL and aR are vectors of bits such that aL · 2^n = v and aR = aL − 1^n . A = α · H + aL · G + aR · H

  • sCommit :: Point

    Commitment to new vectors sL, sR, created at random by the Prover

  • t1Commit :: Point

    Pedersen commitment to coefficient t1

  • t2Commit :: Point

    Pedersen commitment to coefficient t2

  • productProof :: InnerProductProof

    Inner product argument to prove that a commitment P has vectors l, r ∈ Z^n for which P = l · G + r · H + ( l, r ) · U

data RangeProofError Source #

Constructors

UpperBoundTooLarge Integer

The upper bound of the range is too large

ValueNotInRange Integer

Value is not within the range required

NNotPowerOf2 Integer

Dimension n is required to be a power of 2

generateProof Source #

Arguments

:: MonadRandom m 
=> Integer

Upper bound of the range we want to prove

-> Integer

Value we want to prove in range

-> Integer

Blinding factor

-> ExceptT RangeProofError m RangeProof 

Prove that a value lies in a specific range

generateProofUnsafe Source #

Arguments

:: MonadRandom m 
=> Integer

Upper bound of the range we want to prove

-> Integer

Value we want to prove in range

-> Integer

Blinding factor

-> m RangeProof 

Generate range proof from valid inputs

verifyProof Source #

Arguments

:: Integer

Range upper bound

-> Point

Commitment of an in-range value

-> RangeProof

Proof that a secret committed value lies in a certain interval

-> Bool 

Verify that a commitment was computed from a value in a given range