Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 22 Jun 2012 09:39:00 -0700
From: Alain Espinosa <alainesp@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: formats interface enhancements

On 6/20/12, Solar Designer <solar@...nwall.com> wrote:
> I'd appreciate any comments.

I do not send my proposal before because is time consuming and i don't
have enough time to implement the changes i propose. First say that
john is a very well written program and the fact that is very old is
proof enough. Lets call "john-core" to almost all john infrastructure
and "john-formats" to the formats developed by a large number of
contributors. The principal flag i see is that "john-core" has the
control (to much control) over "john-formats" and so restrict possible
format optimization and features development. So turn it 180 grade and
make "john-formats" take the control and call "john-core"
infrastructure methods. Lets see some code:

// Get the current candidates keys.
//Note that we do not know if is incremental, wordlist or other.
// Return 1 if keys was filled or 0 if generation of keys was complete
// num_key: Number of keys to fill
int get_candidate_keys(char* keys, int num_key);

#define NUM_KEYS 128

// Method to implement in each format
void format_crack(get_candidate_keys* current_get_key)
{
   // Create buffer to fill keys
   char* key_buffer = malloc(28*NUM_KEYS);

   // Check if "john-core" signals stop or keyspace search was over
   while(continue_crack && get_candidate_keys(key_buffer, NUM_KEYS))
   {
       // Perform hashing
       // ...
       // Compare result with actual hashes
       if(hashtable[result] != NO_ELEM)
       {
           // Compare more
           if(total_match)
               report_hash_found(key_buffer[index], hash_index);
       }
   }

   // Report that this thread finish cracking
   report_thread_finish();
   free(key_buffer);
}

Advantages: Almost out the box we have very good multithread. Specific
formats can be very hard optimized. Probably more contributors will
contribute to ways to generate candidate passwords. Note that to add
distribute capabilities we only need to add a new get_candidate_keys.
Also we are free to use any optimization in a GPU implementation.

Disadvantages: Very time consuming. An overwhelming change in john architecture.

saludos,
alain

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.