Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SHA256 parameters SHA256HashSize = 32 SHA256KeySize = 256 * 2 * SHA256HashSize // 256 bits * 2 (for 0 and 1) * hash size SHA256SigSize = 256 * SHA256HashSize // 256 bits * hash size // SHA512 parameters SHA512HashSize = 64 SHA512KeySize = 512 * 2 * SHA512HashSize SHA512SigSize = 512 * SHA512HashSize )
Parameters for Lamport signatures
Variables ¶
This section is empty.
Functions ¶
func GetPublicKeySize ¶
GetPublicKeySize returns the size of a public key for the given hash function
func GetSignatureSize ¶
GetSignatureSize returns the size of a signature for the given hash function
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
PrivateKey represents a Lamport private key
func GenerateKey ¶
func GenerateKey(rng io.Reader, hashFunc HashFunc) (*PrivateKey, error)
GenerateKey generates a new Lamport keypair
func (*PrivateKey) Public ¶
func (priv *PrivateKey) Public() *PublicKey
Public returns the public key corresponding to this private key
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey represents a Lamport public key
func PublicKeyFromBytes ¶
PublicKeyFromBytes deserializes a public key
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature represents a Lamport signature
func SignatureFromBytes ¶
SignatureFromBytes deserializes a signature
Click to show internal directories.
Click to hide internal directories.