Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Group ¶
Group is a wrapper around elliptic.Curve. It is a cyclic group with generator (c.Params().Gx, c.Params().Gy) and order c.Params().N (which is exposed as Q in a wrapper).
func (*Group) Exp ¶
func (g *Group) Exp(base *GroupElement, exponent *big.Int) *GroupElement
Exp computes base^exponent in Group. This actually means exponent * base as this is additive group.
func (*Group) ExpBaseG ¶
func (g *Group) ExpBaseG(exponent *big.Int) *GroupElement
Exp computes base^exponent in Group where base is the generator. This actually means exponent * G as this is additive group.
func (*Group) GetRandomElement ¶
func (g *Group) GetRandomElement() *GroupElement
GetRandomElement returns a random element from this group.
func (*Group) Inv ¶
func (g *Group) Inv(x *GroupElement) *GroupElement
Inv computes inverse of x in Group. This is done by computing x^(order-1) as: x * x^(order-1) = x^order = 1. Note that this actually means x * (order-1) as this is additive group.
func (*Group) Mul ¶
func (g *Group) Mul(a, b *GroupElement) *GroupElement
Mul computes a * b in Group. This actually means a + b as this is additive group.
type GroupElement ¶
TODO Insert appropriate comment with description of this struct
func NewGroupElement ¶
func NewGroupElement(x, y *big.Int) *GroupElement
func (*GroupElement) Equals ¶
func (e *GroupElement) Equals(b *GroupElement) bool