pedersen-commitment-0.2.0: An implementation of Pedersen commitment schemes

Safe HaskellNone
LanguageHaskell2010

VectorPedersen

Synopsis

Documentation

dot :: Curve -> [Integer] -> [Point] -> Point Source #

Dot product between a vector of scalars and a vector of ECC.Points

mkGs :: Curve -> [Point] Source #

Generate vector of generators in a deterministic way from the curve generator g by applying H(encode(g) || i) where H is a secure hash function

scalarGenerateN :: MonadRandom m => Curve -> Word8 -> m [Integer] Source #

Generate a commit value which is a vector of N elements

ecCommit :: MonadRandom m => [Integer] -> ECCommitParams -> m ECPedersen Source #

Commitment function. The value we commit to is now a vector

ecOpen :: ECCommitParams -> ECCommitment -> ECReveal -> Bool Source #

Open commitment to check its validity

ecVerifyAddCommitments :: ECCommitParams -> ECPedersen -> ECPedersen -> ECPedersen Source #

Verify the addition of two EC Vector Pedersen Commitments by constructing the new Pedersen commitment on the uncommitted values.

vecSum :: Curve -> [Integer] -> [Integer] -> [Integer] Source #

Sum of vectors in a curve

ecAddVector :: ECCommitParams -> ECCommitment -> [Integer] -> ECCommitment Source #

Add a vector to the committed value such that C'= C + wG

data ECReveal Source #

ecRevealVal is a vector of scalars

Constructors

ECReveal 

data ECCommitParams Source #

Constructors

ECCommitParams 

Fields