<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-10-25 23:18 GMT+02:00 Theodore Ts'o <span dir="ltr"><<a href="mailto:tytso@mit.edu" target="_blank">tytso@mit.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Oct 25, 2014 at 12:40:20AM +0200, Hanno Böck wrote:<br>
> > ><br>
> > > Most SSH keys are generated on first-time boot.<br>
> ><br>
> > This is dumb.<br>
> ><br>
> > This is bad design.<br>
><br>
> Do you have a smart alternative? What should these devices do? Pre-load<br>
> them with a key? (I don't particularly like that idea) Tell users they<br>
> need to generate a key on their Desktop for their new Internet of Things<br>
> light switch?<br>
<br>
</span>You wait until the first time someone tries to connect to the ssh<br>
port, and generate the ssh key in a just-in-time fashion.<br></blockquote></div><br>How much time is considered not "first time boot"? I mean, init runs, and that's the real first time boot thingy. Everything after is already started with delay (and usually sequentially... talk about bad design..). How much delay is required? Why not delay first time generation by twice that? Doesn't /dev/random block until sufficient entropy is delivered? If not, that's asking for trouble.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Maybe I'm missing something, but isn't this discussion at once really involved (sshd) and really generic (entropy collection best practice)? I rather like thinking and solving problems like these, but I'm not even sure which is really the matter here. I thought it was about "Lol get randomness here".</div><div class="gmail_extra"><br></div><div class="gmail_extra">Boottime resource starvation is inevitable, but not the application layer's fault. So let's just focus on making /dev/*** work unbreakably, it fixes everything.</div></div>