Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 362763

Summary: dev-python/pycrypto-2.3: Import key code is not compatible with GMP library
Product: Gentoo Linux Reporter: Pavel Labushev <pavel.labushev>
Component: [OLD] LibraryAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: normal CC: barzog
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.launchpad.net/pycrypto/+bug/702835
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild patch and files/pycrypto-2.3-gmp.patch in sequence

Description Pavel Labushev 2011-04-09 19:15:37 UTC
Keys imported with RSA.importKey() won't decrypt/sign correctly if the GMP library is installed. See the upstream bug for details and the fix:
https://bugs.launchpad.net/pycrypto/+bug/702835

Reproducible: Always

Steps to Reproduce:
1. $ openssl genrsa > private.key 2>/dev/null
2. $ python -c 'from Crypto.PublicKey import RSA; key = RSA.importKey(open("private.key", "rb").read()); print key.verify("asdf", key.sign("asdf", ""))'
3. The printed value should be True instead of False.
Actual Results:  
Printed "False"

Expected Results:  
Expected "True"
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2011-12-02 10:42:02 UTC
Created attachment 294497 [details, diff]
ebuild patch and files/pycrypto-2.3-gmp.patch in sequence
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-12-06 03:11:00 UTC
You can use dev-python/pycrypto-2.4.1, which has been available in Progress Overlay since 2011-11-05.
Comment 3 Maxim Koltsov (RETIRED) gentoo-dev 2011-12-17 09:03:27 UTC
This bug is not present in 2.4.1, which i have just added to tree. Just wait for it's stabilization.