ctaphid

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CMD_CBOR uint8 = 0x10
View Source
const CMD_INIT uint8 = 0x06
View Source
const CMD_WINK uint8 = 0x08
View Source
const CMD_authenticatorMakeCredential = 0x01
View Source
const (
	CMD_authenticatorReset = 0x07
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CBOR_MSG

type CBOR_MSG struct {
	CTAP_COMMAND uint8
	CTAP_STATUS  uint8
	CBOR_DATA    []byte //already encoded
}

type CTAP

type CTAP struct {
	// contains filtered or unexported fields
}

func (*CTAP) ClientPIN_GetKeyAgreement

func (c *CTAP) ClientPIN_GetKeyAgreement() (*pin.AuthenticatorClientPIN_Answer, error)

func (*CTAP) ClientPIN_GetPinToken

func (c *CTAP) ClientPIN_GetPinToken(curPin string) (*pin.AuthenticatorClientPIN_Answer, error)

func (*CTAP) ClientPIN_GetRetries

func (c *CTAP) ClientPIN_GetRetries() (*pin.AuthenticatorClientPIN_Answer, error)

func (*CTAP) ClientPIN_Set

func (c *CTAP) ClientPIN_Set(newPin string) (*pin.AuthenticatorClientPIN_Answer, error)

func (*CTAP) GetAssertion

func (c *CTAP) GetAssertion(rpId string, cdh []byte, allowList [][]byte, pinAuth []byte, withHMAC bool, salt1 []byte, salt2 []byte) (*assertion.AssertionReplyObjectParsed, error)

func (*CTAP) GetInfoCbor

func (c *CTAP) GetInfoCbor() (*info.AuthenticatorGetInfo, error)

func (*CTAP) MakeCredential

func (c *CTAP) MakeCredential(cdh []byte, rp_ID, rp_name string, user_Name, user_DisplayName string, user_ID []byte, pinToken []byte, rk, withHMAC bool) (*credentials.AttestationObject, error)

func (*CTAP) MakeSharedSecret

func (c *CTAP) MakeSharedSecret() (*credentials.SharedSecret, error)

func (*CTAP) SendInitCommand

func (c *CTAP) SendInitCommand() (*INIT_INFO, error)

func (*CTAP) Send_CBOR

func (c *CTAP) Send_CBOR(cmd uint8, data interface{}) ([]byte, error)

func (*CTAP) SetDevice

func (c *CTAP) SetDevice(dev *hidraw.HidDevice)

func (*CTAP) Wink

func (c *CTAP) Wink() error

type Capability_flags

type Capability_flags struct {
	CAPABILITY_WINK  bool
	CAPABILITY_CBOR  bool
	CAPABILITY_NMESG bool
}

type INIT_INFO

type INIT_INFO struct {
	Protocol_Version     uint8
	Major_Device_Version uint8
	Minor_Device_Version uint8
	Build_Device_Version uint8
	Capability_flags     Capability_flags
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL