From 8a3ed7fe75ed92da59ecb0368d6cd4ddb23b22a8 Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 16 Jun 2017 11:33:49 +0200 Subject: [PATCH] Small WPA improvement, do not check the same candidate twice for LE and BE --- OpenCL/m02500.cl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenCL/m02500.cl b/OpenCL/m02500.cl index 797a45de0..c5da4a81e 100644 --- a/OpenCL/m02500.cl +++ b/OpenCL/m02500.cl @@ -1132,15 +1132,16 @@ __kernel void m02500_comp (__global pw_t *pws, __global const kernel_rule_t *rul } // the same code again, but with BE order for the t++ - // note we dont need nonce_error_correction = 0, we already tested this above - for (u32 nonce_error_correction = 1; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { u32 t = to; t -= nonce_error_corrections / 2; t += nonce_error_correction; + if (t == to) continue; // we already had this checked in the LE loop + if (wpa->nonce_compare < 0) { pke[15] = (pke[15] & ~0x000000ff) | (t >> 24);