From 09a4ffb282957595b1eee7adaead5d0503a5f54a Mon Sep 17 00:00:00 2001 From: Scott Maxwell Date: Thu, 31 Oct 2013 15:24:09 -0700 Subject: [PATCH] Salt needs to be 16 bytes instead of 8 --- paramiko/pkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 5baf450..376041d 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -367,7 +367,7 @@ class PKey (object): keysize = self._CIPHER_TABLE[cipher_name]['keysize'] blocksize = self._CIPHER_TABLE[cipher_name]['blocksize'] mode = self._CIPHER_TABLE[cipher_name]['mode'] - salt = rng.read(8) + salt = rng.read(16) key = util.generate_key_bytes(MD5, salt, password, keysize) if len(data) % blocksize != 0: n = blocksize - len(data) % blocksize