packages feed

bulletproofs 0.2.1 → 0.3.0

raw patch · 5 files changed

+9/−13 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

- Bulletproofs.ArithmeticCircuit: generateProof :: forall f m. (MonadRandom m, MonadFail m, AsInteger f, Field f, Show f, Eq f) => ArithCircuit f -> ArithWitness f -> m (ArithCircuitProof f)
+ Bulletproofs.ArithmeticCircuit: generateProof :: forall f m. (MonadRandom m, AsInteger f, Field f, Show f, Eq f) => ArithCircuit f -> ArithWitness f -> m (ArithCircuitProof f)
- Bulletproofs.ArithmeticCircuit.Internal: commitBitVector :: AsInteger f => f -> [f] -> [f] -> Point
+ Bulletproofs.ArithmeticCircuit.Internal: commitBitVector :: (AsInteger f) => f -> [f] -> [f] -> Point
- Bulletproofs.ArithmeticCircuit.Internal: evaluatePolynomial :: Num f => Integer -> [[f]] -> f -> [f]
+ Bulletproofs.ArithmeticCircuit.Internal: evaluatePolynomial :: (Num f) => Integer -> [[f]] -> f -> [f]
- Bulletproofs.ArithmeticCircuit.Internal: genIdenMatrix :: Num f => Integer -> [[f]]
+ Bulletproofs.ArithmeticCircuit.Internal: genIdenMatrix :: (Num f) => Integer -> [[f]]
- Bulletproofs.ArithmeticCircuit.Internal: genZeroMatrix :: Num f => Integer -> Integer -> [[f]]
+ Bulletproofs.ArithmeticCircuit.Internal: genZeroMatrix :: (Num f) => Integer -> Integer -> [[f]]
- Bulletproofs.ArithmeticCircuit.Internal: generateGateWeights :: (MonadRandom m, Num f, MonadFail m) => Integer -> Integer -> m (GateWeights f)
+ Bulletproofs.ArithmeticCircuit.Internal: generateGateWeights :: (MonadRandom m, Num f) => Integer -> Integer -> m (GateWeights f)
- Bulletproofs.ArithmeticCircuit.Internal: matrixVectorProduct :: Num f => [[f]] -> [f] -> [f]
+ Bulletproofs.ArithmeticCircuit.Internal: matrixVectorProduct :: (Num f) => [[f]] -> [f] -> [f]
- Bulletproofs.ArithmeticCircuit.Internal: powerMatrix :: Num f => [[f]] -> Integer -> [[f]]
+ Bulletproofs.ArithmeticCircuit.Internal: powerMatrix :: (Num f) => [[f]] -> Integer -> [[f]]
- Bulletproofs.ArithmeticCircuit.Internal: vectorMatrixProduct :: Num f => [f] -> [[f]] -> [f]
+ Bulletproofs.ArithmeticCircuit.Internal: vectorMatrixProduct :: (Num f) => [f] -> [[f]] -> [f]
- Bulletproofs.ArithmeticCircuit.Internal: vectorMatrixProductT :: Num f => [f] -> [[f]] -> [f]
+ Bulletproofs.ArithmeticCircuit.Internal: vectorMatrixProductT :: (Num f) => [f] -> [[f]] -> [f]
- Bulletproofs.ArithmeticCircuit.Prover: generateProof :: forall f m. (MonadRandom m, MonadFail m, AsInteger f, Field f, Show f, Eq f) => ArithCircuit f -> ArithWitness f -> m (ArithCircuitProof f)
+ Bulletproofs.ArithmeticCircuit.Prover: generateProof :: forall f m. (MonadRandom m, AsInteger f, Field f, Show f, Eq f) => ArithCircuit f -> ArithWitness f -> m (ArithCircuitProof f)
- Bulletproofs.Fq: euclidean :: Integral a => a -> a -> a
+ Bulletproofs.Fq: euclidean :: (Integral a) => a -> a -> a
- Bulletproofs.Fq: inv' :: Integral a => a -> a -> (a, a)
+ Bulletproofs.Fq: inv' :: (Integral a) => a -> a -> (a, a)
- Bulletproofs.MultiRangeProof: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> [(Integer, Integer)] -> ExceptT RangeProofError m (RangeProof f)
+ Bulletproofs.MultiRangeProof: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> [(Integer, Integer)] -> ExceptT RangeProofError m (RangeProof f)
- Bulletproofs.MultiRangeProof: generateProofUnsafe :: forall f m. (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> [(Integer, Integer)] -> m (RangeProof f)
+ Bulletproofs.MultiRangeProof: generateProofUnsafe :: forall f m. (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> [(Integer, Integer)] -> m (RangeProof f)
- Bulletproofs.MultiRangeProof.Prover: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> [(Integer, Integer)] -> ExceptT RangeProofError m (RangeProof f)
+ Bulletproofs.MultiRangeProof.Prover: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> [(Integer, Integer)] -> ExceptT RangeProofError m (RangeProof f)
- Bulletproofs.MultiRangeProof.Prover: generateProofUnsafe :: forall f m. (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> [(Integer, Integer)] -> m (RangeProof f)
+ Bulletproofs.MultiRangeProof.Prover: generateProofUnsafe :: forall f m. (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> [(Integer, Integer)] -> m (RangeProof f)
- Bulletproofs.RangeProof: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> (Integer, Integer) -> ExceptT RangeProofError m (RangeProof f)
+ Bulletproofs.RangeProof: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> (Integer, Integer) -> ExceptT RangeProofError m (RangeProof f)
- Bulletproofs.RangeProof: generateProofUnsafe :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> (Integer, Integer) -> m (RangeProof f)
+ Bulletproofs.RangeProof: generateProofUnsafe :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> (Integer, Integer) -> m (RangeProof f)
- Bulletproofs.RangeProof.Prover: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> (Integer, Integer) -> ExceptT RangeProofError m (RangeProof f)
+ Bulletproofs.RangeProof.Prover: generateProof :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> (Integer, Integer) -> ExceptT RangeProofError m (RangeProof f)
- Bulletproofs.RangeProof.Prover: generateProofUnsafe :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m) => Integer -> (Integer, Integer) -> m (RangeProof f)
+ Bulletproofs.RangeProof.Prover: generateProofUnsafe :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m) => Integer -> (Integer, Integer) -> m (RangeProof f)

Files

Bulletproofs/ArithmeticCircuit/Internal.hs view
@@ -4,7 +4,6 @@ module Bulletproofs.ArithmeticCircuit.Internal where  import Protolude hiding (head)-import Control.Monad.Fail import Data.List (head) import qualified Data.List as List import qualified Data.Map as Map@@ -186,7 +185,7 @@   | lConstraints < m = panic "Number of constraints must be bigger than m"   | otherwise = shuffleM (genIdenMatrix m ++ genZeroMatrix (lConstraints - m) m) -generateGateWeights :: (Crypto.MonadRandom m, Num f, MonadFail m) => Integer -> Integer -> m (GateWeights f)+generateGateWeights :: (Crypto.MonadRandom m, Num f) => Integer -> Integer -> m (GateWeights f) generateGateWeights lConstraints n = do   [wL, wR, wO] <- replicateM 3 ((\i -> insertAt (fromIntegral i) (oneVector n) (replicate (fromIntegral lConstraints - 1) (zeroVector n))) <$> generateMax (fromIntegral lConstraints))   pure $ GateWeights wL wR wO
Bulletproofs/ArithmeticCircuit/Prover.hs view
@@ -3,7 +3,6 @@  import Protolude -import Control.Monad.Fail import Crypto.Random.Types (MonadRandom(..)) import Crypto.Number.Generate (generateMax) import qualified Crypto.PubKey.ECC.Prim as Crypto@@ -18,7 +17,7 @@ -- for an arithmetic circuit with a valid witness generateProof   :: forall f m-   . (MonadRandom m, MonadFail m, AsInteger f, Field f, Show f, Eq f)+   . (MonadRandom m, AsInteger f, Field f, Show f, Eq f)   => ArithCircuit f   -> ArithWitness f   -> m (ArithCircuitProof f)
Bulletproofs/MultiRangeProof/Prover.hs view
@@ -7,7 +7,6 @@  import Protolude -import Control.Monad.Fail import Crypto.Random.Types (MonadRandom(..)) import Crypto.Number.Generate (generateMax) import qualified Crypto.PubKey.ECC.Generate as Crypto@@ -21,9 +20,9 @@ import Bulletproofs.InnerProductProof as IPP hiding (generateProof) import qualified Bulletproofs.InnerProductProof as IPP --- | Prove that a list of values lies in a specific range+-- | Prove that a list of values lie in a specific range generateProof-  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m)+  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m)   => Integer                -- ^ Upper bound of the range we want to prove   -> [(Integer, Integer)]   -- ^ Values we want to prove in range and their blinding factors@@ -54,7 +53,7 @@ -- | Generate range proof from valid inputs generateProofUnsafe   :: forall f m-   . (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m)+   . (AsInteger f, Eq f, Field f, Show f, MonadRandom m)   => Integer    -- ^ Upper bound of the range we want to prove   -> [(Integer, Integer)]   -- ^ Values we want to prove in range and their blinding factors
Bulletproofs/RangeProof/Prover.hs view
@@ -5,7 +5,6 @@  import Protolude -import Control.Monad.Fail import Crypto.Random.Types (MonadRandom(..))  import Bulletproofs.Utils (AsInteger, Field)@@ -14,7 +13,7 @@  -- | Prove that a value lies in a specific range generateProof-  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m)+  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m)   => Integer                -- ^ Upper bound of the range we want to prove   -> (Integer, Integer)   -- ^ Values we want to prove in range and their blinding factors@@ -24,7 +23,7 @@  -- | Generate range proof from valid inputs generateProofUnsafe-  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m, MonadFail m)+  :: (AsInteger f, Eq f, Field f, Show f, MonadRandom m)   => Integer    -- ^ Upper bound of the range we want to prove   -> (Integer, Integer)   -- ^ Values we want to prove in range and their blinding factors
bulletproofs.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 001d69dda0cfa16ecf909cb395bf12816dd1e053a263be2983d7dbe569e9a5a0+-- hash: 3cc8d96dc71be213e360a7402cd170482c94bcd862ac5cfeb4687ac2726aa53f  name:           bulletproofs-version:        0.2.1+version:        0.3.0 description:    Please see the README on GitHub at <https://github.com/adjoint-io/bulletproofs#readme> category:       Cryptography homepage:       https://github.com/adjoint-io/bulletproofs#readme