aboutsummaryrefslogtreecommitdiff
path: root/cmd/sigsum-debug/genkey/genkey.go
blob: 5f71e41d3aa0e03688cdb90693dedb14da93b199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
}