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] [day] [month] [year] [list]
Date:	Fri, 03 Apr 2015 12:52:54 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	alexander.h.duyck@...hat.com
Cc:	netdev@...r.kernel.org
Subject: Re: [net-next PATCH] jhash: Update jhash_[321]words functions to
 use correct initval

From: Alexander Duyck <alexander.h.duyck@...hat.com>
Date: Tue, 31 Mar 2015 14:19:10 -0700

> Looking over the implementation for jhash2 and comparing it to jhash_3words
> I realized that the two hashes were in fact very different.  Doing a bit of
> digging led me to "The new jhash implementation" in which lookup2 was
> supposed to have been replaced with lookup3.
> 
> In reviewing the patch I noticed that jhash2 had originally initialized a
> and b to JHASH_GOLDENRATIO and c to initval, but after the patch a, b, and
> c were initialized to initval + (length << 2) + JHASH_INITVAL.  However the
> changes in jhash_3words simply replaced the initialization of a and b with
> JHASH_INITVAL.
> 
> This change corrects what I believe was an oversight so that a, b, and c in
> jhash_3words all have the same value added consisting of initval + (length
> << 2) + JHASH_INITVAL so that jhash2 and jhash_3words will now produce the
> same hash result given the same inputs.
> 
> Fixes: 60d509c823cca ("The new jhash implementation")
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...hat.com>

This looks correct to me, applied, thanks!
--
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