Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

any met python import paramiko and Crypto err like "Not using mpz_powm_sec."?

OS: redhat 5.2 i386

python: 2.7

err like:

Python 2.7.2 (default, Feb  7 2012, 11:16:30) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
/home/master/local/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
  _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)

it's my libgmp version:

 ldconfig -p |grep libgmp
        libgmpxx.so.3 (libc6, hwcap: 0x0000000004000000) => /usr/lib/sse2/libgmpxx.so.3
        libgmpxx.so.3 (libc6) => /usr/lib/libgmpxx.so.3
        libgmpxx.so (libc6) => /usr/lib/libgmpxx.so
        libgmp.so.3 (libc6, hwcap: 0x0000000004000000) => /usr/lib/sse2/libgmp.so.3
        libgmp.so.3 (libc6) => /usr/lib/libgmp.so.3
        libgmp.so (libc6) => /usr/lib/libgmp.so

all above seems like related to libgmp,that confused me.PLZ show me some suggestion,thx!

like image 368
plutoid2012 Avatar asked Feb 07 '12 06:02

plutoid2012


1 Answers

This is normal - RHEL 5 seems to have GMP version 4.x, and therefore the Python libraries are built against that version.

Rebuild the GMP library from official sources and rebuild your Python after that, if you really want to get rid of the warning.

You could consider upgrading to an more modern OS - EL5 will be EOP by the end of this year. Or at least update your OS to the latest revision (5.7)

like image 61
Kimvais Avatar answered Sep 21 '22 03:09

Kimvais