elligator2

package
v0.0.0-...-796008b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package elligator2 implements the Elligator 2 forward/reverse mapping for Curve25519. This implementation does NOT interoperate with the original codebase as the original codebase is wrong.

See http://elligator.cr.yp.to/elligator-20130828.pdf.

Index

Constants

This section is empty.

Variables

View Source
var ErrKeygenFailed = errors.New("elligator2: failed to generate key pair")

ErrKeygenFailed is the error returned when a suitable base keypair was not generated after the maximum number of retries.

Functions

func GenerateKey

func GenerateKey(random io.Reader, publicKey, representative, privateKey *[32]byte) error

GenerateKey generates a Curve25519 key pair along with a uniform representative for the public key, using the random source random (Hint: crypto/rand.Reader).

func RepresentativeToPublicKey

func RepresentativeToPublicKey(publicKey, representative *[32]byte)

RepresentativeToPublicKey converts a uniform representative value for a curve25519 public key, as produced by GenerateKey, to a curve25519 public key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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