Documentation
¶
Index ¶
- Constants
- func DeleteMasterKeySecure() error
- func GetKeyIDInsecure(signetPath string) (string, error)
- func GetKeyIDSecure() (string, error)
- func InitializeInsecure(signetPath string, force bool) error
- func InitializeSecure(force bool, alg ...algorithm.Algorithm) error
- func LoadMasterKeyInsecure(signetPath string) (*keys.Ed25519Signer, error)
- func LoadMasterKeySecure() (*keys.Ed25519Signer, error)
- func LoadMasterKeySecureGeneric() (algorithm.Algorithm, crypto.Signer, error)
Constants ¶
const ( // ServiceName is the identifier used in the OS keyring ServiceName = "signet" // MasterKeyItem is the key identifier for the master key MasterKeyItem = "master-key" )
Variables ¶
This section is empty.
Functions ¶
func DeleteMasterKeySecure ¶
func DeleteMasterKeySecure() error
DeleteMasterKeySecure removes the master key from the OS keyring
func GetKeyIDInsecure ¶
GetKeyIDInsecure returns the key ID from a file (for testing)
func GetKeyIDSecure ¶
GetKeyIDSecure returns the key ID (hex-encoded public key) from the OS keyring
SECURITY: This function accesses a secret that is loaded into memory as a string. Due to Go's string immutability, the secret may persist in memory until garbage collected. See package-level documentation for more details.
func InitializeInsecure ¶
InitializeInsecure generates a master key and stores it in a file (for testing). Only supports Ed25519 (file-based storage is for testing/fallback).
func InitializeSecure ¶
InitializeSecure generates a master key and stores it in the OS keyring. The alg parameter specifies which algorithm to use (empty string defaults to Ed25519).
func LoadMasterKeyInsecure ¶
func LoadMasterKeyInsecure(signetPath string) (*keys.Ed25519Signer, error)
LoadMasterKeyInsecure loads the master key from a file (for testing)
func LoadMasterKeySecure ¶
func LoadMasterKeySecure() (*keys.Ed25519Signer, error)
LoadMasterKeySecure loads the master key from the OS keyring. Returns a crypto.Signer that the caller must Destroy() when done (if the signer implements a Destroy() method).
SECURITY: This function returns a key derived from a secret that is loaded into memory as a string. Due to Go's string immutability, the secret may persist in memory until garbage collected. See package-level documentation for more details.
Types ¶
This section is empty.