ed25519

package
v0.0.0-...-0b3308b Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MPL-2.0, BSD-3-Clause Imports: 15 Imported by: 2

Documentation

Overview

Package ed25519 provides an optimized Go implementation of a Twisted Edwards curve that is isomorphic to Curve25519. For details see: http://ed25519.cr.yp.to/.

This code is based on Adam Langley's Go port of the public domain, "ref10" implementation of the ed25519 signing scheme in C from SUPERCOP. It was generalized and extended to support full abstract group arithmetic by the Yale Decentralized/Distributed Systems (DeDiS) group.

Due to the field element and group arithmetic optimizations described in the Ed25519 paper, this implementation generally performs extremely well, typically comparable to native C implementations. The tradeoff is that this code is completely specialized to a single curve.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAES128SHA256Ed25519

func NewAES128SHA256Ed25519(fullGroup bool) abstract.Suite

Ciphersuite based on AES-128, SHA-256, and the Ed25519 curve.

func PrivateKeyToCurve25519

func PrivateKeyToCurve25519(curve25519Private *[32]byte, privateKey *[64]byte)

PrivateKeyToCurve25519 converts an ed25519 private key into a corresponding curve25519 private key such that the resulting curve25519 public key will equal the result from PublicKeyToCurve25519.

func PublicKeyToCurve25519

func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool

PublicKeyToCurve25519 converts an Ed25519 public key into the curve25519 public key that would be generated from the same private key.

Types

type Curve

type Curve struct {
}

Curve represents an Ed25519. There are no parameters and no initialization is required because it supports only this one specific curve.

func (*Curve) Point

func (c *Curve) Point() abstract.Point

Create a new Point on the Ed25519 curve.

func (*Curve) PointLen

func (c *Curve) PointLen() int

Returns 32, the size in bytes of an encoded Point on the Ed25519 curve.

func (*Curve) PrimeOrder

func (c *Curve) PrimeOrder() bool

func (*Curve) Scalar

func (c *Curve) Scalar() abstract.Scalar

Create a new Scalar for the Ed25519 curve.

func (*Curve) ScalarLen

func (c *Curve) ScalarLen() int

Returns 32, the size in bytes of an encoded Scalar for the Ed25519 curve.

func (*Curve) String

func (c *Curve) String() string

Return the name of the curve, "Ed25519".

Jump to

Keyboard shortcuts

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