Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commitment ¶
Commitment is the commitment to the randomness used in the range proof
type EqualityProofs ¶
type EqualityProofs struct { // Type of tokens Type *mathlib.Zr // Value is an array of elements in Zr such that Value[i] is the value of the i^th token Value []*mathlib.Zr // TokenBlindingFactor is an array of elements in Zr such that // TokenBlindingFactor[i] is the blinding factor of the i^th token TokenBlindingFactor []*mathlib.Zr // CommitmentBlindingFactor is an array of elements in Zr such that // CommitmentBlindingFactor[i] is the blinding factor of the i^th commitment CommitmentBlindingFactor []*mathlib.Zr }
EqualityProofs show that for each token in an array of tokens, token_value = \sum_{i=0}^exponent v_i base^i
type MembershipProof ¶
type MembershipProof struct { // Commitments is an array of Pedersen commitments Commitments []*mathlib.G1 // SignatureProofs is ZK proof that each committed value is signed // using Pointcheval-Sanders signature SignatureProofs []*sigproof.MembershipProof }
MembershipProof shows that committed values 0=<v_i =<max_value, for 1 =< i =< n
type Prover ¶
type Prover struct { *Verifier // Signatures are an array of Pointcheval-Sanders signatures Signatures []*pssign.Signature // contains filtered or unexported fields }
Prover produces a proof that show that values of tokens is < max_value
type RangeProof ¶
type RangeProof struct { // Challenge used to compute the proof Challenge *mathlib.Zr // EqualityProofs show that for each token in an array of tokens, // token_value = \sum_{i=0}^exponent v_i base^i EqualityProofs *EqualityProofs // MembershipProofs show that 0=<v_i =<base-1 MembershipProofs []*MembershipProof }
RangeProof is a range proof that show that an array of token have value < max_value max_value = base^exponent - 1 token_value = \sum_{i=0}^exponent v_i base^i and 0=<v_i =<base-1
type Verifier ¶
type Verifier struct { // Tokens is an array of TokenData - commitment to (value, type) Tokens []*mathlib.G1 // max_value = Base^Exponent Base uint64 Exponent int // PedersenParams corresponds to the Pedersen commitment generators PedersenParams []*mathlib.G1 // Q is a random G2 generator Q *mathlib.G2 // P is a random G1 generator P *mathlib.G1 // PK is the public key of Pointcheval-Sanders signature PK []*mathlib.G2 // Curve is an elliptic curve Curve *mathlib.Curve }
Verifier checks the validity of range proofs produced by Prover
Click to show internal directories.
Click to hide internal directories.