When generating RSA Key, Process Hangs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

When generating RSA Key, Process Hangs

Mark Kane
Hi everyone. Sorry if this has been asked before, but I tried to search
and didn't come up with much.

This has happened on a few servers I have tried to generate RSA keys on.
The command I am using is:

openssl genrsa -aes256 -rand /dev/urandom -out servername.privkey 4096

On some servers it goes fine and generates pretty quickly. On a few of
them like one I am trying today, I hit enter on that command and it just
sits there. There is no "Generating Key.........+........+++........++"
or whatever the normal output looks like. Just a blank line after my
command.

If I let it run, it seems it would sit there forever. I let another
server run the same command for over an hour and I came back to nothing.
The "servername.privkey" file is also blank if I look at it.

This particular one I'm trying today is on FreeBSD 4.9-RELEASE running
OpenSSL 0.9.7c. Others have been running on Linux and some have had the
same result.

Thanks in advance.

-Mark
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: When generating RSA Key, Process Hangs

Mark Kane
Mark Kane wrote:

> Hi everyone. Sorry if this has been asked before, but I tried to search
> and didn't come up with much.
>
> This has happened on a few servers I have tried to generate RSA keys on.
> The command I am using is:
>
> openssl genrsa -aes256 -rand /dev/urandom -out servername.privkey 4096
>
> On some servers it goes fine and generates pretty quickly. On a few of
> them like one I am trying today, I hit enter on that command and it just
> sits there. There is no "Generating Key.........+........+++........++"
> or whatever the normal output looks like. Just a blank line after my
> command.
>
> If I let it run, it seems it would sit there forever. I let another
> server run the same command for over an hour and I came back to nothing.
> The "servername.privkey" file is also blank if I look at it.
>
> This particular one I'm trying today is on FreeBSD 4.9-RELEASE running
> OpenSSL 0.9.7c. Others have been running on Linux and some have had the
> same result.
>
> Thanks in advance.
>
> -Mark

Hmm, tried with /dev/random and it worked.

-Mark
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: When generating RSA Key, Process Hangs

Dr. Stephen Henson
In reply to this post by Mark Kane
On Sun, Aug 28, 2005, Mark Kane wrote:

> Hi everyone. Sorry if this has been asked before, but I tried to search
> and didn't come up with much.
>
> This has happened on a few servers I have tried to generate RSA keys on.
> The command I am using is:
>
> openssl genrsa -aes256 -rand /dev/urandom -out servername.privkey 4096
>

Don't include that -rand /dev/urandom option because it may block forever. If
/dev/random, /dev/urandom exists OpenSSL should use it automatically without
blocking.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]