pycrypto ARC2.new rejects effective_keylen parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
New
|
Undecided
|
Unassigned |
Bug Description
A bug report for pyCrypto 2.6.1.
When I issue:
arc2 = ARC2.new(self.key, mode=ARC2.MODE_CBC, effective_
to decrypt or encrypt, the system complains that:
'effective_keylen' is an invalid keyword argument for this function
It doesn't happen with pyCrypto 2.5.0
I tried to look in the code.
There are three ARC2 files.
ARC2.py, ARC2.so, _ARC2.so
Looking at the comments for the ARC2.py module, I see that it does expect the effective_keylen,
and if I rename the ARC2.so, so for the system to use ARC2.py, it doesn't complain at this stage (it complains somewhere else - about a wrong IV which is probably related to the _ARC2.so module). So the ARC2.so seems to be inconsistent with ARC2.py + _ARC2.so. It seems like a bug (the source and library inconsistency) - at least the comment is inconsistent with the behavior, and I couldn't find a proper documentation for that.
I can't exactly reproduce this. What is self.key in your example?
One odd thing that strikes me is that you don't pass an IV parameter, but that is absolutely required for CBC mode.