Documentation ¶
Overview ¶
Package ident provides the functions required by kwild for message and transaction signature verification, and address derivation. Out of the box it supports verification with signatures created by one of the required default signers in core/crypto/auth.
It also contains the Authenticator registry used by these methods. The registry is populated by: (1) automatically registering the default Authenticators, and (2) importing any auth extensions at or near the level of package main.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAuthenticatorExists is returned when an authenticator is already registered ErrAuthenticatorExists = errors.New("authenticator already exists") // ErrAuthenticatorNotFound is returned when an authenticator is not found ErrAuthenticatorNotFound = errors.New("authenticator not found") )
Functions ¶
func Identifier ¶
Identifier returns a string identifier from a sender and authenticator type. The function requires an Authenticator to be registered for the signature type.
func VerifySignature ¶
VerifySignature verifies the signature given a signer's identity and the message. It uses the Authenticator registry in this package.
func VerifyTransaction ¶
func VerifyTransaction(tx *transactions.Transaction) error
VerifyTransaction verifies a transaction's signature using the Authenticator registry in this package.
Types ¶
type User ¶
type User struct { // PublicKey is the public key of the user PublicKey []byte // AuthType is the type of authentication used by the user AuthType string }
User is an end user of the engine, identified by a public key. It includes an authentication type, which is used to determine how to authenticate the and how to generate an address for the user.