Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Nov 06, 2011 7:59 pm 
Offline
Newbie

Joined: Wed Oct 05, 2011 8:46 pm
Posts: 4
I ran gpg --gen-key on my server, and it has amounted to nothing after more than an hour.

Is there not enough entropy on a Linode 768 to generate a GPG key?

Can't seem to make this work.


Last edited by Lime on Fri Feb 24, 2012 6:44 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 5:33 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
I just gave it a whirl and it sat there saying not enough random bytes available (this is a near idle linode 512), I dumped a 800mb MySQL database and after around 200mb it finished creating the key.

So in answer to your question, no there probably isn't enough entropy on a server (mainly due to the lack of a keyboard and mouse), do some sort of heavy disk usage action while generating the key and it should generate.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Mon Nov 07, 2011 5:33 am 
Offline
Junior Member

Joined: Thu Jan 07, 2010 8:12 pm
Posts: 21
Lime wrote:
I must've looked like a real genius there at my workdesk, banging away at my keyboard for 1-2 minutes straight, intermittently for all that time.

I don't think that method is going to work with a remote server. Open up another window and try something like
Code:
du /


Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 12:15 pm 
Offline
Newbie

Joined: Wed Oct 05, 2011 8:46 pm
Posts: 4
Thanks for the advice. This is on a new server, so I have no DB to mess with. I have 5 screen sessions open, 4 of which are running top, rotating in cat /dev/urandom sometimes. I was running du / but that didn't seem to be taxing enough. Are there any other commands that are particularly good in this case?

edit: now have 25 screen sessions open, some running top, others running "du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du / && du /". Anyone have recommendations?


Last edited by Lime on Mon Nov 07, 2011 12:22 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 12:22 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
running cat on /dev/urandom will use up entropy, try running something like tar -cf /root/tmp.tar /usr that will tar your entire /usr directory into /root/tmp.tar which you can delete afterwards, that should be big enough to create enough entropy

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 12:30 pm 
Offline
Newbie

Joined: Wed Oct 05, 2011 8:46 pm
Posts: 4
Thanks obs. Looks like the tar command did it.


Top
   
 Post subject:
PostPosted: Mon Nov 07, 2011 1:30 pm 
Offline
Senior Member

Joined: Mon Dec 20, 2010 11:37 pm
Posts: 76
There is a Debian package to get enough entropy.
http://www.howtoforge.com/helping-the-random-number-generator-to-gain-enough-entropy-with-rng-tools-debian-lenny
It's a daemon, so I will uninstall it after generating GPG Keys.

Of course, source code is available: http://sourceforge.net/projects/gkernel/


Top
   
 Post subject:
PostPosted: Wed Nov 09, 2011 8:28 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Ivy Bridge has a DRNG that can pull in 2-3 Gbps of high quality entropy, I think we'll see this problem (limited entropy in cloud hosting environments) go away once cloud hosts have moved to Xeons based on Ivy Bridge or newer.


Top
   
 Post subject:
PostPosted: Wed Nov 09, 2011 10:31 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
drpks wrote:

Recycling /dev/urandom might be good enough for running self-signed SSL certs on hobby sites, but it's nowhere near secure enough for generating GPG keys.

Also, rng knows when you're trying to feed it with low-quality pseudorandom bits. It will usually refuse to use such sources until enough entropy is collected by some other means.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group