[ pycrypto-Bugs-1835426 ] Unable to create new AES cipher with 32-byte IV
"SourceForge.net" <[email protected]> Thu, 10 Jan 2008 08:55:31 -0800
| Newsgroups | gmane.comp.python.cryptography.cvs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1835426, was opened at 2007-11-20 16:35
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1835426&group_id=20937
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unable to create new AES cipher with 32-byte IV
Initial Comment:
class MyCipher:
def __init__(self):
self.key = '01234567890123456789012345678901'
self.iv = '01234567890123456789012345678901'
self.cipher = AES.new(self.key, AES.MODE_CBC, self.iv)
def encrypt(self,id):
return cipher.encrypt(id)
cipher = MyCipher()
cipher.encrypt('foo');
Gives me the error:
ValueError: IV must be 16 bytes long
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2008-01-10 11:55
Message:
Logged In: YES
user_id=11375
Originator: NO
The block size of AES is always 16 bytes, so the IV must also always be 16
bytes.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1835426&group_id=20937
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace