diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2018-09-17 18:33:49 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2018-09-17 18:33:49 -0700 |
commit | dc82971c1af0d147433c948dc440ffabdc276a7c (patch) | |
tree | 3bcf9317a71da26653cb614a9d7beb755d0f3cea /paramiko/ed25519key.py | |
parent | 008ac2bfb2f886346ba17bd8f47e92fa8b436a3c (diff) | |
download | paramiko-dc82971c1af0d147433c948dc440ffabdc276a7c.tar.gz |
Blacken, 2.2 edition
Diffstat (limited to 'paramiko/ed25519key.py')
-rw-r--r-- | paramiko/ed25519key.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index 1557c5b2..77d4d37d 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -67,6 +67,7 @@ class Ed25519Key(PKey): def _parse_signing_key_data(self, data, password): from paramiko.transport import Transport + # We may eventually want this to be usable for other key types, as # OpenSSH moves to it, but for now this is just for Ed25519 keys. # This format is described here: @@ -123,9 +124,9 @@ class Ed25519Key(PKey): ignore_few_rounds=True, ) decryptor = Cipher( - cipher["class"](key[:cipher["key-size"]]), - cipher["mode"](key[cipher["key-size"]:]), - backend=default_backend() + cipher["class"](key[: cipher["key-size"]]), + cipher["mode"](key[cipher["key-size"] :]), + backend=default_backend(), ).decryptor() private_data = ( decryptor.update(private_ciphertext) + decryptor.finalize() @@ -147,8 +148,10 @@ class Ed25519Key(PKey): signing_key = nacl.signing.SigningKey(key_data[:32]) # Verify that all the public keys are the same... assert ( - signing_key.verify_key.encode() == public == public_keys[i] == - key_data[32:] + signing_key.verify_key.encode() + == public + == public_keys[i] + == key_data[32:] ) signing_keys.append(signing_key) # Comment, ignore. |