Example #1
0
// generateKeypair creates a new keypair and publishes it
func generateKeypair(secret *keymgr.Secring) {
	Info.Println("Generating and advertising a new key pair")
	pub, sec := eccGenerate()
	keyidstr := secret.Insert(pub, sec)
	Info.Printf("Generated new keypair with keyid: %s", keyidstr)
	Info.Println("Writing new Public Key to disc")
	secret.WritePublic(pub, keyidstr)
	Info.Println("Inserting Secret Key into Secring")
	secret.WriteSecret(keyidstr)
}