|
Message-ID: <849a0e0ab2682a1f4e96cb64dca00a4e@smtp.hushmail.com> Date: Wed, 02 Sep 2015 20:19:02 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: SHA-1 H() On 2015-09-02 17:20, Solar Designer wrote: > SHA-1's H() aka F3() is the same as SHA-2's Maj(), yet somehow we're > using less optimal expressions for it on systems with bitselect(). > > In opencl_sha1.h we have: > > #define F3(x, y, z) (bitselect(x, y, z) ^ bitselect(x, 0U, y)) > > I've just tried changing this to: > > #define F3(x, y, z) bitselect(x, y, (z) ^ (x)) > > and got some speedup for pbkdf2-hmac-sha1-opencl on GCN (1200K to > 1228K c/s). > (...) > magnum, will you take care of this, please? And test on GPUs and on XOP. Good find, I totally missed this one. I'm glad I moved dozens of code copies into opencl_sha1.h and similar headers: Much less code to maintain. I'll look into it (including the stuff I snipped from my quote). magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.