Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 19 Jul 2012 21:30:19 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: fast pbkdf2-sha1 OpenCL kernel

On Thu, Jul 19, 2012 at 9:15 PM, jfoug <jfoug@....net> wrote:
>>On Thurs, July 19, 2012 10:12 AM Dhiru Kholia wrote:
>>
>>I am looking for a fast pbkdf2-sha1 OpenCL kernel which can handle
>>passwords of length 20, salt size 20 and can output key length of 66.
>>
>>1) Can the wpa-psk kernel work with password size of 20? If not, can it
>>be modified to do the same? I need this for ODF kernel.
>>
>>2) Currently the output of wpa-psk kernel is 32 bytes, can this be
>>increased to 64 + 2 (= 66)? I need this for ZIP AES kernel.
>>
>>Jim, does you pbkdf2 kernel meet these requirements? Can it be modified
>>to do so?
>
> I am not sure exactly what code you are referring to.  If it is the code in
> http://openwall.info/wiki/john/MSCash2_simple_code then it can easily handle
> 20 bytes of salt, and 20 byte of hash.

I was referring to http://openwall.info/wiki/john/MSCash2. It does
*not* handle salt lengths > 16 and it does *not* handle passwords of
length 20. I have tested it.

> I am not sure how the algorithm would output 66 bytes of key, from a 32 byte
> hash function.  If it was SHA512, then yes, 66 bytes, but not sure if pbkdf2
> can give more key bytes than the base crypt type.

This is possible. Take a look at derive_key implementation in JtR.

void derive_key(const unsigned char pwd[],  /* the PASSWORD     */
               unsigned int pwd_len,        /* and its length   */
               const unsigned char salt[],  /* the SALT and its */
               unsigned int salt_len,       /* length           */
               unsigned int iter,   /* the number of iterations */
               unsigned char key[], /* space for the output key */
               unsigned int key_len)/* and its required length  */

key_len can be anything. I have actually used a value of 34 (output
key size) in zip format with no problem.

-- 
Cheers,
Dhiru

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.