From eb34524f0f35ead06e7e20468302cb193a127459 Mon Sep 17 00:00:00 2001 From: Grégoire Détrez Date: Fri, 17 Jun 2022 16:01:42 +0200 Subject: Store only the seed of the private key --- internal/fmtio/fmtio.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/fmtio') 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) { -- cgit v1.2.3