Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Mar 2015 00:41:15 +0800
From: Lei Zhang <>
Subject: Re: [GSoC] building JtR for MIC


I’m finally able to build john-jumbo for MIC. It can run on MIC now, but still has some problem. I’ll describe the building process first, and then how it runs.

There’re mainly three things to do: modifying the autoconf scripts, resolving library dependencies and modifying some source files.
First, I added a target for MIC in and modified config.sub so it could recognize MIC. It took me a while to figure out the right configuration options for MIC. 

When I started building, I found there’re some libraries that are required by john-jumbo but not natively available on MIC. They are OpenSSL, GMP and Zlib. I had to download and build them for MIC manually, which also took me a while. 

With all library dependencies resolved, there’re still some source files that failed to compile. 
One of them is mssql12_fmt_plug.c. There seems to be a bug in it (line 186), which results in the use of a undefined variable when compiling for MIC. It’s quite straightforward to correct it (maybe I'm wrong...).

Another file that failed to compile is pp.c (line 882 & 1835. This time it’s due to a bug in the Intel compiler, and it’s confirmed by Intel’s dev. You can see this post for detail: <>
I wrote a workaround replacement for the code in trouble, and got the filed compiled.

With some other minor issues also resolved, john-jumbo can now be built for MIC.

I tried to run the benchmark on MIC (./john —test). It runs well for the first few benches, but then it aborted when running ‘scrypt’.
Here’s the output:
Will run 240 OpenMP threads
Benchmarking: descrypt, traditional crypt(3) [512/512]... (240xOMP) DONE
Many salts:	3744K c/s real, 30881 c/s virtual
Only one salt:	1820K c/s real, 30915 c/s virtual

Benchmarking: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [512/512]... (240xOMP) DONE
Many salts:	126030 c/s real, 1041 c/s virtual
Only one salt:	71441 c/s real, 1058 c/s virtual

Benchmarking: md5crypt, crypt(3) $1$ [MD5 32/64 X2]... (240xOMP) DONE
Raw:	118916 c/s real, 494 c/s virtual

Benchmarking: bcrypt ("$2a$05", 32 iterations) [Blowfish 32/64 X2]... (240xOMP) DONE
Speed for cost 1 (iteration count) of 32
Raw:	3801 c/s real, 15.8 c/s virtual

Benchmarking: scrypt (16384, 8, 1) [Salsa20/8 32/64]... (240xOMP) Killed

It seems the process got killed when running ‘scrypt’. I’m still looking for the cause of this problem. 
Suggestions are welcome.


> 在 2015年3月7日,下午11:25,Solar Designer < <>> 写道:
> On Sat, Mar 07, 2015 at 11:15:57PM +0800, ??? ??? wrote:
>> I managed to build JtR for MIC on a server in our lab, and get it running the benchmark. 
> Great.
>> The version of JtR I downloaded is 1.8.0. I added a target for MIC in the Makefile and created file mic.h (copied from ia64.h) to get it built for MIC. The model of Intel MIC card used is 5110P.
> This is basically duplicate work to what I reported on here:
> <>
> That's fine.
>> Below is the result of the benchmark:
>> ???????????????????????????????????????????????????????????????????????????????????????????????????????????????
>> Benchmarking: descrypt, traditional crypt(3) [DES 64/64]... DONE
>> Many salts:	179008 c/s real, 179008 c/s virtual
>> Only one salt:	172812 c/s real, 172812 c/s virtual
> This is just one core running the non-SIMD code.
>> Any suggestions?
> Since the core tree uses SIMD for bitslice DES only, and since we
> already have MIC intrinsics for it (see my posting referenced above), in
> the GSoC project you'd need to work solely with the jumbo tree.
> So please try to get jumbo to build for and run on MIC, and report back
> in here.  Ideally, magnum should merge my MIC support changes referenced
> above into jumbo first, but this is not crucial since you clearly have
> the experience to start without that as well.
> You may also experiment with (from CVS, or I may send you the
> tarball), just to have something inbetween your clean 1.8.0 build and
> the jumbo build.
> Thanks,
> Alexander

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

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