|
Message-ID: <0f140f0c974155051175f64670bd481d@smtp.hushmail.com> Date: Tue, 12 May 2015 00:23:20 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: sunmd5 assumes a SIMD width of 4 Solar, Lei, I just saw this in sunmd5: /* * 576 divides evenly by 4, 8, 12, 16 (para = 1, 2, 3, 4) Each of these * will get an even number of para buckets, so hopefully we get the best * average fill we possibly can get. 960 would also allow us to pick up 20 (para 5) * * NOTE, made 'smaller' fit. 240 would get all 4,8,12,16,20, but now it is multiple * defines. this allows self tests to run much faster, BUT the speed of the format * is still about the same. */ //#define MAX_KEYS_PER_CRYPT 576 //#define MAX_KEYS_PER_CRYPT 240 #if !defined(MD5_SSE_PARA) || MD5_SSE_PARA==1 #define MAX_KEYS_PER_CRYPT 48 #elif MD5_SSE_PARA==2 #define MAX_KEYS_PER_CRYPT 64 #elif MD5_SSE_PARA==3 || MD5_SSE_PARA==4 #define MAX_KEYS_PER_CRYPT 96 #elif MD5_SSE_PARA==5 #define MAX_KEYS_PER_CRYPT 100 #endif Unfortunately Jim has just assumed a SIMD width of 4 (again, doh). The above will fail for certain combinations of width and interlaving factors. For example, AVX2 at para 5 is 8x4 so 100 is not a very good number to use. I'm not sure why we're not just using eg. #define MAX_KEYS_PER_CRYPT (SIMD_COEF_32 * MD5_SSE_PARA) Perhaps with some fixed multipler if we really want to (not sure why we would but I haven't looked much at the code). magnum
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.