Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <818ed366d8170c6943e2542c9843dbd5@smtp.hushmail.com>
Date: Tue, 10 Mar 2015 01:17:23 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: format method spec.

On 2015-03-10 01:02, magnum wrote:
> ...so problem remains. I'll try to zoom out and find a better place for
> the clear_keys() in cracker.c (eg. right before setting key 0). I think
> the one for Single mode is better placed.

This works, and I see no performance loss although theoretically there
might be some.


diff --git a/src/cracker.c b/src/cracker.c
index bcb60ec..5760257 100644
--- a/src/cracker.c
+++ b/src/cracker.c
@@ -789,8 +789,6 @@ static int crk_salt_loop(void)
 	else
 	crk_fix_state();

-	crk_methods.clear_keys();
-
 	if (ext_abort)
 		event_abort = 1;

@@ -806,6 +804,9 @@ static int crk_salt_loop(void)
 int crk_process_key(char *key)
 {
 	if (crk_db->loaded) {
+		if (crk_key_index == 0)
+			crk_methods.clear_keys();
+
 		crk_methods.set_key(key, crk_key_index++);

 		if (crk_key_index >= crk_params.max_keys_per_crypt)



We'll run Jumbo with this and see how it turns out.

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.