diff --git a/src/opencl_md4.h b/src/opencl_md4.h index cbd5c2d..4a698e3 100644 --- a/src/opencl_md4.h +++ b/src/opencl_md4.h @@ -16,20 +16,23 @@ #include "opencl_misc.h" +/* The basic MD4 functions */ #ifdef USE_BITSELECT #define MD4_F(x, y, z) bitselect((z), (y), (x)) #else #define MD4_F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #endif +#ifdef USE_BITSELECT +#define MD4_G(x, y, z) bitselect((x), (y), (z) ^ (x)) +#else +#define MD4_G(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) +#endif + #define MD4_H(x, y, z) (((x) ^ (y)) ^ (z)) #define MD4_H2(x, y, z) ((x) ^ ((y) ^ (z))) -/* The basic MD4 functions */ -#define MD4_G(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) - - /* The MD4 transformation for all three rounds. */ #define MD4STEP(f, a, b, c, d, x, s) \ (a) += f((b), (c), (d)) + (x); \