Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter interface { Increment(appID, challenge, keyHandle []byte) (uint32, error) UserPresence() bool }
Counter is some sort of interface to a counter (like, a monotonic counter) and to a user presence confirmation device.
type Keyring ¶
Keyring represents a mechanism to derive deterministic relying party authentication private keys given a master key. A Keyring needs a Counter to be able to pass along the counter value recommended by the FIDO U2F standard. Keyring implements the key wrapping method described by Yubico: https://www.yubico.com/blog/yubicos-u2f-key-wrapping/.
func (*Keyring) Authenticate ¶
func (k *Keyring) Authenticate(appID, challenge, keyHandle []byte, userPresence bool) ([]byte, uint32, error)
Authenticate returns a valid FIDO2 U2F authentication signature for the given application ID, authentication challenge, key handle and a byte indicating whether user presence was confirmed or not. It also returns the updated count to be used in the authentication message, and an error.
func (*Keyring) NonceFromKeyHandle ¶
NonceFromKeyHandle returns the nonce from a given keyhandle. Assumes SHA-256 as hashing function.