Revert "Jumbo uses a shorter tab stop than core for the usage blob."

This reverts commit a583eb8dd4ba64c980b7f453320af5538ab65890.
Revert "added mask mode interface"

This reverts commit 0965d1a42355b4fa4c48b12adcb858a86bb8dce5.
Revert "nt-opencl: fixed bug causing inefficient keys transfer."

This reverts commit f934f43ed955450677ae8c879d95d126de439114.
Revert "mscash-opencl: compare on gpu"

This reverts commit e258bb8e2903579132d8d5a516169df055d5b1cc.
Revert "Various minor fixes for Sayantan's OpenCL versus OS X."

This reverts commit 73dc372495771f604b7becade7b878194515e6b5.
Revert "mscash-opencl: optimization patch #3"

This reverts commit 1a867bd7e2658a62848adaac05f3ac0635a3d1f6.
Revert "mscash-opencl: optimization patch #2"

This reverts commit dfdbc5969f46bacc81582b23e1b8ca849e0015fa.
Revert "mscash-opencl: optimization patch #1"

This reverts commit 3f35abf6f42583663dab3582fc3ad427a49bb4fe.
Revert "mscash-opencl: optimization patch #0"

This reverts commit ea91365e909871acf56ae31e37ec1d4f0e269c9a.
Revert "New format added, mscash-opencl: ported directly from mscash-cuda."

This reverts commit cfa800133f89cd53ebfae79a058f9912f3a3f4bc.
Revert "raw-sha1-opencl: cmp on gpu"

This reverts commit c63b0187eab690ba92093a7d6182752527ecd26a.
Revert "raw-md4-opencl:cmp on gpu"

This reverts commit 74d86573c2714dab27a1aee6dd6af0485a8aa861.
Revert "nt-opencl: use opencl_init instead of opencl_init_opt"

This reverts commit c94ab2fada0bc2d4edba6afc2d1ced47f242f705.
Revert "nt-opencl: cmp on gpu"

This reverts commit 189fe111bf71b7eabdaa0a9e822748caa2e5d20a.
Revert "raw-md5-opencl bugfix: You can't release buffers that are not allocated."

This reverts commit d043fbec0fde43169361ab935e963920c187edd2.
Revert "Raw-MD5-opencl: status check bug fix"

This reverts commit d6cd0fea8575354079de3d50476cf7a96d811baa.
Revert "Update opencl_rawmd5_fmt.c"

This reverts commit 70b114878bcf867755aef59d637d27994f0fe4c7.
Revert "Raw-MD5-opencl: fixed memory cleanup"

This reverts commit 8e2043ec270a78aa1ab2509a920564ed96fc03be.
Revert "Raw-MD5-opencl: compare on gpu"

This reverts commit 6c0d209d9161a146e28571b6a53b1fe8e5bd41e0.

Conflicts:
	src/opencl_rawmd5_fmt.c
Mask mode for GPU

On Thu, Jun 13, 2013 at 07:37:17PM +0400, Solar Designer wrote:
> [...]  Our rules preprocessor implements something very similar -
> in fact, I think we might want to support its syntax as well.  For a
> trivial implementation, we could simply be calling rpp_*() from the mask
> mode implementation - and it'd just work for rpp's variation of the
> syntax.  However, rpp is mostly unoptimized (it wasn't meant to be used
> from a performance-critical place) and it implements its syntax only
> (not the PasswordsPro/hashcat "mask attack" syntax).

I've attached a proof-of-concept patch (against core) that illustrates
this similarity.  Moreover, it introduces PasswordsPro/hashcat "mask
attack" syntax into rpp (only enabled when invoked from our mask mode).
Mixed syntax works, too:

$ ./john --mask='?u?l[ab]?d??' --stdout | head -3
Press 'q' or Ctrl-C to abort, almost any other key for status
Aaa0?
Aaa1?
Aaa2?

$ ./john --mask='?u?l[ab]?d??' --stdout | tail -3
Press 'q' or Ctrl-C to abort, almost any other key for status
13520p 0:00:00:00 1352Kp/s Zzb9?
Zzb7?
Zzb8?
Zzb9?

Speed on one core in FX-8120 when run against one LM hash:

$ ./john --mask='?u?u?u?u?u?u' --format=lm pw
Loaded 1 password hash (LM [DES 128/128 XOP-16])
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:13 0g/s 23157Kp/s 23157Kc/s 23157KC/s ZZZZXO..ZZZZZZ
Session completed

For comparison, incremental mode locked to the same charset and length:

$ ./john -i=upper6 --format=lm pw
Loaded 1 password hash (LM [DES 128/128 XOP-16])
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:06 0g/s 44448Kp/s 44448Kc/s 44448KC/s UXHZQN..UXHQFQ
Session completed

So, yes, in its present form rpp is slower than our mask mode should be
(it should be faster than incremental, not slower, unless we somehow
make it use incremental's *.chr files).  It's not slow to the point of
being unusable, though.

Not implemented in this PoC are support for: --restore, --node & --fork,
progress indicator.  These are trivial to add (good efficiency and
scalability at --node & --fork is not as trivial, though - would require
changes to rpp.c).  Also not implemented yet are many of the pre-defined
"mask attack" charsets, but these are even more obviously trivial to add.

As to introducing support for format's set_mask() into this - now that's
possibly more difficult than it would be with a specialized implementation.
Yet I think we should not give up on this approach.  Perhaps we'd have
to untie mask mode from rpp, but we may nevertheless start by duplicating
much of rpp's structure and initially even code - and only then proceed
to customize it for optional use of set_mask().

Alexander

Conflicts:
	src/Makefile
	src/john.c
	src/options.c
	src/options.h