Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SeedVersion1 (binary seed) SeedVersion1 = versioned.MustParse("1.0.0") // SeedVersion11 (json mnemonic) SeedVersion11 = versioned.MustParse("1.1.0") // SeedVersionLatest link to latest seed version SeedVersionLatest = SeedVersion11 )
Functions ¶
func NewManager ¶
func NewManager(root string, debug bool) (pkg.IdentityManager, error)
NewManager creates an identity daemon from seed The daemon will auto generate a new seed if the path does not exist debug flag is used to change the behavior slightly when zos is running in debug mode. Right now only the key store uses this flag. In case of debug migrated keys to tpm are not deleted from disks. This allow switching back and forth between tpm and non-tpm key stores.
func NewStore ¶
NewStore tries to build the best key store available for this ndoe. On a machine with no tpm support, that would be a file store. If TPM is supported, TPM will be used. There is a special case if tpm is supported, but a file seed exits, this file key will be migrated to the TPM store then deleted (only if delete is set to true)
Types ¶
type KeyPair ¶
type KeyPair struct { PrivateKey ed25519.PrivateKey PublicKey ed25519.PublicKey }
KeyPair holds a public and private side of an ed25519 key pair
func GenerateKeyPair ¶
GenerateKeyPair creates a new KeyPair from a random seed
func KeyPairFromKey ¶
func KeyPairFromKey(sk ed25519.PrivateKey) KeyPair