blob: c5f60fd1dd1766459a96bb672b90f826a3a57377 (
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-log-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.Hash(vk[:])[:])
}
|