curve25519

package module
v0.0.0-...-df40154 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 5 Imported by: 0

README

go-curve25519

Go Implementation for Curve25519

Port from Java to Go

The following is copied from the it's home page:

Java port of Matthijs van Duin's implementation of Daniel J Bernstein's Curve25519.

This is a straightforward port of 'portable C implementation' of Curve25519 by Matthijs van Duin (http://cds.xs4all.nl:8081/ecdh/).

Curve25519 was developed by Daniel J Bernstein, http://cr.yp.to/ecdh.html

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(message []byte, signature *Signature, pk *PublicKey, enforceCanonical bool) bool

Types

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

func GenerateKey

func GenerateKey() (sk *PrivateKey)

func GenerateKeyFrom

func GenerateKeyFrom(reader io.Reader) (sk *PrivateKey)

func NewPrivateKey

func NewPrivateKey(bytes []byte) (sk *PrivateKey)

func (*PrivateKey) Public

func (sk *PrivateKey) Public() (pk *PublicKey)

func (*PrivateKey) SharedSecret

func (sk *PrivateKey) SharedSecret(pk *PublicKey) []byte

func (*PrivateKey) Sign

func (sk *PrivateKey) Sign(message []byte) (signature *Signature)

type PublicKey

type PublicKey [32]byte

func NewPublicKey

func NewPublicKey(bytes []byte) (pk *PublicKey)

type Signature

type Signature [64]byte

func NewSignature

func NewSignature(bytes []byte) (s *Signature)

Jump to

Keyboard shortcuts

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