Documentation
¶
Overview ¶
idkey supplies an identity key for a machine, container or device. This package provides an implementation based on an Ed25519 based key, currently only supporting a file based key storage solution. This can later be extended to support more secure hardware backed keystores, such as TPM, OP-TEE or YubiKey.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDKey ¶
type IDKey struct {
// contains filtered or unexported fields
}
func Generate ¶
Generate generates a new identity key and persists it to disk. This function should only ever be called on the first boot otherwise the existing identity will be overwritten.
This function is equivalent to running:
openssl genpkey -algorithm Ed25519 -out key.pem
func Get ¶
Get checks if an existing private identity key exists, and loads the key if it does. It creates a new private identity key and persists it to disk if no key was found. Cases where explicit control is desired on when to generate or load can use Generate and Load directly.
func (*IDKey) Fingerprint ¶
Fingerprint returns the identity fingerprint. This is the SHA512/384 hash of the public key, encoded in base32 (without padding). This is a convenient shorthand form of the identity that can be used to identify a specfic machine or device.