wotsp

package
v0.0.0-...-bb9ccd8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Implements WOTSP-SHA2_256 as documented in the IETF XMSS draft (https://datatracker.ietf.org/doc/draft-irtf-cfrg-xmss-hash-based-signatures/)

Index

Constants

View Source
const MsgLen = n
View Source
const PubKeyLen = l * n
View Source
const SigLen = l * n

Variables

This section is empty.

Functions

func GenPublicKey

func GenPublicKey(seed, pubSeed []byte, adrs *Address) []byte

Computes the public key that corresponds to the expanded seed.

func PkFromSig

func PkFromSig(sig, msg, pubSeed []byte, adrs *Address) []byte

Generates a public key from the given signature

func Sign

func Sign(msg, seed, pubSeed []byte, adrs *Address) []byte

Signs message msg using the private key generated using the given seed.

func Verify

func Verify(pk, sig, msg, pubSeed []byte, adrs *Address) bool

Verifies the given signature on the given message.

Types

type Address

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

Describes a hash address, i.e. where a hash is calculated. It is used to randomize each hash function call.

func (*Address) SetLayer

func (a *Address) SetLayer(l uint32)

func (*Address) SetOTS

func (a *Address) SetOTS(o uint32)

func (*Address) SetTree

func (a *Address) SetTree(t uint64)

func (*Address) SetType

func (a *Address) SetType(t uint32)

func (*Address) ToBytes

func (a *Address) ToBytes() []byte

Jump to

Keyboard shortcuts

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