diff options
author | Sebastian Ramacher <s.ramacher@gmx.at> | 2011-10-10 16:15:40 -0400 |
---|---|---|
committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2011-10-10 16:22:44 -0400 |
commit | 0f79b994837d0bac9023b716d7b3cd8e45d946cf (patch) | |
tree | 6b28a66de9c29b01cd5b7341cecc69a6db6051ad | |
parent | 6f57a84b68987b877817b49e994694884f43aea6 (diff) | |
download | pycrypto-0f79b994837d0bac9023b716d7b3cd8e45d946cf.tar.gz |
fix exception message in Crypto.PublicKey.RSA.generate
Applied patch from Debian python-crypto 2.3-3:
debian/patches/fix-RSA-generate-exception.patch
-rw-r--r-- | lib/Crypto/PublicKey/RSA.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Crypto/PublicKey/RSA.py b/lib/Crypto/PublicKey/RSA.py index 0e0f2a1..41fdae5 100644 --- a/lib/Crypto/PublicKey/RSA.py +++ b/lib/Crypto/PublicKey/RSA.py @@ -222,8 +222,8 @@ class RSAImplementation(object): def generate(self, bits, randfunc=None, progress_func=None): if bits < 1024 or (bits & 0xff) != 0: - # pubkey.getStrongPrime doesn't like anything that's not a multiple of 128 and > 512 - raise ValueError("RSA modulus length must be a multiple of 256 and > 1024") + # pubkey.getStrongPrime doesn't like anything that's not a multiple of 256 and >= 1024 + raise ValueError("RSA modulus length must be a multiple of 256 and >= 1024") rf = self._get_randfunc(randfunc) obj = _RSA.generate_py(bits, rf, progress_func) # TODO: Don't use legacy _RSA module key = self._math.rsa_construct(obj.n, obj.e, obj.d, obj.p, obj.q, obj.u) |