diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-13 16:10:43 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-13 16:10:43 +0200 |
commit | 8fee6561fbc21bd44f67dff9f365aa14da293d99 (patch) | |
tree | e1f27b545439a7cb47254342cfbff6121bf41f6b /cmd/sigsum-debug/genkey | |
parent | 8a4f764a7304ecbff07d451a21926bdc1a7fb3d4 (diff) |
clean-up sigsum-debug structure
Diffstat (limited to 'cmd/sigsum-debug/genkey')
-rw-r--r-- | cmd/sigsum-debug/genkey/genkey.go | 19 |
1 files changed, 19 insertions, 0 deletions
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 +} |