Date: Mon, 19 Dec 2011 16:24:33 +0400 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: OpenMP for MD5-crypt On Sat, Dec 17, 2011 at 01:00:21AM +0100, magnum wrote: > On 12/17/2011 12:37 AM, Solar Designer wrote: > >I am making the below change in -jumbo-5 such that the multiple threads > >are used in single crack mode as well. ... > > #if defined(_OPENMP)&& defined(MD5_SSE_PARA) > >- omp_para = OMP_SCALE * omp_get_max_threads(); > >+ omp_para = omp_get_max_threads(); > > if (omp_para< 1) > > omp_para = 1; > >+ fmt_MD5.params.min_keys_per_crypt = MD5_N * omp_para; > >+ omp_para *= OMP_SCALE; > > fmt_MD5.params.max_keys_per_crypt = MD5_N * omp_para; > > #elif MD5_std_mt > > fmt_MD5.params.min_keys_per_crypt = MD5_std_min_kpc; > > > >Non-SIMD version of the code already used a similar approach. > > Great! I didn't know there was a problem. How does this affect single > mode? Single crack mode typically uses chunks of exactly min_keys_per_crypt candidate passwords. Its expectation is that min_keys_per_crypt is the minimum number of candidate passwords that can be tested reasonably efficiently. In this context, reasonably efficiently means making use of all available resources (threads, vector elements, execution units). > Would min=max work too or is that also bad? Single crack mode allocates a candidate passwords buffer for every salt. When min_keys_per_crypt is very high, those buffers may be large. If there are also a lot of salts, the buffers may not fit in RAM. And if they do fit in RAM, then there may be a usability problem if the hash type is slow (the cracking session won't advance to the next "checkpoint" for a long time) or a slowdown if the hash type is fast (as RAM instead of a cache is accessed). Either way, there may also be a slowdown in terms of actual passwords cracked (not c/s rate), because candidate passwords from rules further down the list will be tried before rules higher in the list for the next salt. This is why min_keys_per_crypt even exists. Alexander
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.