Documentation ¶
Overview ¶
Package signkeys implements key generation and verification methods for keys suitable for blind signature creation.
Index ¶
Constants ¶
View Source
const ( // DefaultExpireTime is the duration for which a key is considered valid. DefaultExpireTime = 2592000 // one month )
View Source
const ( // KeyIDSize is the size of a keyID. KeyIDSize = sha256.Size )
Variables ¶
View Source
var ( // ErrNoSigner is returned if a generator is missing a private key for // signing its keys. ErrNoSigner = errors.New("keygen: no signer") )
Functions ¶
This section is empty.
Types ¶
type KeyGenerator ¶
type KeyGenerator struct { Curve *eccutil.Curve // Curve and hash for all keys ExpireTime int64 // Expire duration to set on generation Usage string // The key usage type PublicKey *[ed25519.PublicKeySize]byte PrivateKey *[ed25519.PrivateKeySize]byte }
KeyGenerator implements a signing key generator and a verifier.
func New ¶
New returns a new key generator. The Usage and URL of the generator must be explicitly set.
func (KeyGenerator) GenKey ¶
func (kg KeyGenerator) GenKey() (*KeyPair, error)
GenKey generates a new key structure.
type PublicKey ¶
type PublicKey struct { KeyID [KeyIDSize]byte // The KeyID (hash) of this key PublicKey eccutil.Point // Public key of PrivateKey Expire int64 // Last unixtime for which this key is usable for verification Usage string // The usage for the key Signer [ed25519.PublicKeySize]byte // The signer Signature [ed25519.SignatureSize]byte // Signature of key }
PublicKey represents the public components of a key.
Click to show internal directories.
Click to hide internal directories.