From 8fee6561fbc21bd44f67dff9f365aa14da293d99 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Wed, 13 Apr 2022 16:10:43 +0200 Subject: clean-up sigsum-debug structure --- cmd/sigsum-debug/genkey/genkey.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmd/sigsum-debug/genkey/genkey.go (limited to 'cmd/sigsum-debug/genkey') diff --git a/cmd/sigsum-debug/genkey/genkey.go b/cmd/sigsum-debug/genkey/genkey.go new file mode 100644 index 0000000..5f71e41 --- /dev/null +++ b/cmd/sigsum-debug/genkey/genkey.go @@ -0,0 +1,19 @@ +package genkey + +import ( + "crypto/ed25519" + "crypto/rand" + "fmt" + + "git.sigsum.org/sigsum-go/pkg/hex" +) + +func Main(_ []string) error { + _, priv, err := ed25519.GenerateKey(rand.Reader) + if err != nil { + return fmt.Errorf("genkey: %v", err) + } + + fmt.Printf("%s\n", hex.Serialize(priv[:])) + return nil +} -- cgit v1.2.3