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: <4993E8F7.6070007@trash.net>
Date:	Thu, 12 Feb 2009 10:16:39 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
CC:	wli@...ementarian.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH] Update jhash.h with the new version of Jenkins' hash

Jozsef Kadlecsik wrote:
> -#define __jhash_mix(a, b, c) \
> +#define __rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
> +
> +/* __jhash_mix - mix 3 32-bit values reversibly. */
> +#define __jhash_mix(a,b,c) \
> +{ \
> +  a -= c;  a ^= __rot(c, 4);  c += b; \
> +  b -= a;  b ^= __rot(a, 6);  a += c; \
> +  c -= b;  c ^= __rot(b, 8);  b += a; \
> +  a -= c;  a ^= __rot(c,16);  c += b; \
> +  b -= a;  b ^= __rot(a,19);  a += c; \
> +  c -= b;  c ^= __rot(b, 4);  b += a; \
> +}

include/linux/bitops.h includes multiple rot variants. rol32()
looks approriate.
--
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