Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Aug 2013 01:08:46 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Self-test-specific code defeats the whole idea of self-test

Hi magnum, solar and all,

On Fri, Aug 9, 2013 at 12:29 AM, magnum <john.magnum@...hmail.com> wrote:

> Apparently you have added specific get_key_self_test() and
> crypt_all_self_test() functions in four OpenCL formats and they even have
> self-test specific kernels. If we go that path, we can just as well drop
> the whole idea of self-tests, no? It is totally OK in an experimental
> branch but hacks like that does not belong in bleeding at all IMHO, other
> than for very short time if you have a specific plan (but that should
> ideally evolve in a topic branch). In my book this is four release blockers.


We can't use the same code we use for self test for other purposes.
Self-test imposes a specific set of restrictions which diminishes
performance. The best I can do is give an illusion that the same kernel is
being used for all purposes but internally within the kernel the self-test
will follow the same code path as we are following now. Just it would lead
to more branches inside the kernel eating up i-cache and reducing
performance. As you might have seen all the kernel inside a format uses
same algorithms. So the self-test checks at least the main core algorithm
for the format.

* The count passed to cmp_all() must be equal to crypt_all()'s return value.
 * If an implementation does not use the salt parameter or if salt is NULL
 * (as it may be during self-test and benchmark), the return value must
always
 * match *count the way it is after the crypt_all() call.

The above restriction doesn't allow all the modes to follow same code path.
If this restriction is removed I might be able to use the same kernel for
self-test and other modes except mask mode. For mask-mode we might need to
design a new test.

Regards,
Sayantan

Content of type "text/html" skipped

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.