Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm currently generating a new gpg cryptographic key, and I'm using a new laptop for this. I can notice that the key generation step, which involves the random generation, is extremely quick, while I can recall that, on my old laptop, this process required a certain amount of time.

For a normal operation this should be reasonable, as I'm working on a more recent computer, but for this operation I would expect that much more time is needed. The software asks me to "type on the keyboard, move the mouse, utilize the disks", but everything terminates before I can do anything.

Yes, probably there's some other source of entropy besides the user input, and I don't know which one are taken in account by the kernel. But to be sincere, in the light of the recent revelations about global surveliance, I became even more paranoid, and the idea that my brand new laptop could be tampered by design to yield weak random cyphers popped out of my mind.

So the question is: is it safer to generate the keys using old hardware?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

New laptop, new software. For proper randomness, enough entropy must be gathered from hardware events, but nothing forces this gathering not to begin before the launch of the key generation process. In modern operating systems, the OS kernel is the piece of software which gathers hardware-related data, and it centralizes this process. Once sufficiently much entropy has been gathered (roughly speaking, at least 128 bits), it suffices to extend it with cryptographically secure PRNG, and you will get randomness by the megabyte (at least, pseudorandomness computationally indistinguishable from true randomness, and that's good enough for cryptography).

In Linux terms, this is the difference between /dev/random and /dev/urandom. Possibly, the OS and GnuPG version you have on your new laptop do the sensible thing and use /dev/urandom, while the previous version indulged in some weird but widespread randomness fetish and irrationally insisted on "true randomness" for some notion of "true".

Be assured that if your laptop hardware and software had been tampered with, you would not notice it with something as crude as faster key generation. Competent spies know better.

share|improve this answer
    
"Competent spies know better." This may very well prove false. ;) –  Terry Chia Jul 28 '13 at 13:55
    
@TerryChia But would we still call them competent then? –  Luc Jul 28 '13 at 16:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.