Documentation
¶
Index ¶
- Variables
- func CreateSRK(tpm transport.TPMCloser, ownerPassword []byte) (*tpm2.AuthHandle, *tpm2.TPMTPublic, error)
- func EncodeKey(k *Key) ([]byte, error)
- func LoadKey(tpm transport.TPMCloser, ownerPassword []byte, key *Key) (*tpm2.AuthHandle, error)
- func LoadKeyWithParent(tpm transport.TPMCloser, parent tpm2.AuthHandle, key *Key) (*tpm2.AuthHandle, error)
- func MarshalKey(k *Key) ([]byte, error)
- func Sign(tpm transport.TPMCloser, ownerPassword []byte, key *Key, digest []byte, ...) ([]byte, error)
- func SupportedECCAlgorithms(tpm transport.TPMCloser) []int
- type Key
- func ChangeAuth(tpm transport.TPMCloser, ownerPassword []byte, key *Key, oldpin, newpin []byte) (*Key, error)
- func CreateKey(tpm transport.TPMCloser, keytype tpm2.TPMAlgID, bits int, ownerPassword []byte, ...) (*Key, error)
- func DecodeKey(pemBytes []byte) (*Key, error)
- func ImportKey(tpm transport.TPMCloser, ownerPassword []byte, pk any, pin []byte, ...) (*Key, error)
- func UnmarshalKey(b []byte) (*Key, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOldKey = errors.New("old format on key")
)
Functions ¶
func CreateSRK ¶
func CreateSRK(tpm transport.TPMCloser, ownerPassword []byte) (*tpm2.AuthHandle, *tpm2.TPMTPublic, error)
Creates a Storage Key, or return the loaded storage key
func LoadKeyWithParent ¶
func LoadKeyWithParent(tpm transport.TPMCloser, parent tpm2.AuthHandle, key *Key) (*tpm2.AuthHandle, error)
func MarshalKey ¶
func SupportedECCAlgorithms ¶ added in v0.3.0
Types ¶
type Key ¶
func ChangeAuth ¶ added in v0.4.0
func ChangeAuth(tpm transport.TPMCloser, ownerPassword []byte, key *Key, oldpin, newpin []byte) (*Key, error)
ChangeAuth changes the object authn header to something else notice this changes the private blob inside the key in-place.
func UnmarshalKey ¶
func (*Key) AuthorizedKey ¶ added in v0.2.0
func (*Key) Fingerprint ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.