wots

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

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

Go to latest
Published: Feb 8, 2017 License: MIT Imports: 6 Imported by: 0

README

WOTS

Implementation of Winternitz One-time Signatures.

Documentation

Overview

Package wots implements the Winternitz One-time Signature (WOTS) Scheme.

There are two parameters:

-n which determines the security level (given in bytes) -w which allows a trade-off between signature size and computation costs.

The implementation only allows n = {32, 64} at the moment and uses SHA256 resp. SHA512 to provide a (classical) security level of 256-bit resp. 512-bit.

A secret key MUST only be used to sign ONE message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyGen

func KeyGen(masterkey []byte, params Wotsparams) (sk []byte, pk []byte)

KeyGen generates the secret key (sk) / public key (pk) pair for WOTS from a master key. The master key MUST be chosen uniformly at random.

func Sign

func Sign(message []byte, sk []byte, params Wotsparams) (signature []byte)

Sign computes the signature for message using the secret key sk.

func Verify

func Verify(message []byte, pk []byte, signature []byte, params Wotsparams) bool

Verify returns true if signature is a valid signature for message using pk.

Types

type Wotsparams

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

Wotsparams holds all parameters needed for computing signatures with WOTS.

func SetParams

func SetParams(n int, w int) (params Wotsparams, err error)

SetParams takes the security parameter n and the winternitz parameter w to initialize all parameters for the WOTS.

Jump to

Keyboard shortcuts

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