diff --git a/OpenCL/m13711-pure.cl b/OpenCL/m13711-pure.cl index a74b318a6..52ebd1c3a 100644 --- a/OpenCL/m13711-pure.cl +++ b/OpenCL/m13711-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -252,61 +253,8 @@ KERNEL_FQ void m13711_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13711_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -407,11 +355,13 @@ KERNEL_FQ void m13711_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + + tmps[gid].pim_check = pim; } } @@ -427,10 +377,78 @@ KERNEL_FQ void m13711_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 3, out[3]); unpackv (tmps, out, gid, i + 4, out[4]); } +} - if (pim == 0) return; +KERNEL_FQ void m13711_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13711_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13712-pure.cl b/OpenCL/m13712-pure.cl index d754ae7df..c7e3d4b30 100644 --- a/OpenCL/m13712-pure.cl +++ b/OpenCL/m13712-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -303,61 +304,8 @@ KERNEL_FQ void m13712_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13712_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -458,11 +406,13 @@ KERNEL_FQ void m13712_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + + tmps[gid].pim_check = pim; } } @@ -478,11 +428,83 @@ KERNEL_FQ void m13712_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 3, out[3]); unpackv (tmps, out, gid, i + 4, out[4]); } +} - if (pim == 0) return; +KERNEL_FQ void m13712_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13712_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13713-pure.cl b/OpenCL/m13713-pure.cl index db6dc593f..fb42974a8 100644 --- a/OpenCL/m13713-pure.cl +++ b/OpenCL/m13713-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -368,61 +369,8 @@ KERNEL_FQ void m13713_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13713_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -523,11 +471,13 @@ KERNEL_FQ void m13713_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + + tmps[gid].pim_check = pim; } } @@ -543,12 +493,88 @@ KERNEL_FQ void m13713_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 3, out[3]); unpackv (tmps, out, gid, i + 4, out[4]); } +} - if (pim == 0) return; +KERNEL_FQ void m13713_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13713_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13721-pure.cl b/OpenCL/m13721-pure.cl index 3dbabb69d..f83fd39b2 100644 --- a/OpenCL/m13721-pure.cl +++ b/OpenCL/m13721-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; @@ -355,61 +356,8 @@ KERNEL_FQ void m13721_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) KERNEL_FQ void m13721_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -545,14 +493,16 @@ KERNEL_FQ void m13721_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -580,6 +530,78 @@ KERNEL_FQ void m13721_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; } +KERNEL_FQ void m13721_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); + + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } +} + KERNEL_FQ void m13721_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { const u64 gid = get_global_id (0); diff --git a/OpenCL/m13722-pure.cl b/OpenCL/m13722-pure.cl index 9b74f8d41..cbcb75044 100644 --- a/OpenCL/m13722-pure.cl +++ b/OpenCL/m13722-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; @@ -406,61 +407,8 @@ KERNEL_FQ void m13722_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) KERNEL_FQ void m13722_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -596,14 +544,16 @@ KERNEL_FQ void m13722_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -625,11 +575,88 @@ KERNEL_FQ void m13722_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) unpack64v (tmps, out, gid, i + 6, out[6]); unpack64v (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13722_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13722_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) diff --git a/OpenCL/m13723-pure.cl b/OpenCL/m13723-pure.cl index ec722c387..da755b629 100644 --- a/OpenCL/m13723-pure.cl +++ b/OpenCL/m13723-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; @@ -471,61 +472,8 @@ KERNEL_FQ void m13723_init (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) KERNEL_FQ void m13723_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -661,14 +609,16 @@ KERNEL_FQ void m13723_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -690,12 +640,88 @@ KERNEL_FQ void m13723_loop (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) unpack64v (tmps, out, gid, i + 6, out[6]); unpack64v (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13723_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13723_comp (KERN_ATTR_TMPS_ESALT (vc64_tmp_t, vc_t)) diff --git a/OpenCL/m13731-pure.cl b/OpenCL/m13731-pure.cl index 761141945..de76defc5 100644 --- a/OpenCL/m13731-pure.cl +++ b/OpenCL/m13731-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -418,57 +419,6 @@ KERNEL_FQ void m13731_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - /** * Whirlpool shared */ @@ -667,22 +617,24 @@ KERNEL_FQ void m13731_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[ 0]; - tmps[gid].pim_key[i + 1] = out[ 1]; - tmps[gid].pim_key[i + 2] = out[ 2]; - tmps[gid].pim_key[i + 3] = out[ 3]; - tmps[gid].pim_key[i + 4] = out[ 4]; - tmps[gid].pim_key[i + 5] = out[ 5]; - tmps[gid].pim_key[i + 6] = out[ 6]; - tmps[gid].pim_key[i + 7] = out[ 7]; - tmps[gid].pim_key[i + 8] = out[ 8]; - tmps[gid].pim_key[i + 9] = out[ 9]; - tmps[gid].pim_key[i + 10] = out[10]; - tmps[gid].pim_key[i + 11] = out[11]; - tmps[gid].pim_key[i + 12] = out[12]; - tmps[gid].pim_key[i + 13] = out[13]; - tmps[gid].pim_key[i + 14] = out[14]; - tmps[gid].pim_key[i + 15] = out[15]; + unpackv (tmps, pim_key, gid, i + 0, out[ 0]); + unpackv (tmps, pim_key, gid, i + 1, out[ 1]); + unpackv (tmps, pim_key, gid, i + 2, out[ 2]); + unpackv (tmps, pim_key, gid, i + 3, out[ 3]); + unpackv (tmps, pim_key, gid, i + 4, out[ 4]); + unpackv (tmps, pim_key, gid, i + 5, out[ 5]); + unpackv (tmps, pim_key, gid, i + 6, out[ 6]); + unpackv (tmps, pim_key, gid, i + 7, out[ 7]); + unpackv (tmps, pim_key, gid, i + 8, out[ 8]); + unpackv (tmps, pim_key, gid, i + 9, out[ 9]); + unpackv (tmps, pim_key, gid, i + 10, out[10]); + unpackv (tmps, pim_key, gid, i + 11, out[11]); + unpackv (tmps, pim_key, gid, i + 12, out[12]); + unpackv (tmps, pim_key, gid, i + 13, out[13]); + unpackv (tmps, pim_key, gid, i + 14, out[14]); + unpackv (tmps, pim_key, gid, i + 15, out[15]); + + tmps[gid].pim_check = pim; } } @@ -720,10 +672,78 @@ KERNEL_FQ void m13731_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 14, out[14]); unpackv (tmps, out, gid, i + 15, out[15]); } +} - if (pim == 0) return; +KERNEL_FQ void m13731_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13731_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13732-pure.cl b/OpenCL/m13732-pure.cl index 26b5a5d62..2fb26cb25 100644 --- a/OpenCL/m13732-pure.cl +++ b/OpenCL/m13732-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -469,57 +470,6 @@ KERNEL_FQ void m13732_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - /** * Whirlpool shared */ @@ -718,22 +668,24 @@ KERNEL_FQ void m13732_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[ 0]; - tmps[gid].pim_key[i + 1] = out[ 1]; - tmps[gid].pim_key[i + 2] = out[ 2]; - tmps[gid].pim_key[i + 3] = out[ 3]; - tmps[gid].pim_key[i + 4] = out[ 4]; - tmps[gid].pim_key[i + 5] = out[ 5]; - tmps[gid].pim_key[i + 6] = out[ 6]; - tmps[gid].pim_key[i + 7] = out[ 7]; - tmps[gid].pim_key[i + 8] = out[ 8]; - tmps[gid].pim_key[i + 9] = out[ 9]; - tmps[gid].pim_key[i + 10] = out[10]; - tmps[gid].pim_key[i + 11] = out[11]; - tmps[gid].pim_key[i + 12] = out[12]; - tmps[gid].pim_key[i + 13] = out[13]; - tmps[gid].pim_key[i + 14] = out[14]; - tmps[gid].pim_key[i + 15] = out[15]; + unpackv (tmps, pim_key, gid, i + 0, out[ 0]); + unpackv (tmps, pim_key, gid, i + 1, out[ 1]); + unpackv (tmps, pim_key, gid, i + 2, out[ 2]); + unpackv (tmps, pim_key, gid, i + 3, out[ 3]); + unpackv (tmps, pim_key, gid, i + 4, out[ 4]); + unpackv (tmps, pim_key, gid, i + 5, out[ 5]); + unpackv (tmps, pim_key, gid, i + 6, out[ 6]); + unpackv (tmps, pim_key, gid, i + 7, out[ 7]); + unpackv (tmps, pim_key, gid, i + 8, out[ 8]); + unpackv (tmps, pim_key, gid, i + 9, out[ 9]); + unpackv (tmps, pim_key, gid, i + 10, out[10]); + unpackv (tmps, pim_key, gid, i + 11, out[11]); + unpackv (tmps, pim_key, gid, i + 12, out[12]); + unpackv (tmps, pim_key, gid, i + 13, out[13]); + unpackv (tmps, pim_key, gid, i + 14, out[14]); + unpackv (tmps, pim_key, gid, i + 15, out[15]); + + tmps[gid].pim_check = pim; } } @@ -771,11 +723,83 @@ KERNEL_FQ void m13732_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 14, out[14]); unpackv (tmps, out, gid, i + 15, out[15]); } +} - if (pim == 0) return; +KERNEL_FQ void m13732_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13732_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13733-pure.cl b/OpenCL/m13733-pure.cl index 0a9059b5b..e39be38e3 100644 --- a/OpenCL/m13733-pure.cl +++ b/OpenCL/m13733-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -534,57 +535,6 @@ KERNEL_FQ void m13733_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) const u64 lid = get_local_id (0); const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - /** * Whirlpool shared */ @@ -783,22 +733,24 @@ KERNEL_FQ void m13733_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[ 0]; - tmps[gid].pim_key[i + 1] = out[ 1]; - tmps[gid].pim_key[i + 2] = out[ 2]; - tmps[gid].pim_key[i + 3] = out[ 3]; - tmps[gid].pim_key[i + 4] = out[ 4]; - tmps[gid].pim_key[i + 5] = out[ 5]; - tmps[gid].pim_key[i + 6] = out[ 6]; - tmps[gid].pim_key[i + 7] = out[ 7]; - tmps[gid].pim_key[i + 8] = out[ 8]; - tmps[gid].pim_key[i + 9] = out[ 9]; - tmps[gid].pim_key[i + 10] = out[10]; - tmps[gid].pim_key[i + 11] = out[11]; - tmps[gid].pim_key[i + 12] = out[12]; - tmps[gid].pim_key[i + 13] = out[13]; - tmps[gid].pim_key[i + 14] = out[14]; - tmps[gid].pim_key[i + 15] = out[15]; + unpackv (tmps, pim_key, gid, i + 0, out[ 0]); + unpackv (tmps, pim_key, gid, i + 1, out[ 1]); + unpackv (tmps, pim_key, gid, i + 2, out[ 2]); + unpackv (tmps, pim_key, gid, i + 3, out[ 3]); + unpackv (tmps, pim_key, gid, i + 4, out[ 4]); + unpackv (tmps, pim_key, gid, i + 5, out[ 5]); + unpackv (tmps, pim_key, gid, i + 6, out[ 6]); + unpackv (tmps, pim_key, gid, i + 7, out[ 7]); + unpackv (tmps, pim_key, gid, i + 8, out[ 8]); + unpackv (tmps, pim_key, gid, i + 9, out[ 9]); + unpackv (tmps, pim_key, gid, i + 10, out[10]); + unpackv (tmps, pim_key, gid, i + 11, out[11]); + unpackv (tmps, pim_key, gid, i + 12, out[12]); + unpackv (tmps, pim_key, gid, i + 13, out[13]); + unpackv (tmps, pim_key, gid, i + 14, out[14]); + unpackv (tmps, pim_key, gid, i + 15, out[15]); + + tmps[gid].pim_check = pim; } } @@ -836,12 +788,88 @@ KERNEL_FQ void m13733_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 14, out[14]); unpackv (tmps, out, gid, i + 15, out[15]); } +} - if (pim == 0) return; +KERNEL_FQ void m13733_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13733_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13751-pure.cl b/OpenCL/m13751-pure.cl index 405d5c277..fef508f58 100644 --- a/OpenCL/m13751-pure.cl +++ b/OpenCL/m13751-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -287,61 +288,8 @@ KERNEL_FQ void m13751_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13751_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -486,14 +434,16 @@ KERNEL_FQ void m13751_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + unpackv (tmps, pim_key, gid, i + 5, out[5]); + unpackv (tmps, pim_key, gid, i + 6, out[6]); + unpackv (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -515,10 +465,78 @@ KERNEL_FQ void m13751_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 6, out[6]); unpackv (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13751_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13751_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13752-pure.cl b/OpenCL/m13752-pure.cl index fbc4c5574..786bbff9b 100644 --- a/OpenCL/m13752-pure.cl +++ b/OpenCL/m13752-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -338,61 +339,8 @@ KERNEL_FQ void m13752_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13752_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -508,14 +456,16 @@ KERNEL_FQ void m13752_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + unpackv (tmps, pim_key, gid, i + 5, out[5]); + unpackv (tmps, pim_key, gid, i + 6, out[6]); + unpackv (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -537,11 +487,83 @@ KERNEL_FQ void m13752_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 6, out[6]); unpackv (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13752_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13752_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13753-pure.cl b/OpenCL/m13753-pure.cl index 9e7fd752d..ba414dc58 100644 --- a/OpenCL/m13753-pure.cl +++ b/OpenCL/m13753-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -52,6 +52,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; @@ -403,61 +404,8 @@ KERNEL_FQ void m13753_init (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) KERNEL_FQ void m13753_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * aes shared - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -573,14 +521,16 @@ KERNEL_FQ void m13753_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpackv (tmps, pim_key, gid, i + 0, out[0]); + unpackv (tmps, pim_key, gid, i + 1, out[1]); + unpackv (tmps, pim_key, gid, i + 2, out[2]); + unpackv (tmps, pim_key, gid, i + 3, out[3]); + unpackv (tmps, pim_key, gid, i + 4, out[4]); + unpackv (tmps, pim_key, gid, i + 5, out[5]); + unpackv (tmps, pim_key, gid, i + 6, out[6]); + unpackv (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -602,12 +552,88 @@ KERNEL_FQ void m13753_loop (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) unpackv (tmps, out, gid, i + 6, out[6]); unpackv (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13753_loop_extended (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13753_comp (KERN_ATTR_TMPS_ESALT (vc_tmp_t, vc_t)) diff --git a/OpenCL/m13771-pure.cl b/OpenCL/m13771-pure.cl index 821ab8141..1d1ad45ab 100644 --- a/OpenCL/m13771-pure.cl +++ b/OpenCL/m13771-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -55,6 +55,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; @@ -371,77 +372,8 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - LOCAL_VK u64a s_sbob_sl64[8][256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_sbob_sl64[0][i] = sbob512_sl64[0][i]; - s_sbob_sl64[1][i] = sbob512_sl64[1][i]; - s_sbob_sl64[2][i] = sbob512_sl64[2][i]; - s_sbob_sl64[3][i] = sbob512_sl64[3][i]; - s_sbob_sl64[4][i] = sbob512_sl64[4][i]; - s_sbob_sl64[5][i] = sbob512_sl64[5][i]; - s_sbob_sl64[6][i] = sbob512_sl64[6][i]; - s_sbob_sl64[7][i] = sbob512_sl64[7][i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -578,14 +510,16 @@ KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -607,10 +541,78 @@ KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) unpack64v (tmps, out, gid, i + 6, out[6]); unpack64v (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13771_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13771_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) diff --git a/OpenCL/m13772-pure.cl b/OpenCL/m13772-pure.cl index 7e8ef5b83..1fb4a07ee 100644 --- a/OpenCL/m13772-pure.cl +++ b/OpenCL/m13772-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -55,6 +55,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; @@ -422,77 +423,8 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - LOCAL_VK u64a s_sbob_sl64[8][256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_sbob_sl64[0][i] = sbob512_sl64[0][i]; - s_sbob_sl64[1][i] = sbob512_sl64[1][i]; - s_sbob_sl64[2][i] = sbob512_sl64[2][i]; - s_sbob_sl64[3][i] = sbob512_sl64[3][i]; - s_sbob_sl64[4][i] = sbob512_sl64[4][i]; - s_sbob_sl64[5][i] = sbob512_sl64[5][i]; - s_sbob_sl64[6][i] = sbob512_sl64[6][i]; - s_sbob_sl64[7][i] = sbob512_sl64[7][i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -629,14 +561,16 @@ KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -658,11 +592,83 @@ KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) unpack64v (tmps, out, gid, i + 6, out[6]); unpack64v (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13772_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13772_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) diff --git a/OpenCL/m13773-pure.cl b/OpenCL/m13773-pure.cl index 1fad87e9e..c420be6d4 100644 --- a/OpenCL/m13773-pure.cl +++ b/OpenCL/m13773-pure.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -//#define NEW_SIMD_CODE +#define NEW_SIMD_CODE #ifdef KERNEL_STATIC #include "inc_vendor.h" @@ -55,6 +55,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; @@ -487,77 +488,8 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) { const u64 gid = get_global_id (0); - const u64 lid = get_local_id (0); - const u64 lsz = get_local_size (0); - /** - * shared lookup table - */ - - #ifdef REAL_SHM - - LOCAL_VK u32 s_td0[256]; - LOCAL_VK u32 s_td1[256]; - LOCAL_VK u32 s_td2[256]; - LOCAL_VK u32 s_td3[256]; - LOCAL_VK u32 s_td4[256]; - - LOCAL_VK u32 s_te0[256]; - LOCAL_VK u32 s_te1[256]; - LOCAL_VK u32 s_te2[256]; - LOCAL_VK u32 s_te3[256]; - LOCAL_VK u32 s_te4[256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_td0[i] = td0[i]; - s_td1[i] = td1[i]; - s_td2[i] = td2[i]; - s_td3[i] = td3[i]; - s_td4[i] = td4[i]; - - s_te0[i] = te0[i]; - s_te1[i] = te1[i]; - s_te2[i] = te2[i]; - s_te3[i] = te3[i]; - s_te4[i] = te4[i]; - } - - LOCAL_VK u64a s_sbob_sl64[8][256]; - - for (u32 i = lid; i < 256; i += lsz) - { - s_sbob_sl64[0][i] = sbob512_sl64[0][i]; - s_sbob_sl64[1][i] = sbob512_sl64[1][i]; - s_sbob_sl64[2][i] = sbob512_sl64[2][i]; - s_sbob_sl64[3][i] = sbob512_sl64[3][i]; - s_sbob_sl64[4][i] = sbob512_sl64[4][i]; - s_sbob_sl64[5][i] = sbob512_sl64[5][i]; - s_sbob_sl64[6][i] = sbob512_sl64[6][i]; - s_sbob_sl64[7][i] = sbob512_sl64[7][i]; - } - - SYNC_THREADS (); - - #else - - CONSTANT_AS u32a *s_td0 = td0; - CONSTANT_AS u32a *s_td1 = td1; - CONSTANT_AS u32a *s_td2 = td2; - CONSTANT_AS u32a *s_td3 = td3; - CONSTANT_AS u32a *s_td4 = td4; - - CONSTANT_AS u32a *s_te0 = te0; - CONSTANT_AS u32a *s_te1 = te1; - CONSTANT_AS u32a *s_te2 = te2; - CONSTANT_AS u32a *s_te3 = te3; - CONSTANT_AS u32a *s_te4 = te4; - - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; - - #endif - - if (gid >= gid_max) return; + if ((gid * VECT_SIZE) >= gid_max) return; // this is the pim range check // it is guaranteed that only 0 or 1 innerloops will match a "pim" mark (each 1000 iterations) @@ -694,14 +626,16 @@ KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) if (j == pim_at) { - tmps[gid].pim_key[i + 0] = out[0]; - tmps[gid].pim_key[i + 1] = out[1]; - tmps[gid].pim_key[i + 2] = out[2]; - tmps[gid].pim_key[i + 3] = out[3]; - tmps[gid].pim_key[i + 4] = out[4]; - tmps[gid].pim_key[i + 5] = out[5]; - tmps[gid].pim_key[i + 6] = out[6]; - tmps[gid].pim_key[i + 7] = out[7]; + unpack64v (tmps, pim_key, gid, i + 0, out[0]); + unpack64v (tmps, pim_key, gid, i + 1, out[1]); + unpack64v (tmps, pim_key, gid, i + 2, out[2]); + unpack64v (tmps, pim_key, gid, i + 3, out[3]); + unpack64v (tmps, pim_key, gid, i + 4, out[4]); + unpack64v (tmps, pim_key, gid, i + 5, out[5]); + unpack64v (tmps, pim_key, gid, i + 6, out[6]); + unpack64v (tmps, pim_key, gid, i + 7, out[7]); + + tmps[gid].pim_check = pim; } } @@ -723,12 +657,88 @@ KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) unpack64v (tmps, out, gid, i + 6, out[6]); unpack64v (tmps, out, gid, i + 7, out[7]); } +} - if (pim == 0) return; +KERNEL_FQ void m13773_loop_extended (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) +{ + const u64 gid = get_global_id (0); + const u64 lid = get_local_id (0); + const u64 lsz = get_local_size (0); - if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; - if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) tmps[gid].pim = pim; + /** + * aes shared + */ + + #ifdef REAL_SHM + + LOCAL_VK u32 s_td0[256]; + LOCAL_VK u32 s_td1[256]; + LOCAL_VK u32 s_td2[256]; + LOCAL_VK u32 s_td3[256]; + LOCAL_VK u32 s_td4[256]; + + LOCAL_VK u32 s_te0[256]; + LOCAL_VK u32 s_te1[256]; + LOCAL_VK u32 s_te2[256]; + LOCAL_VK u32 s_te3[256]; + LOCAL_VK u32 s_te4[256]; + + for (u32 i = lid; i < 256; i += lsz) + { + s_td0[i] = td0[i]; + s_td1[i] = td1[i]; + s_td2[i] = td2[i]; + s_td3[i] = td3[i]; + s_td4[i] = td4[i]; + + s_te0[i] = te0[i]; + s_te1[i] = te1[i]; + s_te2[i] = te2[i]; + s_te3[i] = te3[i]; + s_te4[i] = te4[i]; + } + + SYNC_THREADS (); + + #else + + CONSTANT_AS u32a *s_td0 = td0; + CONSTANT_AS u32a *s_td1 = td1; + CONSTANT_AS u32a *s_td2 = td2; + CONSTANT_AS u32a *s_td3 = td3; + CONSTANT_AS u32a *s_td4 = td4; + + CONSTANT_AS u32a *s_te0 = te0; + CONSTANT_AS u32a *s_te1 = te1; + CONSTANT_AS u32a *s_te2 = te2; + CONSTANT_AS u32a *s_te3 = te3; + CONSTANT_AS u32a *s_te4 = te4; + + #endif + + if (gid >= gid_max) return; + + const u32 pim_check = tmps[gid].pim_check; + + if (pim_check) + { + if (check_header_0512 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1024 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + if (check_header_1536 (esalt_bufs, tmps[gid].pim_key, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4) != -1) + { + tmps[gid].pim = pim_check; + } + + tmps[gid].pim_check = 0; + } } KERNEL_FQ void m13773_comp (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) diff --git a/include/types.h b/include/types.h index 9f329ad0d..ebcd53319 100644 --- a/include/types.h +++ b/include/types.h @@ -257,6 +257,7 @@ typedef enum kern_run KERN_RUN_1 = 1000, KERN_RUN_12 = 1500, KERN_RUN_2 = 2000, + KERN_RUN_2E = 2001, KERN_RUN_23 = 2500, KERN_RUN_3 = 3000, KERN_RUN_4 = 4000, @@ -410,23 +411,25 @@ typedef enum opts_type OPTS_TYPE_ST_HASH_MD5 = (1ULL << 28), OPTS_TYPE_HASH_COPY = (1ULL << 29), OPTS_TYPE_HASH_SPLIT = (1ULL << 30), - OPTS_TYPE_HOOK12 = (1ULL << 31), - OPTS_TYPE_HOOK23 = (1ULL << 32), - OPTS_TYPE_INIT2 = (1ULL << 33), - OPTS_TYPE_LOOP2 = (1ULL << 34), - OPTS_TYPE_AUX1 = (1ULL << 35), - OPTS_TYPE_AUX2 = (1ULL << 36), - OPTS_TYPE_AUX3 = (1ULL << 37), - OPTS_TYPE_AUX4 = (1ULL << 38), - OPTS_TYPE_BINARY_HASHFILE = (1ULL << 39), - OPTS_TYPE_PREFERED_THREAD = (1ULL << 40), // some algorithms (complicated ones with many branches) benefit from this - OPTS_TYPE_PT_ADD06 = (1ULL << 41), - OPTS_TYPE_KEYBOARD_MAPPING = (1ULL << 42), - OPTS_TYPE_DEEP_COMP_KERNEL = (1ULL << 43), // if we have to iterate through each hash inside the comp kernel, for example if each hash has to be decrypted separately - OPTS_TYPE_SUGGEST_KG = (1ULL << 44), // suggest keep guessing for modules the user maybe wants to use --keep-guessing - OPTS_TYPE_COPY_TMPS = (1ULL << 45), // if we want to use data from tmps buffer (for example get the PMK in WPA) - OPTS_TYPE_POTFILE_NOPASS = (1ULL << 46), // sometimes the password should not be printed to potfile - OPTS_TYPE_DYNAMIC_SHARED = (1ULL << 47), // use dynamic shared memory (note: needs special kernel changes) + OPTS_TYPE_LOOP_EXTENDED = (1ULL << 31), // a kernel which is called each time normal _loop kernel finished. + // but unlike a hook kernel this kernel is called for every _loop iteration offset + OPTS_TYPE_HOOK12 = (1ULL << 32), + OPTS_TYPE_HOOK23 = (1ULL << 33), + OPTS_TYPE_INIT2 = (1ULL << 34), + OPTS_TYPE_LOOP2 = (1ULL << 35), + OPTS_TYPE_AUX1 = (1ULL << 36), + OPTS_TYPE_AUX2 = (1ULL << 37), + OPTS_TYPE_AUX3 = (1ULL << 38), + OPTS_TYPE_AUX4 = (1ULL << 39), + OPTS_TYPE_BINARY_HASHFILE = (1ULL << 40), + OPTS_TYPE_PREFERED_THREAD = (1ULL << 41), // some algorithms (complicated ones with many branches) benefit from this + OPTS_TYPE_PT_ADD06 = (1ULL << 42), + OPTS_TYPE_KEYBOARD_MAPPING = (1ULL << 43), + OPTS_TYPE_DEEP_COMP_KERNEL = (1ULL << 44), // if we have to iterate through each hash inside the comp kernel, for example if each hash has to be decrypted separately + OPTS_TYPE_SUGGEST_KG = (1ULL << 45), // suggest keep guessing for modules the user maybe wants to use --keep-guessing + OPTS_TYPE_COPY_TMPS = (1ULL << 46), // if we want to use data from tmps buffer (for example get the PMK in WPA) + OPTS_TYPE_POTFILE_NOPASS = (1ULL << 47), // sometimes the password should not be printed to potfile + OPTS_TYPE_DYNAMIC_SHARED = (1ULL << 48), // use dynamic shared memory (note: needs special kernel changes) } opts_type_t; @@ -1077,6 +1080,7 @@ typedef struct hc_device_param u32 kernel_wgs1; u32 kernel_wgs12; u32 kernel_wgs2; + u32 kernel_wgs2e; u32 kernel_wgs23; u32 kernel_wgs3; u32 kernel_wgs4; @@ -1098,6 +1102,7 @@ typedef struct hc_device_param u32 kernel_preferred_wgs_multiple1; u32 kernel_preferred_wgs_multiple12; u32 kernel_preferred_wgs_multiple2; + u32 kernel_preferred_wgs_multiple2e; u32 kernel_preferred_wgs_multiple23; u32 kernel_preferred_wgs_multiple3; u32 kernel_preferred_wgs_multiple4; @@ -1119,6 +1124,7 @@ typedef struct hc_device_param u64 kernel_local_mem_size1; u64 kernel_local_mem_size12; u64 kernel_local_mem_size2; + u64 kernel_local_mem_size2e; u64 kernel_local_mem_size23; u64 kernel_local_mem_size3; u64 kernel_local_mem_size4; @@ -1140,6 +1146,7 @@ typedef struct hc_device_param u64 kernel_dynamic_local_mem_size1; u64 kernel_dynamic_local_mem_size12; u64 kernel_dynamic_local_mem_size2; + u64 kernel_dynamic_local_mem_size2e; u64 kernel_dynamic_local_mem_size23; u64 kernel_dynamic_local_mem_size3; u64 kernel_dynamic_local_mem_size4; @@ -1252,6 +1259,7 @@ typedef struct hc_device_param double exec_us_prev1[EXPECTED_ITERATIONS]; double exec_us_prev2[EXPECTED_ITERATIONS]; + double exec_us_prev2e[EXPECTED_ITERATIONS]; double exec_us_prev3[EXPECTED_ITERATIONS]; double exec_us_prev4[EXPECTED_ITERATIONS]; double exec_us_prev_init2[EXPECTED_ITERATIONS]; @@ -1355,6 +1363,7 @@ typedef struct hc_device_param CUfunction cuda_function1; CUfunction cuda_function12; CUfunction cuda_function2; + CUfunction cuda_function2e; CUfunction cuda_function23; CUfunction cuda_function3; CUfunction cuda_function4; @@ -1437,6 +1446,7 @@ typedef struct hc_device_param cl_kernel opencl_kernel1; cl_kernel opencl_kernel12; cl_kernel opencl_kernel2; + cl_kernel opencl_kernel2e; cl_kernel opencl_kernel23; cl_kernel opencl_kernel3; cl_kernel opencl_kernel4; diff --git a/src/backend.c b/src/backend.c index ad1d02235..1ef4a5761 100644 --- a/src/backend.c +++ b/src/backend.c @@ -3026,6 +3026,11 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, pws_cnt, true, slow_iteration) == -1) return -1; + if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) + { + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, pws_cnt, true, slow_iteration) == -1) return -1; + } + //bug? //while (status_ctx->run_thread_level2 == false) break; if (status_ctx->run_thread_level2 == false) break; @@ -3444,6 +3449,10 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con kernel_threads = device_param->kernel_wgs2; dynamic_shared_mem = device_param->kernel_dynamic_local_mem_size2; break; + case KERN_RUN_2E: + kernel_threads = device_param->kernel_wgs2e; + dynamic_shared_mem = device_param->kernel_dynamic_local_mem_size2e; + break; case KERN_RUN_23: kernel_threads = device_param->kernel_wgs23; dynamic_shared_mem = device_param->kernel_dynamic_local_mem_size23; @@ -3516,6 +3525,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con case KERN_RUN_1: cuda_function = device_param->cuda_function1; break; case KERN_RUN_12: cuda_function = device_param->cuda_function12; break; case KERN_RUN_2: cuda_function = device_param->cuda_function2; break; + case KERN_RUN_2E: cuda_function = device_param->cuda_function2e; break; case KERN_RUN_23: cuda_function = device_param->cuda_function23; break; case KERN_RUN_3: cuda_function = device_param->cuda_function3; break; case KERN_RUN_4: cuda_function = device_param->cuda_function4; break; @@ -3609,6 +3619,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con case KERN_RUN_1: opencl_kernel = device_param->opencl_kernel1; break; case KERN_RUN_12: opencl_kernel = device_param->opencl_kernel12; break; case KERN_RUN_2: opencl_kernel = device_param->opencl_kernel2; break; + case KERN_RUN_2E: opencl_kernel = device_param->opencl_kernel2e; break; case KERN_RUN_23: opencl_kernel = device_param->opencl_kernel23; break; case KERN_RUN_3: opencl_kernel = device_param->opencl_kernel3; break; case KERN_RUN_4: opencl_kernel = device_param->opencl_kernel4; break; @@ -3703,6 +3714,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con { case KERN_RUN_1: if (device_param->exec_us_prev1[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev1[iterationm] * device_param->spin_damp)); break; case KERN_RUN_2: if (device_param->exec_us_prev2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev2[iterationm] * device_param->spin_damp)); break; + case KERN_RUN_2E: if (device_param->exec_us_prev2e[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev2e[iterationm] * device_param->spin_damp)); break; case KERN_RUN_3: if (device_param->exec_us_prev3[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev3[iterationm] * device_param->spin_damp)); break; case KERN_RUN_4: if (device_param->exec_us_prev4[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev4[iterationm] * device_param->spin_damp)); break; case KERN_RUN_INIT2: if (device_param->exec_us_prev_init2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_init2[iterationm] * device_param->spin_damp)); break; @@ -3746,6 +3758,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con { case KERN_RUN_1: device_param->exec_us_prev1[iterationm] = exec_us; break; case KERN_RUN_2: device_param->exec_us_prev2[iterationm] = exec_us; break; + case KERN_RUN_2E: device_param->exec_us_prev2e[iterationm] = exec_us; break; case KERN_RUN_3: device_param->exec_us_prev3[iterationm] = exec_us; break; case KERN_RUN_4: device_param->exec_us_prev4[iterationm] = exec_us; break; case KERN_RUN_INIT2: device_param->exec_us_prev_init2[iterationm] = exec_us; break; @@ -8887,6 +8900,23 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) device_param->kernel_preferred_wgs_multiple3 = device_param->cuda_warp_size; + if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) + { + // kernel2e + + snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_extended", kern_type); + + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2e, device_param->cuda_module, kernel_name) == -1) return -1; + + if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2e, &device_param->kernel_wgs2e) == -1) return -1; + + if (get_cuda_kernel_local_mem_size (hashcat_ctx, device_param->cuda_function2e, &device_param->kernel_local_mem_size2e) == -1) return -1; + + if (get_cuda_kernel_dynamic_local_mem_size (hashcat_ctx, device_param->cuda_function2e, &device_param->kernel_dynamic_local_mem_size2e) == -1) return -1; + + device_param->kernel_preferred_wgs_multiple2e = device_param->cuda_warp_size; + } + // kernel12 if (hashconfig->opts_type & OPTS_TYPE_HOOK12) @@ -9453,6 +9483,23 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (get_opencl_kernel_preferred_wgs_multiple (hashcat_ctx, device_param, device_param->opencl_kernel3, &device_param->kernel_preferred_wgs_multiple3) == -1) return -1; + // aux1 + + if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) + { + snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_extended", kern_type); + + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2e) == -1) return -1; + + if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2e, &device_param->kernel_wgs2e) == -1) return -1; + + if (get_opencl_kernel_local_mem_size (hashcat_ctx, device_param, device_param->opencl_kernel2e, &device_param->kernel_local_mem_size2e) == -1) return -1; + + if (get_opencl_kernel_dynamic_local_mem_size (hashcat_ctx, device_param, device_param->opencl_kernel2e, &device_param->kernel_dynamic_local_mem_size2e) == -1) return -1; + + if (get_opencl_kernel_preferred_wgs_multiple (hashcat_ctx, device_param, device_param->opencl_kernel2e, &device_param->kernel_preferred_wgs_multiple2e) == -1) return -1; + } + // kernel12 if (hashconfig->opts_type & OPTS_TYPE_HOOK12) @@ -10332,6 +10379,7 @@ void backend_session_destroy (hashcat_ctx_t *hashcat_ctx) device_param->cuda_function1 = NULL; device_param->cuda_function12 = NULL; device_param->cuda_function2 = NULL; + device_param->cuda_function2e = NULL; device_param->cuda_function23 = NULL; device_param->cuda_function3 = NULL; device_param->cuda_function4 = NULL; @@ -10399,6 +10447,7 @@ void backend_session_destroy (hashcat_ctx_t *hashcat_ctx) if (device_param->opencl_kernel1) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel1); if (device_param->opencl_kernel12) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel12); if (device_param->opencl_kernel2) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel2); + if (device_param->opencl_kernel2e) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel2e); if (device_param->opencl_kernel23) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel23); if (device_param->opencl_kernel3) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel3); if (device_param->opencl_kernel4) hc_clReleaseKernel (hashcat_ctx, device_param->opencl_kernel4); @@ -10464,6 +10513,7 @@ void backend_session_destroy (hashcat_ctx_t *hashcat_ctx) device_param->opencl_kernel1 = NULL; device_param->opencl_kernel12 = NULL; device_param->opencl_kernel2 = NULL; + device_param->opencl_kernel2e = NULL; device_param->opencl_kernel23 = NULL; device_param->opencl_kernel3 = NULL; device_param->opencl_kernel4 = NULL; diff --git a/src/modules/module_13711.c b/src/modules/module_13711.c index d61ebd25d..6c4402b74 100644 --- a/src/modules/module_13711.c +++ b/src/modules/module_13711.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 512 bit"; static const u64 KERN_TYPE = 13711; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13712.c b/src/modules/module_13712.c index 2bad6eff2..52ffe6b2b 100644 --- a/src/modules/module_13712.c +++ b/src/modules/module_13712.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 1024 bit"; static const u64 KERN_TYPE = 13712; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13713.c b/src/modules/module_13713.c index 286f18bf8..943ff93ab 100644 --- a/src/modules/module_13713.c +++ b/src/modules/module_13713.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 1536 bit"; static const u64 KERN_TYPE = 13713; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13721.c b/src/modules/module_13721.c index 325152c1e..24982d699 100644 --- a/src/modules/module_13721.c +++ b/src/modules/module_13721.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA512 + XTS 512 bit"; static const u64 KERN_TYPE = 13721; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -56,6 +58,7 @@ typedef struct tc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; diff --git a/src/modules/module_13722.c b/src/modules/module_13722.c index 21687d8e3..5a7415224 100644 --- a/src/modules/module_13722.c +++ b/src/modules/module_13722.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA512 + XTS 1024 bit"; static const u64 KERN_TYPE = 13722; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -56,6 +58,7 @@ typedef struct tc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; diff --git a/src/modules/module_13723.c b/src/modules/module_13723.c index 636d7ecc8..963492e2e 100644 --- a/src/modules/module_13723.c +++ b/src/modules/module_13723.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA512 + XTS 1536 bit"; static const u64 KERN_TYPE = 13723; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -56,6 +58,7 @@ typedef struct tc64_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_tmp_t; diff --git a/src/modules/module_13731.c b/src/modules/module_13731.c index 47f5f204a..bff24ccfb 100644 --- a/src/modules/module_13731.c +++ b/src/modules/module_13731.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Whirlpool + XTS 512 bit"; static const u64 KERN_TYPE = 13731; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13732.c b/src/modules/module_13732.c index 0cebe3856..f20b4ca77 100644 --- a/src/modules/module_13732.c +++ b/src/modules/module_13732.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Whirlpool + XTS 1024 bit"; static const u64 KERN_TYPE = 13732; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13733.c b/src/modules/module_13733.c index f6d89e01c..b2dd17013 100644 --- a/src/modules/module_13733.c +++ b/src/modules/module_13733.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Whirlpool + XTS 1536 bit"; static const u64 KERN_TYPE = 13733; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13741.c b/src/modules/module_13741.c index c04ef478d..33bbef907 100644 --- a/src/modules/module_13741.c +++ b/src/modules/module_13741.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 512 bit + boot-mode"; static const u64 KERN_TYPE = 13711; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13742.c b/src/modules/module_13742.c index 89e21b597..6f46eec32 100644 --- a/src/modules/module_13742.c +++ b/src/modules/module_13742.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 1024 bit + boot-mode"; static const u64 KERN_TYPE = 13712; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13743.c b/src/modules/module_13743.c index a5c2792ce..8db6127c6 100644 --- a/src/modules/module_13743.c +++ b/src/modules/module_13743.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt RIPEMD160 + XTS 1536 bit + boot-mode"; static const u64 KERN_TYPE = 13713; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13751.c b/src/modules/module_13751.c index 8a15dbfa4..a6de0854e 100644 --- a/src/modules/module_13751.c +++ b/src/modules/module_13751.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 512 bit"; static const u64 KERN_TYPE = 13751; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13752.c b/src/modules/module_13752.c index f35812725..4b6de70c7 100644 --- a/src/modules/module_13752.c +++ b/src/modules/module_13752.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 1024 bit"; static const u64 KERN_TYPE = 13752; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13753.c b/src/modules/module_13753.c index 54a2a2943..3b520b605 100644 --- a/src/modules/module_13753.c +++ b/src/modules/module_13753.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 1536 bit"; static const u64 KERN_TYPE = 13753; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13761.c b/src/modules/module_13761.c index 95d419c59..53bf93b29 100644 --- a/src/modules/module_13761.c +++ b/src/modules/module_13761.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 512 bit + boot-mode"; static const u64 KERN_TYPE = 13751; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13762.c b/src/modules/module_13762.c index 10639cb78..bfabfffcd 100644 --- a/src/modules/module_13762.c +++ b/src/modules/module_13762.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 1024 bit + boot-mode"; static const u64 KERN_TYPE = 13752; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13763.c b/src/modules/module_13763.c index f28567c39..7afd6927f 100644 --- a/src/modules/module_13763.c +++ b/src/modules/module_13763.c @@ -22,9 +22,11 @@ static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt SHA256 + XTS 1536 bit + boot-mode"; static const u64 KERN_TYPE = 13753; -static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; +static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_KEYBOARD_MAPPING; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -55,6 +57,7 @@ typedef struct vc_tmp u32 pim_key[64]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc_tmp_t; diff --git a/src/modules/module_13771.c b/src/modules/module_13771.c index 971b0de1e..3acc6fdb4 100644 --- a/src/modules/module_13771.c +++ b/src/modules/module_13771.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Streebog-512 + XTS 512 bit"; static const u64 KERN_TYPE = 13771; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -59,6 +61,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; diff --git a/src/modules/module_13772.c b/src/modules/module_13772.c index ac47e5d81..c80944864 100644 --- a/src/modules/module_13772.c +++ b/src/modules/module_13772.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Streebog-512 + XTS 1024 bit"; static const u64 KERN_TYPE = 13772; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -59,6 +61,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; diff --git a/src/modules/module_13773.c b/src/modules/module_13773.c index 248368d00..2d3589db5 100644 --- a/src/modules/module_13773.c +++ b/src/modules/module_13773.c @@ -23,9 +23,11 @@ static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; static const char *HASH_NAME = "VeraCrypt Streebog-512 + XTS 1536 bit"; static const u64 KERN_TYPE = 13773; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64; + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE + | OPTS_TYPE_LOOP_EXTENDED | OPTS_TYPE_COPY_TMPS; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; @@ -59,6 +61,7 @@ typedef struct vc64_sbog_tmp u64 pim_key[32]; int pim; // marker for cracked + int pim_check; // marker for _extended kernel } vc64_sbog_tmp_t; diff --git a/src/selftest.c b/src/selftest.c index 972aba475..0acb7b2a1 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -486,6 +486,11 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param device_param->kernel_params_buf32[29] = loop_left; if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2, 1, false, 0) == -1) return -1; + + if (hashconfig->opts_type & OPTS_TYPE_LOOP_EXTENDED) + { + if (run_kernel (hashcat_ctx, device_param, KERN_RUN_2E, 1, false, 0) == -1) return -1; + } } if (hashconfig->opts_type & OPTS_TYPE_HOOK23)