Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120114113633.GA8982@openwall.com>
Date: Sat, 14 Jan 2012 15:36:33 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Bit slice implementation of DES based hashes

On Sat, Jan 14, 2012 at 03:14:41PM +0530, Piyush Mittal wrote:
> I am getting some problem in key initialisation.

You mean, when trying to run your code?  How do you know the problem is
not elsewhere?

> Can you please explain me what you did in DES_bs_init() for key
> initialisation

It initializes 768 key bit pointers (48 per DES round) in accordance
with the DES key schedule.  These are set to point to K[] element
arrays.  Obviously, there are multiple pointers to every K[] element -
that's how DES works, using the same key bits multiple times in
different rounds.

> and why we have taken array DES_LM_KP[] ?

I don't recall the details, but I think it implements an equivalent of
Samba's smbdes.c: str_to_key().

You may or may not need it depending on whether your desired DES key
setup is LM'ish or not.  For example, you should not need it for Oracle
hashes, but you probably need it for NETLM.  Notice how
NETLM_fmt_plug.c's setup_des_key() is similar to str_to_key() that I
mentioned above.

Hopefully, you won't need to modify DES_bs_init() itself - you just need
to pass 0 or 1 for the "int LM" argument as appropriate.

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.