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

    Constants

    This section is empty.

    Variables

    View Source
    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

      View Source
      var NielsBaseMultiples = [256][96]byte{}/* 256 elements not displayed */
      

        multiples of the base point in packed {ysubx, xaddy, t2d} form

        Functions

        func Add

        func Add(r, p, q *Ge25519)

        func Double

        func Double(r *Ge25519, p *Ge25519)

        func DoubleScalarmultVartime

        func DoubleScalarmultVartime(r, p1 *Ge25519, s1, s2 *modm.Bignum256)

          computes [s1]p1 + [s2]basepoint

          func Pack

          func Pack(r []byte, p *Ge25519)

          func ScalarmultBaseNiels

          func ScalarmultBaseNiels(r *Ge25519, basepointTable *[256][96]byte, s *modm.Bignum256)

            computes [s]basepoint

            func UnpackNegativeVartime

            func UnpackNegativeVartime(r *Ge25519, p []byte) bool

            Types

            type Ge25519

            type Ge25519 struct {
            	// contains filtered or unexported fields
            }

            func (*Ge25519) Reset

            func (r *Ge25519) Reset()

            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