aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/sigsum-debug/key/private/private.go2
-rw-r--r--internal/fmtio/fmtio.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/sigsum-debug/key/private/private.go b/cmd/sigsum-debug/key/private/private.go
index 3928f56..70779c2 100644
--- a/cmd/sigsum-debug/key/private/private.go
+++ b/cmd/sigsum-debug/key/private/private.go
@@ -24,6 +24,6 @@ func Main(args []string) error {
return fmt.Errorf("invalid key size %d", len(priv))
}
- fmt.Printf("%s\n", hex.Serialize(priv[:]))
+ fmt.Printf("%s\n", hex.Serialize(priv.Seed()))
return nil
}
diff --git a/internal/fmtio/fmtio.go b/internal/fmtio/fmtio.go
index 0e252d4..f900e42 100644
--- a/internal/fmtio/fmtio.go
+++ b/internal/fmtio/fmtio.go
@@ -36,10 +36,10 @@ func SignerFromHex(s string) (crypto.Signer, error) {
if err != nil {
return nil, err
}
- if n := len(b); n != ed25519.PrivateKeySize {
+ if n := len(b); n != ed25519.SeedSize {
return nil, fmt.Errorf("invalid size %d", n)
}
- return ed25519.PrivateKey(b), nil
+ return ed25519.NewKeyFromSeed(b), nil
}
func PublicKeyFromHex(s string) (pub types.PublicKey, err error) {