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.
Click to show internal directories.
Click to hide internal directories.