Date: Sun, 17 Jun 2012 00:15:03 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Re: [patch] optional new raw sha1 implemetation On 2012-06-15 18:44, Tavis Ormandy wrote: > On Fri, Jun 15, 2012 at 04:54:15PM +0200, Tavis Ormandy wrote: >> As the code is self contained, I've just attached my first attempt. Let me know >> if you have any feedback, or suggestions to help get it merged. >> >> I've only tested it on Linux with GCC, and you need to add -msse4 to CFLAGS in the Makefile. >> >> The code is original, I can assign copright to Solar if required. >> > > I made some slight adjustments to the scheduling, please use the > attached version instead. Tavis, I see a problem in binary(). You alloc space for a binary and return it to john, but john will only copy it so this is a memory leak. We could change it to a one-time alloc: static uint32_t *result; if (!result) result = mem_alloc_tiny(SHA1_DIGEST_SIZE, MEM_ALIGN_SIMD); However, as the alignment requirement is not really in binary() itself, we could just as well do this: static uint32_t result[SHA1_DIGEST_SIZE/sizeof(uint32_t)]; And actually no matter how we do this, john will (currently) copy it with MEM_ALIGN_WORD in loader.c. 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.