Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1360906074.28844.YahooMailNeo@web140903.mail.bf1.yahoo.com>
Date: Thu, 14 Feb 2013 21:27:54 -0800 (PST)
From: deepika dutta <deepikadutta_19@...oo.com>
To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com>
Subject: Re: mschapv2-bitsliced conversion

Hi magnum,

Yes I just looked in code, for openmp P is not defined with the #if cases. The following should work.

In DES_bs.c instead of 

#if DES_bs_mt
#include <omp.h>
#include <assert.h>
int DES_bs_min_kpc, DES_bs_max_kpc;
static int DES_bs_n_alloc;
int DES_bs_nt = 0;
DES_bs_combined *DES_bs_all_p = NULL;
#elif !DES_BS_ASM
DES_bs_combined CC_CACHE_ALIGN DES_bs_all;
DES_bs_vector P[64];
#endif

do 

#if !DES_BS_ASM
DES_bs_vector P[64];
#endif

#if DES_bs_mt
#include <omp.h>
#include <assert.h>
int DES_bs_min_kpc, DES_bs_max_kpc;
static int DES_bs_n_alloc;
int DES_bs_nt = 0;
DES_bs_combined *DES_bs_all_p = NULL;
#elif !DES_BS_ASM
DES_bs_combined CC_CACHE_ALIGN DES_bs_all;
#endif

There are so many #if's to take care of :)


 
Cheers,
Deepika


________________________________
 From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com 
Sent: Friday, February 15, 2013 4:08 AM
Subject: Re: [john-dev] mschapv2-bitsliced conversion
 
On 14 Feb, 2013, at 19:44 , magnum <john.magnum@...hmail.com> wrote:

> On 14 Feb, 2013, at 11:14 , deepika dutta <deepikadutta_19@...oo.com> wrote:
>> Good this worked with the previous patch. I think the changes you did should be fine as they are in sync with what already existed in those files. Assembly language is hard to understand without experience. Anyways, there is a small problem in the previous patch w.r.t. multiple definitions of P. 
>> 
>> -- P is extern in DES_bs.h, 
>> -- it is defined in DES_bs.c when C code is to be used and defined in assembly files when assembly code is to be used.
>> -- it is defined in DES_bs_b.c also for both cases.
>> 
>> Though it didn't create any problem but I feel it is not a good approach to programming. Therefore, I had used extern in assembly file and did all the stuff which didn't work.
> 
> Apparently, extern is not recognized by all assemblers.
> 
>> But just now I re-looked the code, the latest patch should actually be discarded as just removing the DES_bs_vector P[64] from DES_bs_b.c in previous patch will work fine with keeping one definition of P.
> 
> OK, so it will be declared from including the header. I haven't tried this yet, will do.

When I tried this, OMP stopped working (at least for 64-bit SSE). Not sure why.

magnum
Content of type "text/html" skipped

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.