From c315ea94a2bd1d019584a1b3bf338246c68149f3 Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 22 Dec 2015 02:17:48 +0100 Subject: [PATCH] increase bcrypt again a bit --- OpenCL/m03200.cl | 20 ++++++++++---------- OpenCL/m09000.cl | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/OpenCL/m03200.cl b/OpenCL/m03200.cl index dd5c522eb..e87e9fd11 100644 --- a/OpenCL/m03200.cl +++ b/OpenCL/m03200.cl @@ -311,16 +311,16 @@ __constant u32 c_sbox3[256] = #endif #ifdef IS_NV -#define BF_ROUND(L,R,N) \ -{ \ - u32 tmp; \ - \ - tmp = S0[__bfe ((L), 24, 8)]; \ - tmp += S1[__bfe ((L), 16, 8)]; \ - tmp ^= S2[__bfe ((L), 8, 8)]; \ - tmp += S3[__bfe ((L), 0, 8)]; \ - \ - (R) ^= tmp ^ P[(N)]; \ +#define BF_ROUND(L,R,N) \ +{ \ + u32 tmp; \ + \ + tmp = S0[(u8) (L) >> 24]; \ + tmp += S1[(u8) (L) >> 16]; \ + tmp ^= S2[(u8) (L) >> 8]; \ + tmp += S3[(u8) (L) >> 0]; \ + \ + (R) ^= tmp ^ P[(N)]; \ } #endif diff --git a/OpenCL/m09000.cl b/OpenCL/m09000.cl index d5d053908..afee23845 100644 --- a/OpenCL/m09000.cl +++ b/OpenCL/m09000.cl @@ -311,16 +311,16 @@ __constant u32 c_sbox3[256] = #endif #ifdef IS_NV -#define BF_ROUND(L,R,N) \ -{ \ - u32 tmp; \ - \ - tmp = S0[__bfe ((L), 24, 8)]; \ - tmp += S1[__bfe ((L), 16, 8)]; \ - tmp ^= S2[__bfe ((L), 8, 8)]; \ - tmp += S3[__bfe ((L), 0, 8)]; \ - \ - (R) ^= tmp ^ P[(N)]; \ +#define BF_ROUND(L,R,N) \ +{ \ + u32 tmp; \ + \ + tmp = S0[(u8) (L) >> 24]; \ + tmp += S1[(u8) (L) >> 16]; \ + tmp ^= S2[(u8) (L) >> 8]; \ + tmp += S3[(u8) (L) >> 0]; \ + \ + (R) ^= tmp ^ P[(N)]; \ } #endif