Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCommitment ¶
func GenerateCommitment(params *Params, m *Message) (*Commitment, *Decommitment, error)
GenerateCommitment creates a commitment for some value m
func VerifyCommitment ¶
func VerifyCommitment(params *Params, commitment *Commitment, m *Message, r *Decommitment) (bool, error)
VerifyCommitment checks if a commitment was for some message m under the decommitment r
Types ¶
type Commitment ¶
type Commitment = curve25519.PointXY
Commitment consists of elliptic curve point that serves as a commitment to a message
func GenerateCommitmentFixedR ¶
func GenerateCommitmentFixedR(params *Params, m *Message, r *Decommitment) (*Commitment, error)
GenerateCommitmentFixedR creates a commitment for some value m with a fixed decommitment r
type Decommitment ¶
type Decommitment = curve25519.Scalar
Decommitment is the random value r used in a Pedersen commitment
type Params ¶
type Params struct { }
Params consists of two group elements g and h such that the commitment is of the form g^m * h^r
func GenerateParams ¶
func GenerateParams() *Params
GenerateParams now does nothing In the past, it generated the two basis G and H
Click to show internal directories.
Click to hide internal directories.