diff options
author | Grégoire Détrez <gregoire@mullvad.net> | 2022-06-17 16:01:42 +0200 |
---|---|---|
committer | Grégoire Détrez <gregoire@mullvad.net> | 2022-06-17 16:01:42 +0200 |
commit | eb34524f0f35ead06e7e20468302cb193a127459 (patch) | |
tree | 404b889af24cc718a7398455a511a3ac6a7946cd /internal/fmtio | |
parent | 6ff11f08eb4aec86efe48cf887781f3ea654ec10 (diff) |
Store only the seed of the private key
Diffstat (limited to 'internal/fmtio')
-rw-r--r-- | internal/fmtio/fmtio.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |