aboutsummaryrefslogtreecommitdiff
path: root/cmd/tmp/keygen/main.go
blob: c38102233768e3d4cd8f1233842fc96e5e8ac4c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main

import (
	"crypto/ed25519"
	"crypto/rand"
	"fmt"
	"log"

	"git.sigsum.org/sigsum-lib-go/pkg/types"
)

func main() {
	vk, sk, err := ed25519.GenerateKey(rand.Reader)
	if err != nil {
		log.Fatalf("GenerateKey: %v", err)
	}
	fmt.Printf("sk: %x\n", sk[:])
	fmt.Printf("vk: %x\n", vk[:])
	fmt.Printf("kh: %x\n", types.HashFn(vk[:])[:])
}