sphincs

package module
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: BSD-3-Clause Imports: 5 Imported by: 2

README

OVERVIEW

Go Reference Go Report Card Go Build

Overview

paepcke.de/sphincs

EXTERNAL RESOURCES

Special thanks goes to:

DOCS

pkg.go.dev/paepcke.de/sphincs

Similar Projects

CONTRIBUTION

Yes, Please! PRs Welcome!

Documentation

Overview

Package sphincs provides hashbased hypertree post-quantum secure signatures

Index

Constants

View Source
const (
	// PublicKeySize is the length of a SPHINCS-256 public key in bytes.
	PublicKeySize = (nMasks + 1) * hashSize
	// PrivateKeySize is the length of a SPHINCS-256 private key in bytes.
	PrivateKeySize = seedBytes + PublicKeySize - hashSize + skRandSeedBytes
	// SignatureSize is the length of a SPHINCS-256 signature in bytes.
	SignatureSize = 32 + (totalTreeHeight+7)/8 + horstSigBytes + (nLevels)*wotsSigBytes + totalTreeHeight*hashSize
	// SeedTokenSize
	SeedTokenSize = PrivateKeySize
	// SignatureSize
	HashSize = 64
	// MessageSize
	MessageSize = HashSize
)

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(psrnd [SeedTokenSize]byte) ([PublicKeySize]byte, [PrivateKeySize]byte)

GenerateKey generates a public/private key pair

func Sign

func Sign(tsk [PrivateKeySize]byte, message [MessageSize]byte) [SignatureSize]byte

Sign signs the message with privateKey and returns the signature.

func Verify

func Verify(tpk [PublicKeySize]byte, message [MessageSize]byte, signature [SignatureSize]byte) bool

Verify takes a public key, message and signature and returns true if the signature is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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