Documentation ¶
Overview ¶
Package group provides prime-order groups based on elliptic curves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrType = errors.New("type mismatch") ErrUnmarshal = errors.New("error unmarshaling") )
Functions ¶
Types ¶
type Element ¶
type Element interface { IsIdentity() bool IsEqual(Element) bool Add(Element, Element) Element Dbl(Element) Element Neg(Element) Element Mul(Element, Scalar) Element MulGen(Scalar) Element encoding.BinaryMarshaler encoding.BinaryUnmarshaler MarshalBinaryCompress() ([]byte, error) }
Element represents an abstract element of a prime-order group.
type Group ¶
type Group interface { Params() *Params // Params returns parameters for the group NewElement() Element NewScalar() Scalar Identity() Element Generator() Element Order() Scalar RandomElement(io.Reader) Element RandomScalar(io.Reader) Scalar RandomNonZeroScalar(io.Reader) Scalar HashToElement(data, dst []byte) Element HashToElementNonUniform(b, dst []byte) Element HashToScalar(data, dst []byte) Scalar }
Group represents a prime-order group based on elliptic curves.
var ( // Ristretto255 is a quotient group generated from edwards25519 curve. Ristretto255 Group = ristrettoGroup{} )
Click to show internal directories.
Click to hide internal directories.