aboutsummaryrefslogtreecommitdiff
path: root/cmd/tmp/keygen/main.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-07 00:19:40 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-07 00:19:40 +0200
commit932d29fd08c8ff401e471b4f764537493ccbd483 (patch)
treee840a4c62db92e84201fe9ceaa0594d99176792c /cmd/tmp/keygen/main.go
parentbdf7a53d61cf044e526cc9123ca296615f838288 (diff)
parent345fe658fa8a4306caa74f72a618e499343675c2 (diff)
Merge branch 'design' into main
Diffstat (limited to 'cmd/tmp/keygen/main.go')
-rw-r--r--cmd/tmp/keygen/main.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmd/tmp/keygen/main.go b/cmd/tmp/keygen/main.go
new file mode 100644
index 0000000..c1c1b58
--- /dev/null
+++ b/cmd/tmp/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[:])
+}