Add rc.conf variables to control host key length

J. Hellenthal jhellenthal at dataix.net
Sun Jun 24 18:52:22 UTC 2012



On Sun, Jun 24, 2012 at 02:26:02PM -0400, Robert Simmons wrote:
> On Sun, Jun 24, 2012 at 2:15 PM, J. Hellenthal <jhellenthal at dataix.net> wrote:
> > On Sun, Jun 24, 2012 at 01:26:21PM -0400, Robert Simmons wrote:
> >> On Sun, Jun 24, 2012 at 12:59 PM, J. Hellenthal <jhellenthal at dataix.net> wrote:
> >> > These are more then sufficient for any normal ssh use.
> >>
> >> I'm sorry if I sound rude, but I wanted to have a bit more of a
> >> substantive discussion than quoting the man pages.  Especially since
> >> what you are quoting dates back to a change to
> >> src/crypto/openssh/ssh-keygen.1 dated the following:
> >> Sun Sep 11 16:50:35 2005 UTC (6 years, 9 months ago) by des
> >>
> >> Being that the old "considered sufficient" of 1024 was added at the
> >> following revision date:
> >> Thu Feb 24 14:29:46 2000 UTC (12 years, 4 months ago) by markm
> >>
> >
> > There is nothing stopping you from changing a key after the system has
> > booted e.g. by using the rc script itself if you feel it is not
> > sufficient.
> 
> Almost.  If you use /etc/rc.d/ssh keygen all you will get is the
> default sizes again.  If you apply the patches I've suggested earlier,
> this can be used to change the keys to your liking.  As I said, my
> patches don't change the default, they just add knobs to rc.conf that
> allow /etc/rc.d/ssh keygen to work as someone would want it to work if
> they want different key sizes.
> 
> > Given OpenBSD is usually always on the far safe side of things taking
> > the security approach before simplicity I would extremely agree that it
> > is more than sufficient.
> >
> > But then again what is good for the masses it not always good enough for
> > the security paranoid and giving credit to such is what keeps everyone
> > safe.
> >
> > ( /usr/local/etc/rc.d/openssh keygen ) # regenerate your keys
> >
> > Which should generate a new set of keys, keeping you safe for another X
> > amount of years.
> >
> >  - or -
> >
> > ssh-keygen -f rsa -b [NNNN] -f /usr/local/etc/ssh/ssh_host_rsa_key
> 
> See above.  I've included patches that simplify this.
> 
> > But the intitial key being the default? its sufficient to get you in and
> > started on a remote system.
> >
> >> I would say that we are exactly due for a real discussion as to what
> >> should be considered sufficient with regards to modern processors and
> >> GPUs.
> >
> > Unfortunately I see that as a different thread "Hardware potential to
> > duplicate existing host keys... RSA DSA ECDSA"
> 
> I see it as related directly to why or why not 2048 is sufficient.
> 
> Do you have an argument for the 2048 default based on something more
> than OpenBSD does it?

Sure

With a key of length n bits, there are 2^n possible keys. This number
grows very rapidly as n increases. Moore's law suggests that computing
power doubles roughly every 18 to 24 months, but even this doubling
effect leaves the larger symmetric key lengths currently considered
acceptable well out of reach. The large number of operations (2^128)
required to try all possible 128-bit keys is widely considered to be out
of reach for conventional digital computing techniques for the
foreseeable future.

http://en.wikipedia.org/wiki/Key_size

2048 is well more than efficient. Speaking soley for RSA in that matter.

It would be easier to steal the hostkey than it would be to crack it.

-- 

 - (2^(N-1))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-security/attachments/20120624/52967472/attachment.pgp


More information about the freebsd-security mailing list