Date: Sun, 15 Nov 2015 02:03:40 +0100 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: source() called twice for each crack Solar, The source() function is always called twice in a row for no good reason. On a successful guess, we always have something like this (in various code paths): if (crk_methods.cmp_exact(crk_methods.source( pw->source, pw->binary), index)) if (crk_process_guess(salt, pw, index)) return 1; Then within crk_process_guess() we call it again for passing to log_guess(). A trivial fix would be to add a parameter to crk_process_guess() so we'd have: char *source = crk_methods.source(pw->source, pw->binary); if (crk_methods.cmp_exact(source, index)) if (crk_process_guess(salt, pw, index, source)) return 1; Then in crk_process_guess() the source would be readily available. I noticed this while working on something else and just wanted to mention it before I forget all about it. Perhaps the above change this would slightly improve the 29m_md5 tests you were focusing on a while ago, for example. The source function in raw-md5 is not terribly slow but in other cases I guess it could be. 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.