Article View: news.software.nntp
Article #86518Re: NNTP article headers sequence
From: Russ Allbery
Date: Thu, 09 Apr 2015 03:57
Date: Thu, 09 Apr 2015 03:57
24 lines
2394 bytes
2394 bytes
Doc O'Leary <droleary@2usenet2014.subsume.com> writes:
> It might not be “guaranteed”, but I think you’ll find that the
> implementation of most hash tables is generally going to return keys in
> the same order for any hash that had all the same keys inserted in the
> same order.
That used to be the case, and then security researchers uncovered a lot of
interesting denial of service attacks that can be launched against any
program that has that property. (The short version is that hashing
algorithms always have distribution issues, and if you know what keys that
algorithm has trouble with and some control over what's being hashed, you
can reduce a lot of hashes to effectively a linked list.)
As a result, at least most scripting languages (Perl, Python, PHP, etc.)
have implemented hash randomization, so you'll now get keys out in a
different order each time you run the program. Good hash libraries are
likely to follow suite for the same reason.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<87y4m22btz.fsf@hope.eyrie.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!.POSTED!not-for-mailReferences:
<mg2271$o60$1@news.mixmin.net> <87d23fe3nx.fsf@hope.eyrie.org> <mg273j$33l$1@news.mixmin.net> <mg3dj8$m5k$1@dont-email.me> <mg44hq$eeu$1@news.mixmin.net> <mg4ogm$nff$1@dont-email.me>Show Full Headers
Complete Article Headers
Message-ID: <87y4m22btz.fsf@hope.eyrie.org> Subject: Re: NNTP article headers sequence Date: Wed, 08 Apr 2015 20:57:12 -0700 From: Russ Allbery <eagle@eyrie.org> References: <mg2271$o60$1@news.mixmin.net> <87d23fe3nx.fsf@hope.eyrie.org> <mg273j$33l$1@news.mixmin.net> <mg3dj8$m5k$1@dont-email.me> <mg44hq$eeu$1@news.mixmin.net> <mg4ogm$nff$1@dont-email.me> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!.POSTED!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 24 NNTP-Posting-Host: lothlorien.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: usenet-its.stanford.edu 1428551832 24225 68.65.164.14 (9 Apr 2015 X-Complaints-To: news@usenet-its.stanford.edu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:rpvYEDB19RAJkBB2xN2K1K+sH2Q=