You are not logged in.

#1 2018-01-17 22:43:10

bigoten
Member
Registered: 2018-01-17
Posts: 13

gpg and entropy

I am trying to create a gpg key using the command

gpg2 --full-gen-key

The procedure always hangs indefinitely at the following point:

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

What I tried:

  • Checked the available entropy: Running

    cat /proc/sys/kernel/random/entropy_avail

    gives me as a result 3652. It's more than enough.

  • Try a couple of pseudorandom number generators. I tried both Haveged and rng-tools, to no avail. I think I did things well (i.e., I installed started and enabled the services, checked they were running, and then retried to create a gpg key).

So I am at a complete loss here. Anyone has good suggestions?

Thanks in advance,
bigoten

Last edited by bigoten (2018-01-17 22:44:35)

Offline

#2 2018-01-17 22:46:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: gpg and entropy

Were you doing anything to actually generate entropy, like cat'ing files or something?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-01-17 23:51:49

bigoten
Member
Registered: 2018-01-17
Posts: 13

Re: gpg and entropy

Humm, I was working (using Anki) and browsing the internet. So mouse and keyboard were regularly used, disk only on occasion I suppose.
What would you suggest, specifically?

Last edited by bigoten (2018-01-17 23:52:55)

Offline

#4 2018-01-18 00:33:40

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: gpg and entropy

I run the haveged daemon. It is in the Arch repositories.

Tim

Offline

#5 2018-01-18 06:29:53

bigoten
Member
Registered: 2018-01-17
Posts: 13

Re: gpg and entropy

As I said in my OP, I already tried that. It did not work.

Offline

#6 2018-01-18 15:35:38

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: gpg and entropy

Sorry. I have never had a problem with entropy since I started running it.

Tim

Offline

#7 2018-01-18 15:52:24

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: gpg and entropy

bigoten wrote:

Humm, I was working (using Anki) and browsing the internet. So mouse and keyboard were regularly used, disk only on occasion I suppose.
What would you suggest, specifically?

Do some IO heavy things, and also move the mouse around madly.

By the way, what are the options that you are selecting for the key generation?

Offline

#8 2018-01-18 23:48:46

bigoten
Member
Registered: 2018-01-17
Posts: 13

Re: gpg and entropy

I used all default options (RSA, 2048, key does not expire).

I tried for over 10 min, moving the mouse and transferring files in the disk like crazy. Nothing at all, always stuck.

What am I still missing?

Offline

#9 2018-01-19 14:18:19

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: gpg and entropy

It might be a bug or something very peculiar with your system. Just to clarify, the process always hangs right? If there's not enough entropy, gpg should whine about the lack of it.

Edit: Have you tried checking the entropy levels when the key generation hangs?

Last edited by x33a (2018-01-19 14:22:49)

Offline

#10 2018-01-23 23:47:09

bigoten
Member
Registered: 2018-01-17
Posts: 13

Re: gpg and entropy

Yes, the process always hanged in spite of the fact that I had entropy (apparently).

At the end I had to give up. I formatted my disk (after 7 years!). After reinstalling Arch it worked as advertised.

Thank you all for trying to help.

Last edited by bigoten (2018-01-23 23:47:43)

Offline

Board footer

Powered by FluxBB