kyber: Index | Files

package eddsa

import ""

Package eddsa implements the EdDSA signature algorithm according to RFC8032.


Package Files


func Verify Uses

func Verify(public kyber.Point, msg, sig []byte) error

Verify uses a public key, a message and a signature. It will return nil if sig is a valid signature for msg created by key public, or an error otherwise.

type EdDSA Uses

type EdDSA struct {
    // Secret being already hashed + bit tweaked
    Secret kyber.Scalar
    // Public is the corresponding public key
    Public kyber.Point
    // contains filtered or unexported fields

EdDSA is a structure holding the data necessary to make a series of EdDSA signatures.

func NewEdDSA Uses

func NewEdDSA(stream cipher.Stream) *EdDSA

NewEdDSA will return a freshly generated key pair to use for generating EdDSA signatures.

func (*EdDSA) MarshalBinary Uses

func (e *EdDSA) MarshalBinary() ([]byte, error)

MarshalBinary will return the representation used by the reference implementation of SUPERCOP ref10, which is "seed || Public".

func (*EdDSA) Sign Uses

func (e *EdDSA) Sign(msg []byte) ([]byte, error)

Sign will return a EdDSA signature of the message msg using Ed25519.

func (*EdDSA) UnmarshalBinary Uses

func (e *EdDSA) UnmarshalBinary(buff []byte) error

UnmarshalBinary transforms a slice of bytes into a EdDSA signature.

Package eddsa imports 6 packages (graph). Updated 2019-12-01. Refresh now. Tools for package owners.