Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 May 2015 17:26:41 +0800
From: Lei Zhang <>
Subject: Adding OpenMP support to SunMD5


I'm trying to add OpenMP support to SunMD5. Currently I'm looking at the biggest loop in crypt_all(), which has the form:

for (round = 0; round < maxrounds; round++)
{ ... }

It seems to me this loop has loop-carried dependence, thus not feasible for direct parallelizing. I viewed the crypt() function of some other formats, whose hotspot loops mostly have this form:

for (index = 0; index < count; index++)
{ ... }

Loops like this are easy to parallelize, since each iteration is independent. There must be other formats in JtR whose hotspot loops has loop-carried dependence, like SunMD5. How did you parallelize them?

I tried parallelizing a inner loop in the hotspot loop of SunMD5, like this:

for (round = 0; round < maxrounds; round++) {
	#pragma omp parallel for ...
	for (idx = 0; idx < count; ++idx)
	{ ... }

But the performance is worse than single-threaded.
	Before: 628 c/s real, 628 c/s virtual
	After:    304 c/s real, 82.4 c/s virtual

The outer loop still needs efficient handling.


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.