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"
Created attachment 294497 [details, diff] ebuild patch and files/pycrypto-2.3-gmp.patch in sequence
You can use dev-python/pycrypto-2.4.1, which has been available in Progress Overlay since 2011-11-05.
This bug is not present in 2.4.1, which i have just added to tree. Just wait for it's stabilization.