On Wed, Mar 24, 2004 at 11:35:34AM +0800, linux guy wrote:
> openssl's genrsa can't do this work,any other tool to do this work?

If you must,

Python 2.3.3 (#2, Mar  7 2004, 15:57:59) 
[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> from M2Crypto import RSA
>>> import pydoc
>>> pydoc.help('RSA.gen_key')
Help on function gen_key in RSA:

RSA.gen_key = gen_key(bits, e, callback=<function keygen_callback>)
    Factory function that generates an RSA key pair and instantiates 
    an RSA object from it.
    
    _bits_ is the key length in bits.
    
    _e_ is the value for e, the RSA public exponent.
    
    (Optional) _callback_ is a Python callback object that will be
    invoked during key generation; its usual purpose is to provide visual
    feedback.

>>>  x = RSA.gen_key(128, 65537)
..+++++++++++++++++++++++++++
..+++++++++++++++++++++++++++
>>> len(x)
128

But like Rich said, this is not sensible.


-- 
Ng Pheng Siong <[EMAIL PROTECTED]> 

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to