[Bug 1665598] Re: python-crypto throws exception ValueError: CTR mode needs counter parameter, not IV

Vej 1665598 at bugs.launchpad.net
Fri Feb 17 16:45:16 UTC 2017


** Tags added: trusty

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-crypto in Ubuntu.
https://bugs.launchpad.net/bugs/1665598

Title:
  python-crypto throws exception ValueError: CTR mode needs counter
  parameter, not IV

Status in OpenStack Charm Test Infra:
  Confirmed
Status in python-crypto package in Ubuntu:
  Confirmed

Bug description:
  We've recently upgraded python-crypto package on 14.04 due to this USN
  https://www.ubuntu.com/usn/usn-3199-1/

  
  apt history log

  ```
  Start-Date: 2017-02-16  23:43:48
  Commandline: apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef dist-upgrade
  Upgrade: bind9-host:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), liblwres90:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), python-crypto:amd64 (2.6.1-4build1, 2.6.1-4ubuntu0.1), libdns100:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), libisccfg90:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), libbind9-90:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), bind9:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), dnsutils:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), bind9utils:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), libisccc90:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13), libisc95:amd64 (9.9.5.dfsg-3ubuntu0.12, 9.9.5.dfsg-3ubuntu0.13)
  End-Date: 2017-02-16  23:43:52
  ```

  Then our python script which uses paramiko failed with this exception

  ```
  Traceback (most recent call last):
    File "/usr/local/nagios/local/lib/python2.7/site-packages/paramiko/transport.py", line 1583, in run
      self.kex_engine.parse_next(ptype, m)
    File "/usr/local/nagios/local/lib/python2.7/site-packages/paramiko/kex_group1.py", line 68, in parse_next
      return self._parse_kexdh_reply(m)
    File "/usr/local/nagios/local/lib/python2.7/site-packages/paramiko/kex_group1.py", line 107, in _parse_kexdh_reply
      self.transport._activate_outbound()
    File "/usr/local/nagios/local/lib/python2.7/site-packages/paramiko/transport.py", line 1881, in _activate_outbound
      engine = self._get_cipher(self.local_cipher, key_out, IV_out)
    File "/usr/local/nagios/local/lib/python2.7/site-packages/paramiko/transport.py", line 1500, in _get_cipher
      return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter)
    File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 94, in new
      return AESCipher(key, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 59, in __init__
      blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
      self._cipher = factory.new(key, *args, **kwargs)
  ValueError: CTR mode needs counter parameter, not IV

  ```

  packages versions

  ```
  pycrypto==2.6.1
  paramiko==1.12.0
  ```

  which works okay BEFORE the upgrade.

  Maybe Debian bug report: https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=850025

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-test-infra/+bug/1665598/+subscriptions



More information about the foundations-bugs mailing list