Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 01 Apr 2015 19:48:03 +0200
From: Frank Dittrich <frank.dittrich@...lbox.org>
To: john-dev@...ts.openwall.com
Subject: Re: [GSoC] John the Ripper support for PHC finalists

On 04/01/2015 06:56 PM, Agnieszka Bielec wrote:
> On 2015-03-30 02:11, magnum wrote:
>> What you should do is this right before opencl_init():
>>
>> +  sprintf(build_opts, "-DBINARY_SIZE=%d -DSALT_SIZE=%d -DMEM_SIZE=%d",
>> +          BINARY_SIZE, SALT_SIZE, MEM_SIZE);
>>
>> And a corresponding change to the kernel:
>>
>> -#define BINARY_SIZE     257
>> -#define SALT_SIZE       32
>> -#define MEM_SIZE        131072
>> +// BINARY_SIZE, SALT_SIZE and MEM_SIZE is passed with -D during build
> 
> thanks a lot!

Somehow you managed to reply to Solar, but quote magnum's text from a
different message. This is confusing.

> there is a way to pass options by comand line somethig alike: -m_cost=x ?
> I need it for the auto_tune and compiling the kernel.

There is a --cost= command line option, see doc/OPTIONS
The --cost option can be used in regular runs and with --test, as long
as you have test vectors matching the requested cost settings.

To use thze --cost option for pomelo, you need to implement reporting of
the tunable costs.
It is easy. See the django-scrypt format as an example.
(bleeding-jumbo)JtR $ grep -A 5 "#if FMT_MAIN_VERSION > 11"
src/django_scrypt_fmt_plug.c
#if FMT_MAIN_VERSION > 11
static unsigned int tunable_cost_N(void *salt)
{
	static struct custom_salt *my_salt;

	my_salt = salt;
--
#if FMT_MAIN_VERSION > 11
		{
			"N",
			"r",
			"p"
		},
--
#if FMT_MAIN_VERSION > 11
		{
			tunable_cost_N,
			tunable_cost_r,
			tunable_cost_p
		},


You can report up to 3 tunable costs.
I'm not sure whether to report t_cost or m_cost first.
Output length and salt length probably also impact run time, but not
that much compared to t_cost and m_cost.
So may be you can report "output length + salt length" as the third
tunable cost. Or you just report t_cost and m_cost.

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.