Date: Thu, 12 Jul 2012 10:28:37 -0500 From: "jfoug" <jfoug@....net> To: <john-dev@...ts.openwall.com> Subject: RE: opencl_mscash2_fmt.c: clear_keys() >From: Solar Designer [mailto:solar@...nwall.com] > >So far, the only reasonable use of clear_keys() is in Jim's "dynamic". >(Previously, there was also a use for bitslice DES key setup, but I've >since switched to using a key setup algorithm that does not need that.) Actually, some of the 'fat' SSE formats should use clear_keys(). The logic I was using to reset the keyspace on dynamic was mimicked from other formats. Within set_key, if index is 0, they memset buffers. This logic should be put into clear_keys(). The one place (that I am aware of), where clear_keys was not being done properly was in self tests (when we wrapped from max pw, back to 0). But I put it in there. Getting past the self-test code, was 'hard' to do, when having to track within set_keys when to clear the buffers. Formats which do the if(index==0) memset(keyspace,0) are: hmacMD5_fmt.c hmacSHA1_fmt.c mssql_old_fmt_plug.c NOTE a comprehensive list. I simply did grep for 'if*\(*index*==*0*\)' This found the 2 commented lines in dynamic, and the other files. There 'may' be other ones than these. It does look like some of the 'fat' SSE formats have been worked over by magnum, to use the faster key loading, which was done originally in NT format. In this key loading, the memset is avoided, by simply blanking the dirty part of the buffer after the load. However, the 2 formats listed, for sure, could (should) have clear_keys added. Jim.
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.