diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-06-03 01:58:24 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-06-03 02:02:46 -0400 |
commit | 5e103b31f12f701254ee07f61ffd482bf6e08dd4 (patch) | |
tree | 63636088fa3834ef1d6c854efbde30159308f7ef /paramiko/ed25519key.py | |
parent | 25e75f8ed7c1e4183981de020f80e86afc0f41f6 (diff) | |
download | paramiko-5e103b31f12f701254ee07f61ffd482bf6e08dd4.tar.gz |
Fixed encoding/decoding of the public key on the wire
Public point was accidentally encoded as 32 bytes, with no length prefix.
Diffstat (limited to 'paramiko/ed25519key.py')
-rw-r--r-- | paramiko/ed25519key.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index d9c92aa2..e1a8a732 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -52,7 +52,7 @@ class Ed25519Key(PKey): if msg is not None: if msg.get_text() != "ssh-ed25519": raise SSHException("Invalid key") - verifying_key = nacl.signing.VerifyKey(msg.get_bytes(32)) + verifying_key = nacl.signing.VerifyKey(msg.get_binary()) elif filename is not None: with open(filename, "r") as f: data = self._read_private_key("OPENSSH", f) @@ -164,7 +164,7 @@ class Ed25519Key(PKey): v = self._verifying_key m = Message() m.add_string("ssh-ed25519") - m.add_bytes(v.encode()) + m.add_string(v.encode()) return m.asbytes() def get_name(self): |