From c978a6bff03e2c2b620ff485c987ff5311dad97d Mon Sep 17 00:00:00 2001 From: jhall150 Date: Thu, 31 Mar 2016 10:15:47 -0400 Subject: Don't pass IV to pycrypto when using MODE_CTR * Fixes #713 --- paramiko/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paramiko/transport.py b/paramiko/transport.py index 120f9e84..1de6ff09 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1662,7 +1662,7 @@ class Transport (threading.Thread, ClosingContextManager): elif name.endswith("-ctr"): # CTR modes, we need a counter counter = Counter.new(nbits=self._cipher_info[name]['block-size'] * 8, initial_value=util.inflate_long(iv, True)) - return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter) + return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], '', counter) else: return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv) -- cgit v1.2.3