Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 06 Aug 2012 12:20:44 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Current -fixes GPU formats vs TS

On 2012-08-06 05:55, Lukas Odzioba wrote:
> 2012/8/6 Solar Designer <solar@...nwall.com>:
>> +       for(i=0;i<length;i++)
>> +         salt.salt[i]=tolower(salt.salt[i]);
>>
>> Note that the ctype macros including tolower() are defined to accept int
>> only.  They're non-portable/unsafe to use on other than int.
>>
>> We have strlwr() (provided by misc.[ch]) and enc_strlwr() (provided by
>> unicode.[ch]).  I don't know which of these is right here.

strlwr() only handles 7-bit ASCII (a-z). Nearly any format that has
FMT_8_BIT should use enc_strlwr().

>> Oh, cuda_mscash_fmt.c already uses enc_strlwr() in split().  Perhaps its
>> salt() should use the same, and you'll probably need to write a NUL to
>> allow for that.
> 
> Thanks for pointing this out!
> I'll use enc_strlwr().

Yes, that is best. I will at some point fix the GPU formats so they
handle --encoding properly and thus can have the FMT_UTF8 flag too
(ideally each format's author should do this but I understand most
people think Unicode is black magic - for good reasons :)

magnum

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.