Login problem: "IV must be 16 bytes long"

Asked by poy

Hi,

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.

Thanks

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
    authorization_engine.unique_consumer_id)
  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

Language:
English Edit question
Status:
Answered
For:
Ubuntu python-launchpadlib Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

i suggest you report a bug

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

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.
https://www.dlitz.net/software/pycrypto/api/current/Crypto.Cipher.AES-module.html#new

Revision history for this message
poy (poy) said :
#3

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.