mirror of https://github.com/gtank/ristretto255
ristretto255: add NewElement and NewScalar
This commit is contained in:
parent
013999a2d0
commit
2f2f1c0111
|
@ -36,13 +36,15 @@ var (
|
|||
)
|
||||
|
||||
// Element is an element of the ristretto255 prime-order group.
|
||||
//
|
||||
// The zero value of Element is not valid, but can be used as the receiver for
|
||||
// any setting operation.
|
||||
type Element struct {
|
||||
r edwards25519.ProjP3
|
||||
}
|
||||
|
||||
// NewElement returns a new Element set to the identity value.
|
||||
func NewElement() *Element {
|
||||
return (&Element{}).Zero()
|
||||
}
|
||||
|
||||
// Equal returns 1 if e is equivalent to ee, and 0 otherwise.
|
||||
//
|
||||
// Note that Elements must not be compared in any other way.
|
||||
|
|
Loading…
Reference in New Issue