Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABob6iqBxv-GJEeWu2JZ4zSqjHXDMXN79K9HBJeRu9RRHvNWnw@mail.gmail.com>
Date: Sat, 11 Aug 2012 01:23:56 +0200
From: Lukas Odzioba <lukas.odzioba@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Current -fixes GPU formats vs TS

2012/8/11 Lukas Odzioba <lukas.odzioba@...il.com>:
>When I run cpu code (from cpu format) everything works ok, so the
> problem is in .cu file or it is related to cuda.
> I'll spend one more night on it.

Because format fails to calculate proper values just for the first
time after some mysterious runtime history I thought that we could do
sth like that:
static void init(struct fmt_main *pFmt)
{
	host_pass = calloc(KEYS_PER_CRYPT, sizeof(pwsafe_pass));
	host_hash = calloc(KEYS_PER_CRYPT, sizeof(pwsafe_hash));
	host_salt = calloc(1, sizeof(pwsafe_salt));
	cuda_init(gpu_id);
	memset(host_pass,0,KEYS_PER_CRYPT*sizeof(pwsafe_pass));
	memset(host_hash,0,KEYS_PER_CRYPT*sizeof(pwsafe_hash));
	memset(host_salt,0,sizeof(pwsafe_salt));
	gpu_pwsafe(host_pass, host_salt, host_hash); <--- this puppy
	atexit(cleanup);
}
And this workaround fixes the problem. However it is at least stupid.
I'll send final code in a moment. I am not happy about this hack, but
as fas as it does the job we may want to use it.

Lukas

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.