package edwards25519

Import Path
crypto/internal/edwards25519 (on go.dev)

Dependency Relation
imports 6 packages, and imported by one package

Involved Source Files Package edwards25519 implements group logic for the twisted Edwards curve -x^2 + y^2 = 1 + -(121665/121666)*x^2*y^2 This is better known as the Edwards curve equivalent to Curve25519, and is the curve used by the Ed25519 signature scheme. Most users don't need this package, and should instead use crypto/ed25519 for signatures, golang.org/x/crypto/curve25519 for Diffie-Hellman, or github.com/gtank/ristretto255 for prime order group logic. However, developers who do need to interact with low-level edwards25519 operations can use filippo.io/edwards25519, an extended version of this package repackaged as an importable module. (Note that filippo.io/edwards25519 and github.com/gtank/ristretto255 are not maintained by the Go team and are not covered by the Go 1 Compatibility Promise.)
Package-Level Type Names (total 2)
/* sort by: | */
Point represents a point on the edwards25519 curve. This type works similarly to math/big.Int, and all arguments and receivers are allowed to alias. The zero value is NOT valid, and it may be used only as a receiver. Add sets v = p + q, and returns v. Bytes returns the canonical 32-byte encoding of v, according to RFC 8032, Section 5.1.2. Equal returns 1 if v is equivalent to u, and 0 otherwise. Negate sets v = -p, and returns v. ScalarBaseMult sets v = x * B, where B is the canonical generator, and returns v. The scalar multiplication is done in constant time. ScalarMult sets v = x * q, and returns v. The scalar multiplication is done in constant time. Set sets v = u, and returns v. SetBytes sets v = x, where x is a 32-byte encoding of v. If x does not represent a valid point on the curve, SetBytes returns nil and an error and the receiver is unchanged. Otherwise, SetBytes returns v. Note that SetBytes accepts all non-canonical encodings of valid points. That is, it follows decoding rules that match most implementations in the ecosystem rather than RFC 8032. Subtract sets v = p - q, and returns v. VarTimeDoubleScalarBaseMult sets v = a * A + b * B, where B is the canonical generator, and returns v. Execution time depends on the inputs. func NewGeneratorPoint() *Point func NewIdentityPoint() *Point func (*Point).Add(p, q *Point) *Point func (*Point).Negate(p *Point) *Point func (*Point).ScalarBaseMult(x *Scalar) *Point func (*Point).ScalarMult(x *Scalar, q *Point) *Point func (*Point).Set(u *Point) *Point func (*Point).SetBytes(x []byte) (*Point, error) func (*Point).Subtract(p, q *Point) *Point func (*Point).VarTimeDoubleScalarBaseMult(a *Scalar, A *Point, b *Scalar) *Point func (*Point).Add(p, q *Point) *Point func (*Point).Equal(u *Point) int func (*Point).Negate(p *Point) *Point func (*Point).ScalarMult(x *Scalar, q *Point) *Point func (*Point).Set(u *Point) *Point func (*Point).Subtract(p, q *Point) *Point func (*Point).VarTimeDoubleScalarBaseMult(a *Scalar, A *Point, b *Scalar) *Point