ed25519

package module
v0.0.0-...-96c10d4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

README

As github.com/agl/ed25519/extra25519 is not maintained anymore, this repo is a backup.

And fixed an issue which is mentioned:https://github.com/agl/ed25519/pull/12/commits/602019f68770b37794c1c42ab7163e0b1488824f

So the import changed, "github.com/agl/ed25519/extra25519" => "github.com/jdgcs/ed25519/extra25519" .

Documentation

Overview

Package ed25519 implements the Ed25519 signature algorithm. See http://ed25519.cr.yp.to/.

Index

Constants

View Source
const (
	PublicKeySize  = 32
	PrivateKeySize = 64
	SignatureSize  = 64
)

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error)

GenerateKey generates a public/private key pair using randomness from rand.

func Sign

func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte

Sign signs the message with privateKey and returns a signature.

func Verify

func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool

Verify returns true iff sig is a valid signature of message by publicKey.

Types

This section is empty.

Directories

Path Synopsis
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.

Jump to

Keyboard shortcuts

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