bulletproofs-1.1.0

Safe HaskellNone
LanguageHaskell2010

Bulletproofs.ArithmeticCircuit.Internal

Synopsis

Documentation

data ArithCircuitProof f p Source #

Constructors

ArithCircuitProof 

Fields

  • tBlinding :: f

    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 :: f

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

  • t :: f

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

  • aiCommit :: p

    Commitment to vectors aL and aR

  • aoCommit :: p

    Commitment to vectors aO

  • sCommit :: p

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

  • tCommits :: [p]

    Commitments to t1, t3, t4, t5, t6

  • productProof :: InnerProductProof f p
     
Instances
(Eq f, Eq p) => Eq (ArithCircuitProof f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

(Show f, Show p) => Show (ArithCircuitProof f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Generic (ArithCircuitProof f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Associated Types

type Rep (ArithCircuitProof f p) :: Type -> Type #

(NFData f, NFData p) => NFData (ArithCircuitProof f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

rnf :: ArithCircuitProof f p -> () #

type Rep (ArithCircuitProof f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

data ArithCircuit f Source #

Constructors

ArithCircuit 

Fields

  • weights :: GateWeights f

    Weights for vectors of left and right inputs and for vector of outputs

  • commitmentWeights :: [[f]]

    Weigths for a commitments V of rank m

  • cs :: [f]

    Vector of constants of size Q

Instances
Eq f => Eq (ArithCircuit f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Show f => Show (ArithCircuit f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Generic (ArithCircuit f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Associated Types

type Rep (ArithCircuit f) :: Type -> Type #

Methods

from :: ArithCircuit f -> Rep (ArithCircuit f) x #

to :: Rep (ArithCircuit f) x -> ArithCircuit f #

Arbitrary (ArithCircuit Fr) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

NFData f => NFData (ArithCircuit f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

rnf :: ArithCircuit f -> () #

type Rep (ArithCircuit f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

type Rep (ArithCircuit f) = D1 (MetaData "ArithCircuit" "Bulletproofs.ArithmeticCircuit.Internal" "bulletproofs-1.1.0-FP4S76deUzfBfGRiiGUv0Q" False) (C1 (MetaCons "ArithCircuit" PrefixI True) (S1 (MetaSel (Just "weights") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (GateWeights f)) :*: (S1 (MetaSel (Just "commitmentWeights") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [[f]]) :*: S1 (MetaSel (Just "cs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f]))))

data GateWeights f Source #

Constructors

GateWeights 

Fields

  • wL :: [[f]]

    WL ∈ F^(Q x n)

  • wR :: [[f]]

    WR ∈ F^(Q x n)

  • wO :: [[f]]

    WO ∈ F^(Q x n)

Instances
Eq f => Eq (GateWeights f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Show f => Show (GateWeights f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Generic (GateWeights f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Associated Types

type Rep (GateWeights f) :: Type -> Type #

Methods

from :: GateWeights f -> Rep (GateWeights f) x #

to :: Rep (GateWeights f) x -> GateWeights f #

NFData f => NFData (GateWeights f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

rnf :: GateWeights f -> () #

type Rep (GateWeights f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

type Rep (GateWeights f) = D1 (MetaData "GateWeights" "Bulletproofs.ArithmeticCircuit.Internal" "bulletproofs-1.1.0-FP4S76deUzfBfGRiiGUv0Q" False) (C1 (MetaCons "GateWeights" PrefixI True) (S1 (MetaSel (Just "wL") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [[f]]) :*: (S1 (MetaSel (Just "wR") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [[f]]) :*: S1 (MetaSel (Just "wO") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [[f]]))))

data ArithWitness f p Source #

Constructors

ArithWitness 

Fields

Instances
(Eq p, Eq f) => Eq (ArithWitness f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

(==) :: ArithWitness f p -> ArithWitness f p -> Bool #

(/=) :: ArithWitness f p -> ArithWitness f p -> Bool #

(Show p, Show f) => Show (ArithWitness f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Generic (ArithWitness f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Associated Types

type Rep (ArithWitness f p) :: Type -> Type #

Methods

from :: ArithWitness f p -> Rep (ArithWitness f p) x #

to :: Rep (ArithWitness f p) x -> ArithWitness f p #

Arbitrary (ArithWitness Fr PA) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

(NFData p, NFData f) => NFData (ArithWitness f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

rnf :: ArithWitness f p -> () #

type Rep (ArithWitness f p) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

type Rep (ArithWitness f p) = D1 (MetaData "ArithWitness" "Bulletproofs.ArithmeticCircuit.Internal" "bulletproofs-1.1.0-FP4S76deUzfBfGRiiGUv0Q" False) (C1 (MetaCons "ArithWitness" PrefixI True) (S1 (MetaSel (Just "assignment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Assignment f)) :*: (S1 (MetaSel (Just "commitments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [p]) :*: S1 (MetaSel (Just "commitBlinders") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f]))))

data Assignment f Source #

Constructors

Assignment 

Fields

  • aL :: [f]

    aL ∈ F^n. Vector of left inputs of each multiplication gate

  • aR :: [f]

    aR ∈ F^n. Vector of right inputs of each multiplication gate

  • aO :: [f]

    aO ∈ F^n. Vector of outputs of each multiplication gate

Instances
Eq f => Eq (Assignment f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

(==) :: Assignment f -> Assignment f -> Bool #

(/=) :: Assignment f -> Assignment f -> Bool #

Show f => Show (Assignment f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Generic (Assignment f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Associated Types

type Rep (Assignment f) :: Type -> Type #

Methods

from :: Assignment f -> Rep (Assignment f) x #

to :: Rep (Assignment f) x -> Assignment f #

Arbitrary (Assignment Fr) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

NFData f => NFData (Assignment f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

Methods

rnf :: Assignment f -> () #

type Rep (Assignment f) Source # 
Instance details

Defined in Bulletproofs.ArithmeticCircuit.Internal

type Rep (Assignment f) = D1 (MetaData "Assignment" "Bulletproofs.ArithmeticCircuit.Internal" "bulletproofs-1.1.0-FP4S76deUzfBfGRiiGUv0Q" False) (C1 (MetaCons "Assignment" PrefixI True) (S1 (MetaSel (Just "aL") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f]) :*: (S1 (MetaSel (Just "aR") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f]) :*: S1 (MetaSel (Just "aO") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f]))))

padCircuit :: Num f => ArithCircuit f -> ArithCircuit f Source #

Pad circuit weights to make n be a power of 2, which is required to compute the inner product proof

padAssignment :: Num f => Assignment f -> Assignment f Source #

Pad assignment vectors to make their length n be a power of 2, which is required to compute the inner product proof

delta :: Integer -> Fr -> [Fr] -> [Fr] -> Fr Source #

commitBitVector :: Fr -> [Fr] -> [Fr] -> PA Source #

shamirGxGxG :: PA -> PA -> PA -> Fr Source #

evaluatePolynomial :: Num f => Integer -> [[f]] -> f -> [f] Source #

multiplyPoly :: Num n => [[n]] -> [[n]] -> [n] Source #

vectorMatrixProduct :: Num f => [f] -> [[f]] -> [f] Source #

vectorMatrixProductT :: Num f => [f] -> [[f]] -> [f] Source #

matrixVectorProduct :: Num f => [[f]] -> [f] -> [f] Source #

powerMatrix :: Num f => [[f]] -> Integer -> [[f]] Source #

matrixProduct :: Num a => [[a]] -> [[a]] -> [[a]] Source #

insertAt :: Int -> a -> [a] -> [a] Source #

genIdenMatrix :: Num f => Integer -> [[f]] Source #

genZeroMatrix :: Num f => Integer -> Integer -> [[f]] Source #

gaussianReduce :: [[Fr]] -> [[Fr]] Source #