Login problem: "IV must be 16 bytes long"

Asked by poy


I have been using launchpadlib on Windows via Cygwin to execute a few utility scripts. They have been running fine for several years; but they are now failing when authenticating with the following error: "IV must be 16 bytes long".

I haven't fiddled with launchpadlib for quite some time so I would like hints on where to look in order to fix this.


Here is a complete trace:
Traceback (most recent call last):
  File "/home/Administrator/launchpadlib/upload.py", line 79, in <module>
    launchpad = Launchpad.login_with('Release creation script', service_root)
  File "/usr/lib/python2.6/site-packages/launchpadlib-1.9.3-py2.6.egg/launchpadlib/launchpad.py", line 517, in login_with
  File "/usr/lib/python2.6/site-packages/launchpadlib-1.9.3-py2.6.egg/launchpadlib/credentials.py", line 273, in load
    return self.do_load(unique_key)
  File "/usr/lib/python2.6/site-packages/launchpadlib-1.9.3-py2.6.egg/launchpadlib/credentials.py", line 320, in do_load
    'launchpadlib', unique_key)
  File "/usr/lib/python2.6/site-packages/keyring-0.5.1-py2.6.egg/keyring/core.py", line 30, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib/python2.6/site-packages/keyring-0.5.1-py2.6.egg/keyring/backend.py", line 265, in get_password
    password = self.decrypt(password_encrypted)
  File "/usr/lib/python2.6/site-packages/keyring-0.5.1-py2.6.egg/keyring/backend.py", line 429, in decrypt
    crypter = self._init_crypter()
  File "/usr/lib/python2.6/site-packages/keyring-0.5.1-py2.6.egg/keyring/backend.py", line 418, in _init_crypter
    return AES.new(password, AES.MODE_CFB)
  File "/usr/lib/python2.6/site-packages/Crypto/Cipher/AES.py", line 95, in new
    return AESCipher(key, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/Crypto/Cipher/AES.py", line 59, in __init__
    blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
    self._cipher = factory.new(key, *args, **kwargs)
ValueError: IV must be 16 bytes long

Question information

English Edit question
Ubuntu python-launchpadlib Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

i suggest you report a bug

Revision history for this message
Thomas Kr├╝ger (thkrueger) said :

If you want to use the CFB mode, you have to supply the parameter "IV" to the new() function.
It has to be a 16byte long binary string.

Revision history for this message
poy (poy) said :

Thanks. Unfortunately, these calls are buried deep inside launchpadlib; I don't think I should modify them. I'm going to open a bug.

Can you help with this problem?

Provide an answer of your own, or ask poy for more information if necessary.

To post a message you must log in.