blob: 118ebc791181897391a2a8d5662c6fbb1119fe14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<tt>
<html><br>
<head><br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><br>
</head><br>
<body bgcolor="#FFFFFF" text="#000000"><br>
<tt>Hello All:</tt><tt><br><br>
</tt><tt><br><br>
</tt><tt><br><br>
</tt><tt>I found a </tt><tt>strange bug in size() function that<br>
return a wrong key size after creating or importing an RSA key.<br>
The return value for the size funciont seems to be keysize-1.<br><br>
<br><br>
Here a demo of the bug:<br><br>
<br><br>
</tt><tt><br><br>
</tt><tt><font color="#000099">luisgf@NCC1701B:~$ python3<br><br>
Python 3.4.0 (default, Apr 11 2014, 13:05:11) <br><br>
[GCC 4.8.2] on linux<br><br>
Type "help", "copyright", "credits" or "license" for more<br>
information.<br><br>
>>> from Crypto.PublicKey import RSA<br><br>
>>> key = RSA.generate(2048)<br><br>
>>> key.size()<br><br>
2047<br><br>
>>> </font><br><br>
<br><br>
<br><br>
Regards.<br><br>
</tt><br>
<pre class="moz-signature" cols="72">-- <br>
<br>
--<br>
Luis González Fernández<br>
<a class="moz-txt-link-freetext" href="https://www.luisgf.es">https://www.luisgf.es</a><br>
PGP ID: C918B80F (DD6F BFC1 FC14 4C81 34F8 EA1E 6BCB C27F C918 B80F)<br>
Twitter: @luisgf_2001 / Jabber: <a class="moz-txt-link-abbreviated" href="mailto:luisgf@mijabber.es">luisgf@mijabber.es</a></pre><br>
</body><br>
</html><br>
</tt>
|