sdiehl / bulletproofs Goto Github PK
View Code? Open in Web Editor NEWBulletproofs are short non-interactive zero-knowledge proofs that require no trusted setup
License: BSD 3-Clause "New" or "Revised" License
Bulletproofs are short non-interactive zero-knowledge proofs that require no trusted setup
License: BSD 3-Clause "New" or "Revised" License
bulletproofs
' test suite currently fails to build on GHC 8.6.1 with the following error:
Bulletproofs/MultiRangeProof/Prover.hs:89:3: error:
• Could not deduce (Control.Monad.Fail.MonadFail m)
arising from a do statement
with the failable pattern ‘[t1Blinding, t2Blinding]’
from the context: (AsInteger f, Eq f, Field f, Show f,
MonadRandom m)
bound by the type signature for:
generateProofUnsafe :: forall f (m :: * -> *).
(AsInteger f, Eq f, Field f, Show f, MonadRandom m) =>
Integer -> [(Integer, Integer)] -> m (RangeProof f)
at Bulletproofs/MultiRangeProof/Prover.hs:(54,1)-(60,21)
Possible fix:
add (Control.Monad.Fail.MonadFail m) to the context of
the type signature for:
generateProofUnsafe :: forall f (m :: * -> *).
(AsInteger f, Eq f, Field f, Show f, MonadRandom m) =>
Integer -> [(Integer, Integer)] -> m (RangeProof f)
• In a stmt of a 'do' block:
[t1Blinding, t2Blinding] <- replicateM
2 ((fromInteger :: Integer -> f) <$> generateMax q)
In the expression:
do let n = logBase2 upperBound
m = fromIntegral $ length vsAndvBlindings
....
let aL = reversedEncodeBitMulti n vsF
aR = complementaryVector aL
(sL, sR) <- chooseBlindingVectors nm
[aBlinding, sBlinding] <- replicateM
2 ((fromInteger :: Integer -> f) <$> generateMax q)
....
In an equation for ‘generateProofUnsafe’:
generateProofUnsafe upperBound vsAndvBlindings
= do let n = ...
....
let aL = ...
....
(sL, sR) <- chooseBlindingVectors nm
....
|
89 | [t1Blinding, t2Blinding]
| ^^^^^^^^^^^^^^^^^^^^^^^^...
https://blog.trailofbits.com/2022/04/13/part-1-coordinated-disclosure-of-vulnerabilities-affecting-girault-bulletproofs-and-plonk/ claims this implementation is affected.
They say they were not able to get in contact Adjoint Inc.
So filing an issue seems in order.
I believe it should be that v is in the range of [0, 2^n), not [0, n).
Compare with this diagram: https://camo.githubusercontent.com/28157e79817085bd5ba6ad81acf962948cb8129b8cf66c369a255def50914681/68747470733a2f2f646f632e64616c656b2e72732f6173736574732f62756c6c657470726f6f66732d72616e676570726f6f662e706e67
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.