#define DGST_R3 3
#include "include/kernel_functions.c"
-#include "types_ocl.c"
-#include "common.c"
+#include "OpenCL/types_ocl.c"
+#include "OpenCL/common.c"
-#define COMPARE_S "check_single_comp4.c"
-#define COMPARE_M "check_multi_comp4.c"
+#define COMPARE_S "OpenCL/check_single_comp4.c"
+#define COMPARE_M "OpenCL/check_multi_comp4.c"
typedef struct
{
u32 j = 0;
- #pragma unroll
for (u32 i = 0; i < 16; i++)
{
u32 idx = i * 16;
u32 key[4];
- key[0] = swap_workaround (digest[0]);
- key[1] = swap_workaround (digest[1]);
- key[2] = swap_workaround (digest[2]);
- key[3] = swap_workaround (digest[3]);
+ key[0] = swap32 (digest[0]);
+ key[1] = swap32 (digest[1]);
+ key[2] = swap32 (digest[2]);
+ key[3] = swap32 (digest[3]);
if (version == 3)
{
u8 j = rc4_next_16 (rc4_key, 0, 0, encryptedVerifier, out);
- w0_t[0] = swap_workaround (out[0]);
- w0_t[1] = swap_workaround (out[1]);
- w0_t[2] = swap_workaround (out[2]);
- w0_t[3] = swap_workaround (out[3]);
+ w0_t[0] = swap32 (out[0]);
+ w0_t[1] = swap32 (out[1]);
+ w0_t[2] = swap32 (out[2]);
+ w0_t[3] = swap32 (out[3]);
w1_t[0] = 0x80000000;
w1_t[1] = 0;
w1_t[2] = 0;
sha1_transform (w0_t, w1_t, w2_t, w3_t, digest);
- digest[0] = swap_workaround (digest[0]);
- digest[1] = swap_workaround (digest[1]);
- digest[2] = swap_workaround (digest[2]);
- digest[3] = swap_workaround (digest[3]);
+ digest[0] = swap32 (digest[0]);
+ digest[1] = swap32 (digest[1]);
+ digest[2] = swap32 (digest[2]);
+ digest[3] = swap32 (digest[3]);
rc4_next_16 (rc4_key, 16, j, digest, out);
u32 key[4];
- key[0] = swap_workaround (digest[0]);
- key[1] = swap_workaround (digest[1]);
- key[2] = swap_workaround (digest[2]);
- key[3] = swap_workaround (digest[3]);
+ key[0] = swap32 (digest[0]);
+ key[1] = swap32 (digest[1]);
+ key[2] = swap32 (digest[2]);
+ key[3] = swap32 (digest[3]);
if (version == 3)
{
u8 j = rc4_next_16 (rc4_key, 0, 0, encryptedVerifier, out);
- w0_t[0] = swap_workaround (out[0]);
- w0_t[1] = swap_workaround (out[1]);
- w0_t[2] = swap_workaround (out[2]);
- w0_t[3] = swap_workaround (out[3]);
+ w0_t[0] = swap32 (out[0]);
+ w0_t[1] = swap32 (out[1]);
+ w0_t[2] = swap32 (out[2]);
+ w0_t[3] = swap32 (out[3]);
w1_t[0] = 0x80000000;
w1_t[1] = 0;
w1_t[2] = 0;
sha1_transform (w0_t, w1_t, w2_t, w3_t, digest);
- digest[0] = swap_workaround (digest[0]);
- digest[1] = swap_workaround (digest[1]);
- digest[2] = swap_workaround (digest[2]);
- digest[3] = swap_workaround (digest[3]);
+ digest[0] = swap32 (digest[0]);
+ digest[1] = swap32 (digest[1]);
+ digest[2] = swap32 (digest[2]);
+ digest[3] = swap32 (digest[3]);
rc4_next_16 (rc4_key, 16, j, digest, out);