Bug 825162 (CVE-2012-2417) - CVE-2012-2417 python-crypto: Insecure ElGamal key generation
Summary: CVE-2012-2417 python-crypto: Insecure ElGamal key generation
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2012-2417
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 825164 825165
Blocks: 825178
TreeView+ depends on / blocked
 
Reported: 2012-05-25 09:30 UTC by Jan Lieskovsky
Modified: 2019-09-29 12:53 UTC (History)
4 users (show)

Fixed In Version: PyCrypto 2.6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-10 10:58:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Lieskovsky 2012-05-25 09:30:34 UTC
A security flaw was found in the implementation of ElGamal algorithm of python-crypto, a cryptography library for Python language, in the way how random number 'g' was generated (from the OSS post [1]):

     In the ElGamal schemes (for both encryption and signatures), g is
     supposed to be the generator of the entire Z^*_p group. However, in
     PyCrypto 2.5 and earlier, g is more simply the generator of a random
     sub-group of Z^*_p.

     The result is that the signature space (when the key is used for
     signing) or the public key space (when the key is used for encryption)
     may be greatly reduced from its expected size of log(p) bits, possibly
     down to 1 bit (the worst case if the order of g is 2).

     While it has not been confirmed, it has also been suggested that an
     attacker might be able to use this fact to determine the private key.

References:
[1] http://www.openwall.com/lists/oss-security/2012/05/25/1
[2] https://bugs.launchpad.net/pycrypto/+bug/985164
[3] https://www.dlitz.net/blog/2012/05/pycrypto-2-6-released/
[4] https://secunia.com/advisories/49263/

Upstream patch:
[5] https://github.com/Legrandin/pycrypto/commit/9f912f13df99ad3421eff360d6a62d7dbec755c2

Comment 1 Jan Lieskovsky 2012-05-25 09:32:59 UTC
This issue affects the version of the python-crypto package, as shipped
with Red Hat Enterprise Linux 6.

--

This issue affects the versions of the python-crypto package, as shipped with Fedora release of 15 and 16. Please schedule an update.

--

This issue affects the version of the python-crypto package, as shipped with Fedora EPEL 5. Please schedule an update.

Comment 2 Jan Lieskovsky 2012-05-25 09:34:14 UTC
Created python-crypto tracking bugs for this issue

Affects: fedora-all [bug 825164]
Affects: epel-5 [bug 825165]

Comment 5 Fedora Update System 2012-06-03 00:00:51 UTC
python-crypto-2.6-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-06-03 23:28:01 UTC
python-crypto-2.3-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-06-03 23:34:22 UTC
python-crypto-2.3-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-06-12 16:35:08 UTC
python-crypto-2.0.1-5.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Paul Howarth 2012-06-19 17:51:43 UTC
Updates now stable for all current Fedora and EPEL releases.


Note You need to log in before you can comment on or make changes to this bug.