Entropy (“randomness”) is accumulated in the kernel. If the kernel has accumulated enough entropy before GPG starts, GPG benefits from it immediately.
Linux's handling of entropy is somewhat broken. Linux has two devices: /dev/random
and /dev/urandom
. /dev/random
blocks for as long as it takes to accumulate sufficient entropy. /dev/urandom
always returns data without blocking. In principle, this would be a good thing. The problem is that Linux's entropy calculation is extremely conservative: it assumes that entropy gets used up, which is only true in a highly theoretical sense. So /dev/random
tends to block when it shouldn't.
On a normal system, you should just use /dev/urandom
— though some software, including gpg, doesn't give you a choice. However, on a live CD, immediately after boot, there may be very little entropy, unless your computer has a hardware RNG (such as the RdRand instruction on recent Intel processors) and Linux supports it. So in this case you do need to use /dev/random
and wait if necessary. User interaction (e.g. moving the mouse) will contribute to this entropy.
See also Adding "random number entropy" for GPG keys? and Can you explain the entropy estimate used in random.c
Again, you don't need to worry: GPG+Linux is very conservative when it comes to estimating entropy. If GPG generates a key quickly, either you've already interacted enough with the computer to provide enough entropy, or your computer has a supported hardware RNG.