#include "types_ocl.c"
#include "common.c"
-#ifdef VECT_SIZE1
-#define COMPARE_M "check_multi_vect1_comp4.c"
-#endif
-
-#ifdef VECT_SIZE2
-#define COMPARE_M "check_multi_vect2_comp4.c"
-#endif
-
-#ifdef VECT_SIZE4
-#define COMPARE_M "check_multi_vect4_comp4.c"
-#endif
+#define COMPARE_S "check_single_comp4.c"
+#define COMPARE_M "check_multi_comp4.c"
__constant u32 k_sha256[64] =
{
* pads
*/
- w0[0] = swap_workaround (w0[0]);
- w0[1] = swap_workaround (w0[1]);
- w0[2] = swap_workaround (w0[2]);
- w0[3] = swap_workaround (w0[3]);
- w1[0] = swap_workaround (w1[0]);
- w1[1] = swap_workaround (w1[1]);
- w1[2] = swap_workaround (w1[2]);
- w1[3] = swap_workaround (w1[3]);
- w2[0] = swap_workaround (w2[0]);
- w2[1] = swap_workaround (w2[1]);
- w2[2] = swap_workaround (w2[2]);
- w2[3] = swap_workaround (w2[3]);
- w3[0] = swap_workaround (w3[0]);
- w3[1] = swap_workaround (w3[1]);
- w3[2] = swap_workaround (w3[2]);
- w3[3] = swap_workaround (w3[3]);
+ w0[0] = swap32 (w0[0]);
+ w0[1] = swap32 (w0[1]);
+ w0[2] = swap32 (w0[2]);
+ w0[3] = swap32 (w0[3]);
+ w1[0] = swap32 (w1[0]);
+ w1[1] = swap32 (w1[1]);
+ w1[2] = swap32 (w1[2]);
+ w1[3] = swap32 (w1[3]);
+ w2[0] = swap32 (w2[0]);
+ w2[1] = swap32 (w2[1]);
+ w2[2] = swap32 (w2[2]);
+ w2[3] = swap32 (w2[3]);
+ w3[0] = swap32 (w3[0]);
+ w3[1] = swap32 (w3[1]);
+ w3[2] = swap32 (w3[2]);
+ w3[3] = swap32 (w3[3]);
u32 ipad[8];
u32 opad[8];
w3[2] = salt_buf3[2];
// w3[3] = salt_buf3[3];
- w0[0] = swap_workaround (w0[0]);
- w0[1] = swap_workaround (w0[1]);
- w0[2] = swap_workaround (w0[2]);
- w0[3] = swap_workaround (w0[3]);
- w1[0] = swap_workaround (w1[0]);
- w1[1] = swap_workaround (w1[1]);
- w1[2] = swap_workaround (w1[2]);
- w1[3] = swap_workaround (w1[3]);
- w2[0] = swap_workaround (w2[0]);
- w2[1] = swap_workaround (w2[1]);
- w2[2] = swap_workaround (w2[2]);
- w2[3] = swap_workaround (w2[3]);
- w3[0] = swap_workaround (w3[0]);
- w3[1] = swap_workaround (w3[1]);
- w3[2] = swap_workaround (w3[2]);
+ w0[0] = swap32 (w0[0]);
+ w0[1] = swap32 (w0[1]);
+ w0[2] = swap32 (w0[2]);
+ w0[3] = swap32 (w0[3]);
+ w1[0] = swap32 (w1[0]);
+ w1[1] = swap32 (w1[1]);
+ w1[2] = swap32 (w1[2]);
+ w1[3] = swap32 (w1[3]);
+ w2[0] = swap32 (w2[0]);
+ w2[1] = swap32 (w2[1]);
+ w2[2] = swap32 (w2[2]);
+ w2[3] = swap32 (w2[3]);
+ w3[0] = swap32 (w3[0]);
+ w3[1] = swap32 (w3[1]);
+ w3[2] = swap32 (w3[2]);
w3[3] = (64 + salt_len + 4) * 8;
u32 dgst[8];