Documentation ¶
Overview ¶
Package blob implements a device credential that may be stored to disk as a marshaled blob.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceCredential ¶
type DeviceCredential struct { Active bool fdo.DeviceCredential // Secrets that would otherwise be stored inside a TPM or other enclave. HmacSecret []byte PrivateKey Pkcs8Key }
DeviceCredential contains all device state, including both public and private parts of keys and secrets.
func (*DeviceCredential) HMACs ¶
func (dc *DeviceCredential) HMACs() (hmacSha256, hmacSha384 hash.Hash)
HMACs returns hmac hashes for SHA256 and SHA384.
func (*DeviceCredential) Public ¶
func (dc *DeviceCredential) Public() crypto.PublicKey
Public returns the corresponding public key.
func (*DeviceCredential) Sign ¶
func (dc *DeviceCredential) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)
Sign signs digest with the private key.
func (DeviceCredential) String ¶
func (dc DeviceCredential) String() string
type Pkcs8Key ¶
Pkcs8Key CBOR-encodes a private key to a byte string of PKCS8 DER content.
func (Pkcs8Key) MarshalCBOR ¶
MarshalCBOR implements cbor.Marshaler interface.
func (*Pkcs8Key) UnmarshalCBOR ¶
UnmarshalCBOR implements cbor.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.