From 17a1cf31764541daa509cf59f1bbb32c25b28c8c Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 1 Jun 2021 10:41:29 +0200 Subject: added keygen command --- client/cmd/keygen/main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 client/cmd/keygen/main.go diff --git a/client/cmd/keygen/main.go b/client/cmd/keygen/main.go new file mode 100644 index 0000000..c1c1b58 --- /dev/null +++ b/client/cmd/keygen/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "crypto/ed25519" + "crypto/rand" + "fmt" + "log" +) + +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[:]) +} -- cgit v1.2.3