ge25519

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Basepoint = Ge25519{
	curve25519.Bignum25519{0x0325d51a, 0x018b5823, 0x00f6592a, 0x0104a92d, 0x01a4b31d, 0x01d6dc5c, 0x027118fe, 0x007fd814, 0x013cd6e5, 0x0085a4db},
	curve25519.Bignum25519{0x02666658, 0x01999999, 0x00cccccc, 0x01333333, 0x01999999, 0x00666666, 0x03333333, 0x00cccccc, 0x02666666, 0x01999999},
	curve25519.Bignum25519{0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
	curve25519.Bignum25519{0x01b7dda3, 0x01a2ace9, 0x025eadbb, 0x0003ba8a, 0x0083c27e, 0x00abe37d, 0x01274732, 0x00ccacdd, 0x00fd78b7, 0x019e1d7c},
}

Basepoint in curve25519

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

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

Functions

func Add

func Add(r, p, q *Ge25519)

Add r = p + q

func Double

func Double(r *Ge25519, p *Ge25519)

Double r = p + p

func DoubleScalarmultVartime

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

DoubleScalarmultVartime computes [s1]p1 + [s2]basepoint

func Pack

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

Pack point to bytes

func ScalarmultBaseNiels

func ScalarmultBaseNiels(r *Ge25519, s *modm.Bignum256)

ScalarmultBaseNiels computes [s]basepoint

func UnpackVartime

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

UnpackVartime point from bytes

Types

type Ge25519

Ge25519 a point in curve25519

func (*Ge25519) Add

func (r *Ge25519) Add(a, b *Ge25519)

Add ge = a + b

func (*Ge25519) FromBytes

func (r *Ge25519) FromBytes(s *[32]byte) bool

FromBytes FromBytes

func (*Ge25519) Sub

func (r *Ge25519) Sub(a, b *Ge25519)

Sub ge = a -b

func (*Ge25519) ToBytes

func (r *Ge25519) ToBytes(s *[32]byte)

ToBytes using Pack

func (*Ge25519) Zero

func (r *Ge25519) Zero()

Zero set point to zero

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL