Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 21 Jul 2013 05:34:59 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Parallella: bcrypt

Katja, Yaniv -

On Tue, Jul 16, 2013 at 05:17:40PM +0200, Katja Malvoni wrote:
> On Tue, Jul 16, 2013 at 4:48 PM, Solar Designer <solar@...nwall.com> wrote:
> > You're actively polling the Epiphany chip for results, thereby wasting
> > one ARM core.  Are there good alternatives to this polling approach?
> 
> Results need to be copied from the shared buffer after cores signal done
> and before new result is written to shared buffer.

BTW, is this reliable?  You seem to rely on writes to and reads from
Epiphany to be processed by the hardware in-order, but if I am not
mistaken Yaniv has stated here on john-dev that the hardware does not
guarantee this behavior.

Yaniv - here's the host code I am referring to:

	int core_start = 0;
	int done[16] = {0};

	core_start = 16;
	for(i = 0; i < platform.rows*platform.cols; i++)
	{
		ERR(e_write(&emem, 0, 0, offsetof(data, setting[i]), saved_salt, SALT_SIZE), "Writing salt to shared memory failed!\n");
		ERR(e_write(&emem, 0, 0, offsetof(data, key[i]), saved_key[i], PLAINTEXT_LENGTH + 1), "Writing key to shared memory failed!\n");
		ERR(e_write(&emem, 0, 0, offsetof(data, start[i]), &core_start, sizeof(core_start)), "Writing start failed!\n");
	}
	
	for(i = 0; i < platform.rows*platform.cols; i++)
	{
		while(done[i] != i + 1)
			ERR(e_read(&emem, 0, 0, offsetof(data, core_done[i]), &done[i], sizeof(done[i])), "Reading done failed!\n");
		ERR(e_read(&emem, 0, 0, offsetof(data, result[i]), parallella_BF_out[i], sizeof(BF_binary)), "Reading result failed!\n");
	}

If I understood you correctly, this is unreliable (although it passed
our testing so far).  If so, how should Katja reimplement it?

Thanks,

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ