Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2de85e35f78d9642d6b95489651e62b@smtp.hushmail.com>
Date: Wed, 19 Aug 2015 08:51:52 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Long duration formats' many-salts figure incorrect
 in short benchmarks

On 2015-08-18 23:41, Solar Designer wrote:
> On Tue, Aug 18, 2015 at 11:31:52PM +0200, magnum wrote:
>> [...] the benchmark timer ends before we even get to try the second
>> salt even once!
> [...]
>> Longer runs show better figures (within limits). This problem is with
>> "your code", but it never surfaces in non-Jumbo. I'm not sure whether to
>> fix this, or how. Should we simply ensure the while loop runs long
>> enough for both salts to be tested at least once? Maybe that would end
>> up showing a mere 2x boost in this case? Should we ensure the loop does
>> all BENCHMARK_MANY virtual salts? But that would likely end up in some
>> GPU formats benchmarking for hours...
>
> Yes, there's this problem with no obviously correct solution.  Testing
> every salt at least once makes sense to me because we've already done so
> during the self-test.  This might increase the test+benchmark time by
> more than a factor of 2, though, since the self-tests run up to a lower
> crypt_all() count argument for most of its invocations.  But it
> shouldn't be worse than 4x overall.  What's worse is that, as you
> correctly point out, this might not achieve the full BENCHMARK_MANY
> speed, requiring the user to manually increase the benchmark duration to
> see that.

Perhaps just emit a warning? Something like this (mockup):

Benchmarking: 7z-opencl, 7-Zip (512K iterations) [SHA256 OPENCL AES]... 
(8xOMP) DONE
Speed for cost 1 (iteration count) of 524288
Warning: "Many salts" test limited: 1/256
Many salts:    108 c/s real, 12800 c/s virtual
Only one salt:    108 c/s real, 12800 c/s virtual

Not sure what the actual message should be. The one in this example 
would indicate we only tried one virtual salt out of 256.

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.