[Cryptography] Entropy Needed for SSH Keys?

Tom Mitchell mitch at niftyegg.com
Mon May 23 20:29:15 EDT 2016


On Sun, May 22, 2016 at 6:18 PM, Kent Borg <kentborg at borg.org> wrote:

>
> Let me try my own experiment:
>
>   # strace ssh-keygen -t rsa

....

>   read(3,
> "\255J\373\231\323\256\251^\314\207MqkC\332\222^\352\275\307\373\351bM\267\273\260$G\232\301\r",
> 32) = 32
>   close(3)                                = 0
>   [...]
>
> (Was I supposed to say "dsa"? Okay...tried that too, same result.)
>
.....

> Looks to me like it read 256-bits. I would have expected it would have
> read more, just to waste if nothing else.
> No where near using up 4096-bits (if "using up" even is real). Maybe do
> both DSA and RSA? It still would only "use" 1/8 of a 4096-bit pool.



Since the read()  returns the count a solution is for the process to sleep
some reasonable rand() seconds or nanosleep() do some math to know
how many more to request then request more bits.

As others have noted this is a known issue yet it is not a common
computation.   Where it might be common other tricks can leverage modest
entropy bit counts returned by the read. And if both common and important
additional hardware and local services makes sense.


-- 
  T o m    M i t c h e l l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20160523/68291b08/attachment.html>


More information about the cryptography mailing list