Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG5=z90yF0EX-Q_0_oUUcY3stA2Zv2EXe57tPgDMS1mAp+veOA@mail.gmail.com>
Date: Fri, 6 Jan 2012 17:51:20 +0530
From: Piyush Mittal <piyush.cse29@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Bit slice implementation of DES based hashes

Hello,


> In DES_bs_crypt_LM(), DES initial permutation has been pre-applied to
> the constant initial block.
>


Extremely sorry to say but I am not getting how initial permutation is
calculated? What I am doing is as follows:

1.The binary conversion of KGS!@#$% is
   01001011 01000111 01010011 00100001 01000000 00100011 00100100 00100101
2.Initial permutation array that I am using is as follows

static unsigned char DES_IP[64] = {
    57, 49, 41, 33, 25, 17, 9, 1,
    59, 51, 43, 35, 27, 19, 11, 3,
    61, 53, 45, 37, 29, 21, 13, 5,
    63, 55, 47, 39, 31, 23, 15, 7,
    56, 48, 40, 32, 24, 16, 8, 0,
    58, 50, 42, 34, 26, 18, 10, 2,
    60, 52, 44, 36, 28, 20, 12, 4,
    62, 54, 46, 38, 30, 22, 14, 6
};

3.Now the block are initialised as follows

    DES_bs_set_block_8(0, zero, zero, zero, zero, zero, zero, zero, zero);
>     DES_bs_set_block_8(8, ones, ones, ones, zero, ones, zero, zero, zero);
>     DES_bs_set_block_8(16, zero, zero, zero, zero, zero, zero, zero, ones);
>     DES_bs_set_block_8(24, zero, zero, ones, zero, zero, ones, ones, ones);
>     DES_bs_set_block_8(32, zero, zero, zero, ones, zero, ones, ones, ones);
>     DES_bs_set_block_8(40, zero, zero, zero, zero, zero, ones, zero, zero);
>     DES_bs_set_block_8(48, ones, ones, zero, zero, zero, zero, ones, zero);
>     DES_bs_set_block_8(56, ones, zero, ones, zero, ones, ones, ones, ones);
>

i.e 0000000011101000000000010010011100010111000001001100001010101111

but I am not getting the same sequence. What am I missing ?




On Thu, Jan 5, 2012 at 6:31 PM, Solar Designer <solar@...nwall.com> wrote:

> Hi Piyush,
>
> On Thu, Jan 05, 2012 at 06:03:37PM +0530, Piyush Mittal wrote:
> > Though I searched a lot about how blocks in  DES_bs_crypt_LM()  are
> > initialised but I am not getting sufficient idea. According to me the
> > string "KGS!@#$%" is initialised in these blocks but the order of these
> 64
> > binary  bits is some what confusing. As I can't ignore this order of bits
> > for oracle bit slice implementation. Can you please tell me how order is
> > taken here?
>
> In DES_bs_crypt_LM(), DES initial permutation has been pre-applied to
> the constant initial block.
>
> Alexander
>



-- 
Piyush Mittal

Content of type "text/html" skipped

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.