Documentation
¶
Index ¶
Constants ¶
View Source
const ( CMD_authenticatorGetAssertion = 0x02 CMD_authenticatorGetNextAssertion = 0x08 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertionReplyObjectParsed ¶
type AssertionReplyObjectParsed struct {
Credential *PublicKeyCredentialDescriptor
AuthData *AuthData
Signature []byte
User *PublicKeyCredentialUserEntity
NumberOfCredentials uint
}
type AssertionReplyObjectRaw ¶
type AssertionReplyObjectRaw struct {
Credential *PublicKeyCredentialDescriptor `cbor:"1,keyasint"`
AuthData []byte `cbor:"2,keyasint"`
Signature []byte `cbor:"3,keyasint"`
User *PublicKeyCredentialUserEntity `cbor:"4,keyasint"`
NumberOfCredentials uint `cbor:"5,keyasint"`
}
type AssertionRequestObject ¶
type AssertionRequestObject struct {
RPID string `cbor:"1,keyasint"`
ClientDataHash []byte `cbor:"2,keyasint"`
AllowList []*PublicKeyCredentialDescriptor `cbor:"3,keyasint,omitempty"`
Extensions *ExtensionsListRequest `cbor:"4,keyasint,omitempty"`
Options *credentials.Options `cbor:"5,keyasint,omitempty"`
PinAuth []byte `cbor:"6,keyasint,omitempty"`
PinProtocol uint `cbor:"7,keyasint,omitempty"`
}
func GetAssertionRequest ¶
func GetAssertionRequest(rpid string, cdh []byte, allowList [][]byte, pinAuth []byte, withHMAC bool, sharedSecret *credentials.SharedSecret, salt1 []byte, salt2 []byte) *AssertionRequestObject
type AuthData ¶
type AuthData struct {
RpIdHash []byte //32 byte
Flags uint8
Counter uint32
AttCredData *credentials.AttCredDataObject
Extensions *ExtensionsListReply
}
type ExtensionsListReply ¶
type ExtensionsListRequest ¶
type ExtensionsListRequest struct {
HmacSecret *HmacSecretRequest `cbor:"hmac-secret,omitempty"`
}
type HmacSecretRequest ¶
type HmacSecretRequest struct {
KeyAgreement *credentials.CoseKey `cbor:"1,keyasint,omitempty"`
//publicKey used for shared Secret (CBOR Encoded 1:2,3:-25,-1:1,-2:x,-3:y)
SaltEnc []byte `cbor:"2,keyasint,omitempty"`
/*saltEnc(0x02): Encrypt one or two salts (Called salt1 (32 bytes) and salt2 (32 bytes))
using sharedSecret as follows:
One salt case: AES256-CBC(sharedSecret, IV=0, salt1 (32 bytes)).
Two salt case: AES256-CBC(sharedSecret, IV=0, salt1 (32 bytes) || salt2 (32 bytes)).
*/
SaltAuth []byte `cbor:"3,keyasint,omitempty"`
}
func GetHmacSecretRequest ¶
func GetHmacSecretRequest(sharedSecret *credentials.SharedSecret, salt1, salt2 []byte) *HmacSecretRequest
Click to show internal directories.
Click to hide internal directories.