ed25519

package module
v0.0.0-...-3f023ad Latest Latest
Warning

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

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

README

ed25519

This is a temporary fork of agl/ed25519, i plan on using it in some personal projects, and i will wait until the functionality i need is available in the crypto/ed25519 standard library.

Author's Note

This repository is unmaintained. Please see x/crypto/ed25519 for a maintained version.

Before trying to recover a previous version from git, note that I left a one-bit leak in the Elligator code in for years because I'm literally not looking at the PRs. Uncared for code is not a foundation to build upon.

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