aboutsummaryrefslogtreecommitdiff
path: root/cmd/tmp/keygen
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
commit47bacfd5c5d22470340e0823c4ad37b45914b68e (patch)
tree0984b55ced1e537e8d1d681c77157f1a47e47cdc /cmd/tmp/keygen
parent0285454c34b0b3003bc8ede3e304b843ad949be8 (diff)
started using the refactored packages in siglog server
Diffstat (limited to 'cmd/tmp/keygen')
-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[:])
+}