|
Message-ID: <20150507141611.GD11074@openwall.com> Date: Thu, 7 May 2015 17:16:11 +0300 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: get_binary_*() and get_hash_*() methods On Thu, May 07, 2015 at 02:02:36PM +0300, Aleksey Cherepanov wrote: > get_hash[]() should be called for each computed hash, cmp_all() > without get_hash[]() should be called for each loaded hash. > > It would be possible to remove get_hash[]() calls if crypt_all > returned the values in array: john provides a pointer to array of ints > (BTW why not unsigned int?) of length MAX_KEYS_PER_CRYPT to > crypt_all(), and crypt_all fills the array with values like from > get_hash[6](). Though the length of array should be a separate field > in the format structure because crypt_all() may produce more > candidates. The caller will not always need those partial hashes. For some formats, e.g. for bitslice DES, they are costly to produce. When cracking only a handful of hashes, it is quicker to call cmp_all() right away, without going through get_hash[]() first. loader.c: threshold = password_hash_thresholds[0]; if (db->format && (db->format->params.flags & FMT_BS)) { /* * Estimate the complexity of DES_bs_get_hash() for each computed hash (but * comparing it against less than 1 loaded hash on average due to the use of a * hash table) vs. the complexity of DES_bs_cmp_all() for all computed hashes * at once (but calling it for each loaded hash individually). */ threshold = 5 * ARCH_BITS / ARCH_BITS_LOG + 1; } 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.