diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-23 18:44:09 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-04-23 18:44:09 +0200 |
commit | cc9bb6a069d62ed37b7f4866d6dfe37049dc1cf1 (patch) | |
tree | 3dc49efe0e0690656897dc8562da6b7cbc41c9ea /cmd/sigsum-debug/pubkey/pubkey.go | |
parent | 2c28b4209be2ced9a18c20347e1819a24a45cb66 (diff) |
Diffstat (limited to 'cmd/sigsum-debug/pubkey/pubkey.go')
-rw-r--r-- | cmd/sigsum-debug/pubkey/pubkey.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cmd/sigsum-debug/pubkey/pubkey.go b/cmd/sigsum-debug/pubkey/pubkey.go deleted file mode 100644 index 8f3b467..0000000 --- a/cmd/sigsum-debug/pubkey/pubkey.go +++ /dev/null @@ -1,28 +0,0 @@ -package pubkey - -import ( - "crypto/ed25519" - "fmt" - - "git.sigsum.org/sigsum-go/pkg/hex" - "git.sigsum.org/sigsum-tools-go/internal/util" -) - -func Main(_ []string) error { - b, err := util.HexFromStdin() - if err != nil { - return err - } - if len(b) != ed25519.PrivateKeySize { - return fmt.Errorf("pubkey: invalid key size %d", len(b)) - } - - priv := ed25519.PrivateKey(b) - pub, ok := priv.Public().(ed25519.PublicKey) - if !ok { - return fmt.Errorf("pubkey: must parse as ed25519") - } - - fmt.Printf("%s\n", hex.Serialize(pub[:])) - return nil -} |