Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RangeProof f p = RangeProof {
- tBlinding :: f
- mu :: f
- t :: f
- aCommit :: p
- sCommit :: p
- t1Commit :: p
- t2Commit :: p
- productProof :: InnerProductProof f p
- data RangeProofError f
- generateProof :: MonadRandom m => Integer -> (Fr, Fr) -> ExceptT (RangeProofError Fr) m (RangeProof Fr PA)
- generateProofUnsafe :: MonadRandom m => Integer -> (Fr, Fr) -> m (RangeProof Fr PA)
- verifyProof :: Integer -> PA -> RangeProof Fr PA -> Bool
Documentation
data RangeProof f p Source #
RangeProof | |
|
Instances
data RangeProofError f Source #
UpperBoundTooLarge Integer | The upper bound of the range is too large |
ValueNotInRange f | Value is not within the range required |
ValuesNotInRange [f] | Values are not within the range required |
NNotPowerOf2 Integer | Dimension n is required to be a power of 2 |
Instances
:: MonadRandom m | |
=> Integer | Upper bound of the range we want to prove |
-> (Fr, Fr) | Values we want to prove in range and their blinding factors |
-> ExceptT (RangeProofError Fr) m (RangeProof Fr PA) |
Prove that a value lies in a specific range
:: MonadRandom m | |
=> Integer | Upper bound of the range we want to prove |
-> (Fr, Fr) | Values we want to prove in range and their blinding factors |
-> m (RangeProof Fr PA) |
Generate range proof from valid inputs