Documentation ¶
Index ¶
- Variables
- func MarshalAuthnPubKey(pubKey *AuthnPubKey) ([]byte, error)
- type AuthnPubKey
- func (pubKey *AuthnPubKey) Address() cryptotypes.Address
- func (pubKey *AuthnPubKey) Bytes() []byte
- func (*AuthnPubKey) Descriptor() ([]byte, []int)
- func (pubKey *AuthnPubKey) Equals(other cryptotypes.PubKey) bool
- func (m *AuthnPubKey) GetCoseAlgorithm() int32
- func (m *AuthnPubKey) GetKey() []byte
- func (m *AuthnPubKey) GetKeyId() string
- func (m *AuthnPubKey) Marshal() (dAtA []byte, err error)
- func (m *AuthnPubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthnPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthnPubKey) ProtoMessage()
- func (m *AuthnPubKey) Reset()
- func (m *AuthnPubKey) Size() (n int)
- func (pubKey *AuthnPubKey) String() string
- func (pubKey *AuthnPubKey) Type() string
- func (m *AuthnPubKey) Unmarshal(dAtA []byte) error
- func (pubKey *AuthnPubKey) VerifySignature(msg []byte, sigBytes []byte) bool
- func (m *AuthnPubKey) XXX_DiscardUnknown()
- func (m *AuthnPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthnPubKey) XXX_Merge(src proto.Message)
- func (m *AuthnPubKey) XXX_Size() int
- func (m *AuthnPubKey) XXX_Unmarshal(b []byte) error
- type ClientData
- type Signature
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MarshalAuthnPubKey ¶
func MarshalAuthnPubKey(pubKey *AuthnPubKey) ([]byte, error)
MarshalAuthnPubKey marshals the AuthnPubKey to bytes
Types ¶
type AuthnPubKey ¶
type AuthnPubKey struct { // The key_id (or credential ID) is a unique identifier for a passkey. // This ID is provided by the authenticator when the passkey is created. // As it is not possible to retrieve the public key from the authenticator // after the passkey is created, if the user loses the public key - id // association, the key_id can be used to retrieve the public key. KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // Store the COSE algorithm identifier. Since authn allows multiple different // public key credential algorithm, eg. // -7(ES256) - ECDSA with SHA-256 on the P-256 curve // -257(RS256) - RSASSA-PKCS1-v1_5 with SHA-256 // we need to store the algorithm identifier to be able to verify the // signature according to the algorithm the public key is using. CoseAlgorithm int32 `protobuf:"varint,2,opt,name=cose_algorithm,json=coseAlgorithm,proto3" json:"cose_algorithm,omitempty"` // The public key bytes Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` }
PubKey defines an authn public key
func UnmarshalAuthnPubKey ¶
func UnmarshalAuthnPubKey(bz []byte) (*AuthnPubKey, error)
UnmarshalAuthnPubKey unmarshals bytes to an AuthnPubKey
func (*AuthnPubKey) Address ¶
func (pubKey *AuthnPubKey) Address() cryptotypes.Address
Address returns the address of the public key
func (*AuthnPubKey) Bytes ¶
func (pubKey *AuthnPubKey) Bytes() []byte
Bytes returns the raw bytes of the public key
func (*AuthnPubKey) Descriptor ¶
func (*AuthnPubKey) Descriptor() ([]byte, []int)
func (*AuthnPubKey) Equals ¶
func (pubKey *AuthnPubKey) Equals(other cryptotypes.PubKey) bool
Equals checks if two public keys are equal
func (*AuthnPubKey) GetCoseAlgorithm ¶
func (m *AuthnPubKey) GetCoseAlgorithm() int32
func (*AuthnPubKey) GetKey ¶
func (m *AuthnPubKey) GetKey() []byte
func (*AuthnPubKey) GetKeyId ¶
func (m *AuthnPubKey) GetKeyId() string
func (*AuthnPubKey) Marshal ¶
func (m *AuthnPubKey) Marshal() (dAtA []byte, err error)
func (*AuthnPubKey) MarshalToSizedBuffer ¶
func (m *AuthnPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AuthnPubKey) ProtoMessage ¶
func (*AuthnPubKey) ProtoMessage()
func (*AuthnPubKey) Reset ¶
func (m *AuthnPubKey) Reset()
func (*AuthnPubKey) Size ¶
func (m *AuthnPubKey) Size() (n int)
func (*AuthnPubKey) String ¶
func (pubKey *AuthnPubKey) String() string
String returns a string representation of the public key
func (*AuthnPubKey) Type ¶
func (pubKey *AuthnPubKey) Type() string
Type returns the type of the public key
func (*AuthnPubKey) Unmarshal ¶
func (m *AuthnPubKey) Unmarshal(dAtA []byte) error
func (*AuthnPubKey) VerifySignature ¶
func (pubKey *AuthnPubKey) VerifySignature(msg []byte, sigBytes []byte) bool
VerifySignature verifies a signature over the given message
func (*AuthnPubKey) XXX_DiscardUnknown ¶
func (m *AuthnPubKey) XXX_DiscardUnknown()
func (*AuthnPubKey) XXX_Marshal ¶
func (m *AuthnPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AuthnPubKey) XXX_Merge ¶
func (m *AuthnPubKey) XXX_Merge(src proto.Message)
func (*AuthnPubKey) XXX_Size ¶
func (m *AuthnPubKey) XXX_Size() int
func (*AuthnPubKey) XXX_Unmarshal ¶
func (m *AuthnPubKey) XXX_Unmarshal(b []byte) error
type ClientData ¶
type ClientData struct { Type string `json:"type"` Challenge string `json:"challenge"` Origin string `json:"origin"` }
ClientData represents the WebAuthn client data
Click to show internal directories.
Click to hide internal directories.