From: Willy Tarreau <willy@w.ods.org>
To: Scott A Crosby <scrosby@cs.rice.edu>
Cc: Willy Tarreau <willy@w.ods.org>, linux-kernel@vger.kernel.org
Subject: Re: Better hash functions (was Re: Route cache performance under stress)
Date: Tue, 8 Apr 2003 11:55:11 +0200 [thread overview]
Message-ID: <20030408095511.GA19428@alpha.home.local> (raw)
In-Reply-To: <oydn0j1nyed.fsf_-_@bert.cs.rice.edu>
> As stated, I was assuming that you masked off the lowest 12 bits and
> used that for the bucket number. This is typical in most code; if your
> function doesn't do that, you should have said so.
OK
> On a P2 benchmark system, hashing one byte at a time this approach
> with 64 bit multiplies and 32-bit modulation operation is just as fast
> as Perl's shift-based hash function.
I agree for recent x86 processors, but older or smaller designs would suffer
from multiply and divide.
> > the initial random, you will not exploit it. That's the whole
> > point. Try to find a generic attack against this part of code, where
> > 0x12345678 is a random number. Perhaps you can, but I couldn't.
>
> Actually, this is relatively strightforward to break.
OK, I agree with your demo, you convinced me.
> Trust me. Find a good universal hash function in the literature and
> use it. I don't know about you, but inventing my own is beyond my
> skill. I already tried it once, in my earlier message, and made a
> mistake; I've already elided out two others I was about to make in
> this message.
well, the only hash function I wrote myself only had to suit my needs, and
didn't have to be resistant to hash attacks. But I agree that the strongest
functions you'll find are those which have been publicly available for years
and still remain uncracked.
Regards,
Willy
prev parent reply other threads:[~2003-04-08 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <oydznn1okqh.fsf@bert.cs.rice.edu>
[not found] ` <20030408050145.GA16516@alpha.home.local>
[not found] ` <oydvfxpo71x.fsf@bert.cs.rice.edu>
[not found] ` <20030408075950.GA18222@alpha.home.local>
2003-04-08 9:15 ` Scott A Crosby
2003-04-08 9:55 ` Willy Tarreau [this message]
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=20030408095511.GA19428@alpha.home.local \
--to=willy@w.ods.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scrosby@cs.rice.edu \
/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®