From a1321d2d6460f52eb193a990c591bf544af22354 Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 7 Jul 2017 22:16:42 +0200 Subject: [PATCH] Added long passwords support for BSDi Crypt, Extended DES --- OpenCL/m12400.cl | 28 ++++++++++------------------ src/interface.c | 2 ++ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/OpenCL/m12400.cl b/OpenCL/m12400.cl index 37efffc1f..7ac2b0f0f 100644 --- a/OpenCL/m12400.cl +++ b/OpenCL/m12400.cl @@ -535,26 +535,18 @@ __kernel void m12400_init (__global pw_t *pws, __global const kernel_rule_t *rul * word */ - u32 w[16]; + const u32 pw_len = pws[gid].pw_len; - w[ 0] = pws[gid].i[ 0]; - w[ 1] = pws[gid].i[ 1]; - w[ 2] = pws[gid].i[ 2]; - w[ 3] = pws[gid].i[ 3]; - w[ 4] = pws[gid].i[ 4]; - w[ 5] = pws[gid].i[ 5]; - w[ 6] = pws[gid].i[ 6]; - w[ 7] = pws[gid].i[ 7]; - w[ 8] = pws[gid].i[ 8]; - w[ 9] = pws[gid].i[ 9]; - w[10] = pws[gid].i[10]; - w[11] = pws[gid].i[11]; - w[12] = pws[gid].i[12]; - w[13] = pws[gid].i[13]; - w[14] = pws[gid].i[14]; - w[15] = pws[gid].i[15]; + const u32 pw_lenv = ceil ((float) pw_len / 4); - u32 pw_len = pws[gid].pw_len; + u32 w[64] = { 0 }; + + for (int idx = 0; idx < pw_lenv; idx++) + { + w[idx] = pws[gid].i[idx]; + + barrier (CLK_GLOBAL_MEM_FENCE); + } u32 tt; diff --git a/src/interface.c b/src/interface.c index ef92f3b21..3fd166797 100644 --- a/src/interface.c +++ b/src/interface.c @@ -24661,6 +24661,8 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) break; case 12200: hashconfig->pw_max = PW_MAX; break; + case 12400: hashconfig->pw_max = PW_MAX; + break; } // pw_max : algo specific hard max length