[pycrypto] Bug in PyCrypto 2.6.1

Luis González Fernández luisgf at luisgf.es
Sun Nov 30 23:35:56 PST 2014


Hello All:


I found a strange bug in size() function that return a wrong key size
after creating or importing an RSA key. The return value for the size
funciont seems to be keysize-1.

Here a demo of the bug:


luisgf at NCC1701B:~$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from Crypto.PublicKey import RSA
>>> key = RSA.generate(2048)
>>> key.size()
2047
>>>


Regards.

-- 

--
Luis González Fernández
https://www.luisgf.es
PGP ID: C918B80F (DD6F BFC1 FC14 4C81 34F8 EA1E 6BCB C27F C918 B80F)
Twitter: @luisgf_2001 / Jabber: luisgf at mijabber.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dlitz.net/pipermail/pycrypto/attachments/20141201/82202087/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.dlitz.net/pipermail/pycrypto/attachments/20141201/82202087/attachment.sig>


More information about the pycrypto mailing list