Open msoulier opened 8 years ago
I just stumbled upon this bug in 2.6.1 - turns out it was first reported 4 years ago:
https://bugs.launchpad.net/pycrypto/+bug/996193
While this is clearly a fixed bug in the codebase, the fix (and a host of other fixes and updates since 2.6.1) have not been released yet:
https://github.com/dlitz/pycrypto/commit/af9b41cc4b0a58dd87f56e334a8d478f238f074d
I rebuilt this package from source, pip uninstalled 2.6.1 and installed the one I built. It works normally now.
http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
Section 6.4, page 14.
"For the last block, which may be a partial block of u bits, the most significant u bits of the last output block are used for the exclusive-OR operation; the remaining b-u bits of the last output block are discarded. "
So why is 16 byte multiple input required?
(pycrypt)msoulier@merlin:~$ pip freeze pycrypto==2.6.1