Documentation ¶
Overview ¶
Package signature contains the cryptographic signature types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context string
Context is the chain domain separation context.
func DeriveChainContext ¶
DeriveChainContext derives the chain domain separation context for a given runtime.
type PublicKey ¶
type PublicKey interface { // String returns a string representation of the public key. String() string // Equal compares vs another public key for equality. Equal(other PublicKey) bool // Verify returns true iff the signature is valid for the public key over the context and // message. Verify(context, message, signature []byte) bool }
PublicKey is a public key.
type Signer ¶
type Signer interface { // Public returns the PublicKey corresponding to the signer. Public() PublicKey // ContextSign generates a signature with the private key over the context and // message. ContextSign(context, message []byte) ([]byte, error) // String returns the string representation of a Signer, which MUST not // include any sensitive information. String() string // Reset tears down the Signer and obliterates any sensitive state if any. Reset() }
Signer is an opaque interface for private keys that is capable of producing signatures, in the spirit of `crypto.Signer`.
Click to show internal directories.
Click to hide internal directories.