Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 18 Sep 2011 08:22:55 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: integer limit reached

Hi Pablo,

I am guilty for suggesting that you bring a certain discussion (which
turned out to be unneeded) to john-dev.  That one would actually be of
JtR's source code.  However, I feel that the topic you brought up now is
more of an advanced end user topic rather than a JtR development topic -
that is, I don't expect actual JtR source code changes to be discussed
under it.  I understand that it's difficult to know these things in
advance (before you post), so our split into two mailing lists is a bit
problematic in this respect.

That said, let's keep this on john-dev this time.

On Sat, Sep 17, 2011 at 05:16:32PM +0200, Pablo Fernandez wrote:
> Then I went to the compiler.c code and I saw it only supports integers. Have I 
> just hit a brick wall? In my first try I was working with MD5, but this would 
> be much worse for DES.
> 
> Is there any plan to support bigint, for example?

Not in the external mode compiler/VM.

> Or is there any workaround?

You may implement 64-bit addition and comparison out of two 32-bit ones
in your own external mode.  See JtR's math.c for how this might be done.

> Does actually John work internally with numbers bigger than 32 bit integers? 

The main JtR tree is currently meant to build and work on machines and
with C compilers that don't support bigger than 32-bit integers.  In
-jumbo, we have deviated from that (and the main tree is likely to
follow).  Also, JtR has this math.[ch] thing, which provides 64-bit
integers (slow, but working - for the few places where that is needed).

There's no plan to move external modes to bigger than 32-bit integers.
I see almost no need for that (so far yours is the only exception, and
it's a questionable one).  It'd be a slight slowdown even on many 64-bit
machines.  Also, some existing external modes assume that int is exactly
32 bits (Strip, AppendLuhn).

> In fact I am working with a 64 bit machine, is it possible to change the 
> integer size on John's compile time?

Yes, you may hack your copy of John to make external mode's int 64-bit,
although I don't recommend that.  It's this line in compiler.h:

/*
 * Data type used by compiled programs.
 */
typedef int c_int;

And you will also need to patch c_getint() in compiler.c.

Once again, I really don't recommend it.

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.