Documentation ¶
Overview ¶
Package ge25519 implements arithmetic on the twisted Edwards curve -x^2 + y^2 = 1 + dx^2y^2 with d = -(121665/121666) = 37095705934669439343138083508754565189542113879843219016388785533085940283555
Base point: (15112221349535400772501151409588531511454012693041857206046113283949847762202,46316835694926478169428394003475163141307993866256225615783033603165251855960);
Index ¶
- Variables
- func Add(r, p, q *Ge25519)
- func CofactorEqual(p, q *Ge25519) bool
- func CofactorMultiply(r, p *Ge25519)
- func Double(r *Ge25519, p *Ge25519)
- func DoubleScalarmultVartime(r, p1 *Ge25519, s1, s2 *modm.Bignum256)
- func IsNeutralVartime(q *Ge25519) bool
- func Pack(r []byte, p *Ge25519)
- func ProjectiveToExtended(r, p *Ge25519)
- func ScalarmultBaseNiels(r *Ge25519, basepointTable *[256][96]byte, s *modm.Bignum256)
- func UnpackNegativeVartime(r *Ge25519, p []byte) bool
- func UnpackVartime(r *Ge25519, p []byte) bool
- type Ge25519
Constants ¶
This section is empty.
Variables ¶
var Basepoint = Ge25519{ curve25519.Bignum25519{0x00062d608f25d51a, 0x000412a4b4f6592a, 0x00075b7171a4b31d, 0x0001ff60527118fe, 0x000216936d3cd6e5}, curve25519.Bignum25519{0x0006666666666658, 0x0004cccccccccccc, 0x0001999999999999, 0x0003333333333333, 0x0006666666666666}, curve25519.Bignum25519{0x0000000000000001, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000}, curve25519.Bignum25519{0x00068ab3a5b7dda3, 0x00000eea2a5eadbb, 0x0002af8df483c27e, 0x000332b375274732, 0x00067875f0fd78b7}, }
ge25519_basepoint
var NielsBaseMultiples = [256][96]byte{}/* 256 elements not displayed */
multiples of the base point in packed {ysubx, xaddy, t2d} form
Functions ¶
func CofactorEqual ¶
CofactorEqual checks whether p, q are equal up to cofactor multiplication (ie. if their difference is of small order).
func CofactorMultiply ¶
func CofactorMultiply(r, p *Ge25519)
CofactorMultiply multiplies the full group element by the cofactor (8).
func DoubleScalarmultVartime ¶
computes [s1]p1 + [s2]basepoint
func IsNeutralVartime ¶
IsNeutralVartime returns true iff the q is the identity point.
func ProjectiveToExtended ¶
func ProjectiveToExtended(r, p *Ge25519)
ProjectiveToExtended converts p from a projective group element to an extended group element.
func ScalarmultBaseNiels ¶
computes [s]basepoint
func UnpackNegativeVartime ¶
func UnpackVartime ¶
Types ¶
type Ge25519 ¶
type Ge25519 struct {
// contains filtered or unexported fields
}
func (*Ge25519) X ¶
func (r *Ge25519) X() *curve25519.Bignum25519
func (*Ge25519) Y ¶
func (r *Ge25519) Y() *curve25519.Bignum25519
func (*Ge25519) Z ¶
func (r *Ge25519) Z() *curve25519.Bignum25519