mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: linux@horizon.com
Cc: mpm@selenic.com, dan@doxpara.com, gerrit@erg.abdn.ac.uk,
	herbert@gondor.hengli.com.au, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, w@1wt.eu
Subject: Re: [PATCH 0/2] Improve sequence number generation.
Date: Sat, 20 Aug 2011 16:44:36 -0700 (PDT)	[thread overview]
Message-ID: <20110820.164436.684817976385970137.davem@davemloft.net> (raw)
In-Reply-To: <20110820233951.6428.qmail@science.horizon.com>

From: "George Spelvin" <linux@horizon.com>
Date: 20 Aug 2011 19:39:51 -0400

> While the increase to 32 bits is definitely desirable, and defends
> against a much less sophisticated attack, I'm concerned that this is a
> case of robbing Peter to pay Paul.

I disagree, attacking this random number selection is much more theoretical
than the brute force attacks possible on 24-bits of entropy.

Show me a usable attack on a real system, then we can talk.

By comparison, real attacks against the 24-bit value have been
demonstrated.

> 2) Do *both*: Use a fixed 32-bit offset *plus* a time-varing one.
>    They can be added together and provide the security advantages of
>    both.  The only cost is having to compute two hashes per SYN.
> 
>    The main problem here is coming up with a hash function fast enough
>    that computing both hashes is no slower than one MD5 invocation.

Doubling the hashing cost is a non-starter.   Going to MD5 itself was
a huge lose, and was right at the brink of acceptable performance loss.

This whole change was nearly nixed because of the cost introduced
merely by going to MD5.

> 3) Extend the 24-bit time-varying hash to a 28-bit one.
>    This can cause the sequence numbers to wrap in 7/8 of the time
>    they would with a fixed offset, but that doesn't seem too bad.
>    (That's worst case; it's a triangular distribution centered
>    on 15/16.)

I want to stay with a 32-bits of entropy, thank you very much.

  reply	other threads:[~2011-08-20 23:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110816.021031.1778295949152117484.davem@davemloft.net>
2011-08-16 10:30 ` get_random_int() should use hash[1] George Spelvin
2011-08-20 23:39   ` [PATCH 0/2] Improve sequence number generation George Spelvin
2011-08-20 23:44     ` David Miller [this message]
2011-08-21  0:49       ` George Spelvin
2011-08-21  1:28     ` Willy Tarreau
2011-08-21  3:04       ` George Spelvin
2011-08-21  3:27         ` Ted Ts'o
2011-08-21  4:02           ` Herbert Xu
2011-08-22  2:06           ` George Spelvin
2011-08-07  1:50 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110820.164436.684817976385970137.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dan@doxpara.com \
    --cc=gerrit@erg.abdn.ac.uk \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mpm@selenic.com \
    --cc=netdev@vger.kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®