lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110708.104739.169518036069870432.davem@davemloft.net>
Date:	Fri, 08 Jul 2011 10:47:39 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	mj@....cz
Cc:	netdev@...r.kernel.org
Subject: Re: ipv4: Simplify ARP hash function.

From: Martin Mares <mj@....cz>
Date: Fri, 8 Jul 2011 19:40:55 +0200

> The hash function is linear, so it can be reduced to:
> 
> 	a = key ^ dev->ifindex
> 	return (a >> 8) ^ (a >> 16) ^ (a >> 24)				// (1)
> 	     ^ (hash_rnd >> 8) ^ (hash_rnd >> 16) ^ (hash_rnd >> 24)	// (2)

Is this really the same?  The inclusion of a full 32-bit xor
with hash_rnd before folding was intentional, so that the
final folding occurs on a completely "random" value.

> Where (1) is under control of the attacker and while (2) is not, the
> only effect of (2) is a random permutation on the hash buckets.
> 
> I.e., the attacker can generate arbitrarily long collision chains,
> although he cannot pick the bucket where the collisions happen :)
> 
> Am I right?

Please give an example :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ