Date: Thu, 4 Jul 2013 22:33:00 +0400 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Mask mode for GPU Hi Sayantan, On Fri, Jul 05, 2013 at 02:48:21AM +0530, Sayantan Datta wrote: > I want to implement range based on consecutive ascii codes. Yes, as an optimization for the special case when the range happens to be consecutive. > How do we change the mask for this? We don't have to. > Currently rpp generates all characters when a > range is provided e.g. [A-D] generates A, B, C, D. Yes, but it's not difficult for your "optimizer" - e.g., your set_mask() implementation in a format where the OpenCL kernel has this specialized mode - to detect this condition and turn it back into min='A', max='D'. And for other character positions - those iterated on the host - you don't need to do anything (well, unless we want to squeeze out a few cycles on host as well, for CPU-only fast hash formats). > However for generating any ascii value e.g say 0 to 255 we might have to > change the mask syntax. For example -mask=[0x00-0xff] which will > generate all the 8bit chars. Is this syntax OK? Of course it will > support any other subsets too. You don't need to bother with this. The consecutive char codes feature is an optimization (to conserve GPU local memory, etc.), not an extension of the input syntax. That said, I think rpp in jumbo already supports the \xNN syntax for arbitrary character codes (IIRC, magnum implemented this) - perhaps this works inside ranges, too? (I haven't tested.) Alexander
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.