Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Committer ¶
type Committer struct { Params *Params Commitment *ec.GroupElement // contains filtered or unexported fields }
Committer can commit to some value x - it sends to receiver c = g^x * h^r. When decommitting, committer sends to receiver r, x; receiver checks whether c = g^x * h^r.
func NewCommitter ¶
func (*Committer) GetCommitMsg ¶
It receives a value x (to this value a commitment is made), chooses a random x, outputs c = g^x * g^r.
func (*Committer) GetDecommitMsg ¶
It returns values x and r (commitment was c = g^x * g^r).
type Params ¶
type Params struct { Group *ec.Group H *ec.GroupElement // contains filtered or unexported fields }
func GenerateParams ¶
type Receiver ¶
type Receiver struct { Params *Params // contains filtered or unexported fields }
func NewReceiver ¶
func NewReceiverFromParams ¶
func (*Receiver) CheckDecommitment ¶
When receiver receives a decommitment, CheckDecommitment verifies it against the stored value (stored by SetCommitment).
func (*Receiver) GetTrapdoor ¶
func (*Receiver) SetCommitment ¶
func (r *Receiver) SetCommitment(el *ec.GroupElement)
When receiver receives a commitment, it stores the value using SetCommitment method.
Click to show internal directories.
Click to hide internal directories.