Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1739d749f2d2fccaed470d93192e3e89@smtp.hushmail.com>
Date: Tue, 26 Jun 2012 10:06:47 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: mschap-v2 conversion

On 2012-06-26 09:16, deepika dutta wrote:
> 1) I want to know the meaning of Thread_ratio and how the values of
> Thread_ratio and Max_keys_per_crypt are being decided? Is it fixed by
> you or is being decided based on some factor?
>
> #define MIN_KEYS_PER_CRYPT    1
> #define THREAD_RATIO        256
> #ifdef _OPENMP
> #define MAX_KEYS_PER_CRYPT    0x10000
> #else
> #define MAX_KEYS_PER_CRYPT    THREAD_RATIO
> #endif

I picked THREAD_RATIO from trial'n'error. For a very slow format it can 
be lower, for faster formats it need to be higher.

> 2) Without openmp: With openssl des, Thread_ratio (256) keys were
> read and used for encryption at a time. But with bitsliced des at a
> time only DES_BS_DEPTH keys can be used, so whether I should change
> the MAX_KEYS_PER_CRYPT parameter to DES_BS_DEPTH (which I have done
> for now in my patches) or I should keep it to Thread_ratio but
> process des_bs_depth keys at one go?

In your case you should probably look at how this is implemented in 
DES_fmt.c (but it's harder to follow).

> 3) With openmp: For openmp Max_keys_per_crypt is 16 according to
> #define value, also in init() n is set to MAX_keys_per_crypt if
> greater than that. According to my understanding, this means that16
> keys will be read and used at a time and thus bitslicing and openmp
> will not give any benefit as only 1 core will be in use with only 16
> out of DES_bs_DEPTH layers being used. Therefore, this parameter
> needs change. Correct me if i am wrong.

This code was written without bitslice in mind, I guess you need to 
replace some of it. I think you might already have some good #defines 
from DES_bs.h that you can use but I don't really know that code. Solar 
may respond much better when he gets some more time.

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.