bulletproofs-0.1.0

Safe HaskellNone
LanguageHaskell2010

Bulletproofs.RangeProof.Prover

Synopsis

Documentation

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

computeLRPolys :: Integer -> [Fq] -> [Fq] -> [Fq] -> [Fq] -> Fq -> Fq -> LRPolys Source #

Compute l and r polynomials to prove knowledge of aL, aR without revealing them. We achieve it by transferring the vectors l, r. The two terms of the dot product above are set as the constant term, while sL, sR are the coefficient of x^1 , in the following two linear polynomials, which are combined into a quadratic in x: l(x) = (a L − z1 n ) + s L x r(x) = y^n ◦ (aR + z * 1^n + sR * x) + z^2 * 2^n

computeTPoly :: LRPolys -> TPoly Source #

Compute polynomial t from polynomial r t(x) = l(x) · r(x) = t0 + t1 * x + t2 * x^2