Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP446B05E44DC8FEF2A127078FD200@phx.gbl>
Date: Fri, 4 Jan 2013 14:51:16 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Supporting different hash algorithms with a single
 format?

On 01/04/2013 02:22 PM, Lukas Odzioba wrote:
> 2013/1/4 Frank Dittrich <frank_dittrich@...mail.com>:
>> You can still implement both formats in the same file.
>> More or less, you just need
>> #define FORMAT_LABEL_0  "odf-sha1-bf"
>> #define FORMAT_LABEL_1  "odf-sha256-aes"
>> #define FORMAT_NAME_0   "ODF SHA-1 Blowfish"
>> #define FORMAT_NAME_1   "ODF SHA-256 AES"
>> ...
>> static struct fmt_tests odf_tests_0[] = ...
>> static struct fmt_tests odf_tests_1[] = ...
>>
>> valid_0() and valie_1(), which call the common valid() with an
>> additional parameter, separate crypt_all_0() and crypt_all_1(),
>>
>> And finally, separate
>> struct fmt_main odf_fmt_0 = { ...
>> struct fmt_main odf_fmt_1 = { ...
> 
> Like we have in cuda raw-sha256.

Actually, I meant something slightly different.

Not building 2 separate object files like this:
$ grep cuda_rawsha256_fmt.c Makefile
cuda_rawsha256_fmt.o: cuda_rawsha256.o cuda_rawsha256_fmt.c
	$(CC)  $(CFLAGS) -DSHA256 cuda_rawsha256_fmt.c -o cuda_rawsha256_fmt.o
cuda_rawsha224_fmt.o: cuda_rawsha224.o cuda_rawsha256_fmt.c
	$(CC)  $(CFLAGS) -DSHA224 cuda_rawsha256_fmt.c -o cuda_rawsha224_fmt.o

Instead, a single object file which defines 2 formats and reuses those
functions which don't differ.

Frank

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.