FreeBSD : pycrypto -- vulnerable ElGamal key generation (f45c0049-be72-11e1-a284-0023ae8e59f0)

Medium Nessus Plugin ID 59700


The remote FreeBSD host is missing a security-related update.


Dwayne C. Litzenberger of PyCrypto reports :

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.

Anyone using ElGamal keys should generate new keys as soon as practical.

Any additional information about this bug will be tracked at


Update the affected package.

See Also

Plugin Details

Severity: Medium

ID: 59700

File Name: freebsd_pkg_f45c0049be7211e1a2840023ae8e59f0.nasl

Version: $Revision: 1.2 $

Type: local

Published: 2012/06/26

Modified: 2013/06/22

Dependencies: 12634

Risk Information

Risk Factor: Medium


Base Score: 4.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:py-pycrypto, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Patch Publication Date: 2012/06/24

Vulnerability Publication Date: 2012/05/24

Reference Information

CVE: CVE-2012-2417