eddsa

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotOnCurve = errors.New("point not on curve")

Functions

func New

New creates an instance of eddsa

func Verify

func Verify(pubKey PublicKey, sig Signature, message curve.Element) (bool, error)

Verify verifies an eddsa signature cf https://en.wikipedia.org/wiki/EdDSA

Types

type PrivateKey

type PrivateKey struct {
	EdCurve *twistededwards.CurveParams
	// contains filtered or unexported fields
}

PrivateKey private key of an eddsa instance

type PublicKey

type PublicKey struct {
	A twistededwards.Point
}

PublicKey eddsa signature object cf https://en.wikipedia.org/wiki/EdDSA for notation

type Signature

type Signature struct {
	R       twistededwards.Point
	S       curve.Element // not in Montgomery form
	EdCurve *twistededwards.CurveParams
}

Signature represents an eddsa signature cf https://en.wikipedia.org/wiki/EdDSA for notation

func Sign

func Sign(privateKey PrivateKey, publicKey PublicKey, message curve.Element) (Signature, error)

Sign sign a message (in Montgomery form) cf https://en.wikipedia.org/wiki/EdDSA for the notations Eddsa is supposed to be built upon Edwards (or twisted Edwards) curves having 256 bits group size and cofactor=4 or 8

Jump to

Keyboard shortcuts

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