[pycrypto] reusing private key for sign or decryption

Dwayne C. Litzenberger dlitz at dlitz.net
Tue Mar 31 05:44:34 CST 2009


On Mon, Mar 30, 2009 at 11:40:53AM +0300, Tzury Bar Yochay wrote:
>Hi,
>
>I found that there is RSAobj.has_private but not RSAobj.set_private nor
>.RSAobj.set_private
>
>Am I suppose to assign 'd' and 'n' manually?

Use RSA.construct, which has the following signature:

     construct(n, e, d=None, p=None, q=None, u=None)

-- 
Dwayne C. Litzenberger <dlitz at dlitz.net>
  Key-signing key   - 19E1 1FE8 B3CF F273 ED17  4A24 928C EC13 39C2 5CF7
  Annual key (2008) - 4B2A FD82 FC7D 9E38 38D9  179F 1C11 B877 E780 4B45


More information about the pycrypto mailing list