mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
Drop -m 190, no reason to keep it
This commit is contained in:
parent
c172da1bd2
commit
8298cd4926
@ -1,413 +0,0 @@
|
||||
/**
|
||||
* Author......: Jens Steube <jens.steube@gmail.com>
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#define _SHA1_
|
||||
|
||||
#define NEW_SIMD_CODE
|
||||
|
||||
#include "inc_hash_constants.h"
|
||||
#include "inc_vendor.cl"
|
||||
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 4
|
||||
#define DGST_R2 3
|
||||
#define DGST_R3 2
|
||||
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "inc_types.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_rp.h"
|
||||
#include "inc_rp.cl"
|
||||
#include "inc_simd.cl"
|
||||
|
||||
__kernel void m00190_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 pw_buf0[4];
|
||||
u32 pw_buf1[4];
|
||||
|
||||
pw_buf0[0] = pws[gid].i[0];
|
||||
pw_buf0[1] = pws[gid].i[1];
|
||||
pw_buf0[2] = pws[gid].i[2];
|
||||
pw_buf0[3] = pws[gid].i[3];
|
||||
pw_buf1[0] = pws[gid].i[4];
|
||||
pw_buf1[1] = pws[gid].i[5];
|
||||
pw_buf1[2] = pws[gid].i[6];
|
||||
pw_buf1[3] = pws[gid].i[7];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
u32x w0[4] = { 0 };
|
||||
u32x w1[4] = { 0 };
|
||||
u32x w2[4] = { 0 };
|
||||
u32x w3[4] = { 0 };
|
||||
|
||||
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
||||
|
||||
append_0x80_2x4_VV (w0, w1, out_len);
|
||||
|
||||
/**
|
||||
* sha1
|
||||
*/
|
||||
|
||||
u32x w0_t = swap32 (w0[0]);
|
||||
u32x w1_t = swap32 (w0[1]);
|
||||
u32x w2_t = swap32 (w0[2]);
|
||||
u32x w3_t = swap32 (w0[3]);
|
||||
u32x w4_t = swap32 (w1[0]);
|
||||
u32x w5_t = swap32 (w1[1]);
|
||||
u32x w6_t = swap32 (w1[2]);
|
||||
u32x w7_t = swap32 (w1[3]);
|
||||
u32x w8_t = swap32 (w2[0]);
|
||||
u32x w9_t = swap32 (w2[1]);
|
||||
u32x wa_t = swap32 (w2[2]);
|
||||
u32x wb_t = swap32 (w2[3]);
|
||||
u32x wc_t = swap32 (w3[0]);
|
||||
u32x wd_t = swap32 (w3[1]);
|
||||
u32x we_t = 0;
|
||||
u32x wf_t = out_len * 8;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m00190_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 pw_buf0[4];
|
||||
u32 pw_buf1[4];
|
||||
|
||||
pw_buf0[0] = pws[gid].i[0];
|
||||
pw_buf0[1] = pws[gid].i[1];
|
||||
pw_buf0[2] = pws[gid].i[2];
|
||||
pw_buf0[3] = pws[gid].i[3];
|
||||
pw_buf1[0] = pws[gid].i[4];
|
||||
pw_buf1[1] = pws[gid].i[5];
|
||||
pw_buf1[2] = pws[gid].i[6];
|
||||
pw_buf1[3] = pws[gid].i[7];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[digests_offset].digest_buf[DGST_R0],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R1],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R2],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
u32x w0[4] = { 0 };
|
||||
u32x w1[4] = { 0 };
|
||||
u32x w2[4] = { 0 };
|
||||
u32x w3[4] = { 0 };
|
||||
|
||||
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
||||
|
||||
append_0x80_2x4_VV (w0, w1, out_len);
|
||||
|
||||
/**
|
||||
* sha1
|
||||
*/
|
||||
|
||||
u32x w0_t = swap32 (w0[0]);
|
||||
u32x w1_t = swap32 (w0[1]);
|
||||
u32x w2_t = swap32 (w0[2]);
|
||||
u32x w3_t = swap32 (w0[3]);
|
||||
u32x w4_t = swap32 (w1[0]);
|
||||
u32x w5_t = swap32 (w1[1]);
|
||||
u32x w6_t = swap32 (w1[2]);
|
||||
u32x w7_t = swap32 (w1[3]);
|
||||
u32x w8_t = swap32 (w2[0]);
|
||||
u32x w9_t = swap32 (w2[1]);
|
||||
u32x wa_t = swap32 (w2[2]);
|
||||
u32x wb_t = swap32 (w2[3]);
|
||||
u32x wc_t = swap32 (w3[0]);
|
||||
u32x wd_t = swap32 (w3[1]);
|
||||
u32x we_t = 0;
|
||||
u32x wf_t = out_len * 8;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m00190_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
@ -1,527 +0,0 @@
|
||||
/**
|
||||
* Author......: Jens Steube <jens.steube@gmail.com>
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#define _SHA1_
|
||||
|
||||
#define NEW_SIMD_CODE
|
||||
|
||||
#include "inc_hash_constants.h"
|
||||
#include "inc_vendor.cl"
|
||||
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 4
|
||||
#define DGST_R2 3
|
||||
#define DGST_R3 2
|
||||
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "inc_types.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_simd.cl"
|
||||
|
||||
__kernel void m00190_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 pw_buf0[4];
|
||||
u32 pw_buf1[4];
|
||||
|
||||
pw_buf0[0] = pws[gid].i[0];
|
||||
pw_buf0[1] = pws[gid].i[1];
|
||||
pw_buf0[2] = pws[gid].i[2];
|
||||
pw_buf0[3] = pws[gid].i[3];
|
||||
pw_buf1[0] = pws[gid].i[4];
|
||||
pw_buf1[1] = pws[gid].i[5];
|
||||
pw_buf1[2] = pws[gid].i[6];
|
||||
pw_buf1[3] = pws[gid].i[7];
|
||||
|
||||
const u32 pw_l_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
|
||||
|
||||
const u32x pw_len = pw_l_len + pw_r_len;
|
||||
|
||||
/**
|
||||
* concat password candidate
|
||||
*/
|
||||
|
||||
u32x wordl0[4] = { 0 };
|
||||
u32x wordl1[4] = { 0 };
|
||||
u32x wordl2[4] = { 0 };
|
||||
u32x wordl3[4] = { 0 };
|
||||
|
||||
wordl0[0] = pw_buf0[0];
|
||||
wordl0[1] = pw_buf0[1];
|
||||
wordl0[2] = pw_buf0[2];
|
||||
wordl0[3] = pw_buf0[3];
|
||||
wordl1[0] = pw_buf1[0];
|
||||
wordl1[1] = pw_buf1[1];
|
||||
wordl1[2] = pw_buf1[2];
|
||||
wordl1[3] = pw_buf1[3];
|
||||
|
||||
u32x wordr0[4] = { 0 };
|
||||
u32x wordr1[4] = { 0 };
|
||||
u32x wordr2[4] = { 0 };
|
||||
u32x wordr3[4] = { 0 };
|
||||
|
||||
wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
|
||||
wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
|
||||
wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
|
||||
wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
|
||||
wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
|
||||
wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
|
||||
wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
|
||||
wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
|
||||
|
||||
if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
|
||||
{
|
||||
switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
|
||||
}
|
||||
|
||||
u32x w0[4];
|
||||
u32x w1[4];
|
||||
u32x w2[4];
|
||||
u32x w3[4];
|
||||
|
||||
w0[0] = wordl0[0] | wordr0[0];
|
||||
w0[1] = wordl0[1] | wordr0[1];
|
||||
w0[2] = wordl0[2] | wordr0[2];
|
||||
w0[3] = wordl0[3] | wordr0[3];
|
||||
w1[0] = wordl1[0] | wordr1[0];
|
||||
w1[1] = wordl1[1] | wordr1[1];
|
||||
w1[2] = wordl1[2] | wordr1[2];
|
||||
w1[3] = wordl1[3] | wordr1[3];
|
||||
w2[0] = wordl2[0] | wordr2[0];
|
||||
w2[1] = wordl2[1] | wordr2[1];
|
||||
w2[2] = wordl2[2] | wordr2[2];
|
||||
w2[3] = wordl2[3] | wordr2[3];
|
||||
w3[0] = wordl3[0] | wordr3[0];
|
||||
w3[1] = wordl3[1] | wordr3[1];
|
||||
w3[2] = wordl3[2] | wordr3[2];
|
||||
w3[3] = wordl3[3] | wordr3[3];
|
||||
|
||||
/**
|
||||
* sha1
|
||||
*/
|
||||
|
||||
u32x w0_t = swap32 (w0[0]);
|
||||
u32x w1_t = swap32 (w0[1]);
|
||||
u32x w2_t = swap32 (w0[2]);
|
||||
u32x w3_t = swap32 (w0[3]);
|
||||
u32x w4_t = swap32 (w1[0]);
|
||||
u32x w5_t = swap32 (w1[1]);
|
||||
u32x w6_t = swap32 (w1[2]);
|
||||
u32x w7_t = swap32 (w1[3]);
|
||||
u32x w8_t = swap32 (w2[0]);
|
||||
u32x w9_t = swap32 (w2[1]);
|
||||
u32x wa_t = swap32 (w2[2]);
|
||||
u32x wb_t = swap32 (w2[3]);
|
||||
u32x wc_t = swap32 (w3[0]);
|
||||
u32x wd_t = swap32 (w3[1]);
|
||||
u32x we_t = 0;
|
||||
u32x wf_t = pw_len * 8;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m00190_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 pw_buf0[4];
|
||||
u32 pw_buf1[4];
|
||||
|
||||
pw_buf0[0] = pws[gid].i[0];
|
||||
pw_buf0[1] = pws[gid].i[1];
|
||||
pw_buf0[2] = pws[gid].i[2];
|
||||
pw_buf0[3] = pws[gid].i[3];
|
||||
pw_buf1[0] = pws[gid].i[4];
|
||||
pw_buf1[1] = pws[gid].i[5];
|
||||
pw_buf1[2] = pws[gid].i[6];
|
||||
pw_buf1[3] = pws[gid].i[7];
|
||||
|
||||
const u32 pw_l_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[digests_offset].digest_buf[DGST_R0],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R1],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R2],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
|
||||
|
||||
const u32x pw_len = pw_l_len + pw_r_len;
|
||||
|
||||
/**
|
||||
* concat password candidate
|
||||
*/
|
||||
|
||||
u32x wordl0[4] = { 0 };
|
||||
u32x wordl1[4] = { 0 };
|
||||
u32x wordl2[4] = { 0 };
|
||||
u32x wordl3[4] = { 0 };
|
||||
|
||||
wordl0[0] = pw_buf0[0];
|
||||
wordl0[1] = pw_buf0[1];
|
||||
wordl0[2] = pw_buf0[2];
|
||||
wordl0[3] = pw_buf0[3];
|
||||
wordl1[0] = pw_buf1[0];
|
||||
wordl1[1] = pw_buf1[1];
|
||||
wordl1[2] = pw_buf1[2];
|
||||
wordl1[3] = pw_buf1[3];
|
||||
|
||||
u32x wordr0[4] = { 0 };
|
||||
u32x wordr1[4] = { 0 };
|
||||
u32x wordr2[4] = { 0 };
|
||||
u32x wordr3[4] = { 0 };
|
||||
|
||||
wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
|
||||
wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
|
||||
wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
|
||||
wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
|
||||
wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
|
||||
wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
|
||||
wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
|
||||
wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
|
||||
|
||||
if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
|
||||
{
|
||||
switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
|
||||
}
|
||||
|
||||
u32x w0[4];
|
||||
u32x w1[4];
|
||||
u32x w2[4];
|
||||
u32x w3[4];
|
||||
|
||||
w0[0] = wordl0[0] | wordr0[0];
|
||||
w0[1] = wordl0[1] | wordr0[1];
|
||||
w0[2] = wordl0[2] | wordr0[2];
|
||||
w0[3] = wordl0[3] | wordr0[3];
|
||||
w1[0] = wordl1[0] | wordr1[0];
|
||||
w1[1] = wordl1[1] | wordr1[1];
|
||||
w1[2] = wordl1[2] | wordr1[2];
|
||||
w1[3] = wordl1[3] | wordr1[3];
|
||||
w2[0] = wordl2[0] | wordr2[0];
|
||||
w2[1] = wordl2[1] | wordr2[1];
|
||||
w2[2] = wordl2[2] | wordr2[2];
|
||||
w2[3] = wordl2[3] | wordr2[3];
|
||||
w3[0] = wordl3[0] | wordr3[0];
|
||||
w3[1] = wordl3[1] | wordr3[1];
|
||||
w3[2] = wordl3[2] | wordr3[2];
|
||||
w3[3] = wordl3[3] | wordr3[3];
|
||||
|
||||
/**
|
||||
* sha1
|
||||
*/
|
||||
|
||||
u32x w0_t = swap32 (w0[0]);
|
||||
u32x w1_t = swap32 (w0[1]);
|
||||
u32x w2_t = swap32 (w0[2]);
|
||||
u32x w3_t = swap32 (w0[3]);
|
||||
u32x w4_t = swap32 (w1[0]);
|
||||
u32x w5_t = swap32 (w1[1]);
|
||||
u32x w6_t = swap32 (w1[2]);
|
||||
u32x w7_t = swap32 (w1[3]);
|
||||
u32x w8_t = swap32 (w2[0]);
|
||||
u32x w9_t = swap32 (w2[1]);
|
||||
u32x wa_t = swap32 (w2[2]);
|
||||
u32x wb_t = swap32 (w2[3]);
|
||||
u32x wc_t = swap32 (w3[0]);
|
||||
u32x wd_t = swap32 (w3[1]);
|
||||
u32x we_t = 0;
|
||||
u32x wf_t = pw_len * 8;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
|
||||
w0_t = rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
|
||||
w1_t = rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
|
||||
w2_t = rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
|
||||
w3_t = rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
|
||||
w4_t = rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
|
||||
w5_t = rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
|
||||
w6_t = rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
|
||||
w7_t = rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
|
||||
w8_t = rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
|
||||
w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
|
||||
wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
|
||||
wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
|
||||
wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
|
||||
wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
|
||||
we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
|
||||
wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m00190_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m00190_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
}
|
@ -1,767 +0,0 @@
|
||||
/**
|
||||
* Author......: Jens Steube <jens.steube@gmail.com>
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#define _SHA1_
|
||||
|
||||
#define NEW_SIMD_CODE
|
||||
|
||||
#include "inc_hash_constants.h"
|
||||
#include "inc_vendor.cl"
|
||||
|
||||
#define DGST_R0 0
|
||||
#define DGST_R1 4
|
||||
#define DGST_R2 3
|
||||
#define DGST_R3 2
|
||||
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "inc_types.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_simd.cl"
|
||||
|
||||
void m00190m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 c_16s = rotl32_S ((w[13] ^ w[ 8] ^ w[ 2] ), 1u);
|
||||
const u32 c_17s = rotl32_S ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
|
||||
const u32 c_18s = rotl32_S ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
|
||||
const u32 c_19s = rotl32_S ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
|
||||
const u32 c_20s = rotl32_S ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
|
||||
const u32 c_21s = rotl32_S ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
|
||||
const u32 c_22s = rotl32_S ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
|
||||
const u32 c_23s = rotl32_S ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
|
||||
const u32 c_24s = rotl32_S ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
|
||||
const u32 c_25s = rotl32_S ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
|
||||
const u32 c_26s = rotl32_S ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
|
||||
const u32 c_27s = rotl32_S ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
|
||||
const u32 c_28s = rotl32_S ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
|
||||
const u32 c_29s = rotl32_S ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
|
||||
const u32 c_30s = rotl32_S ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
|
||||
const u32 c_31s = rotl32_S ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
|
||||
const u32 c_32s = rotl32_S ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
|
||||
const u32 c_33s = rotl32_S ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
|
||||
const u32 c_34s = rotl32_S ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
|
||||
const u32 c_35s = rotl32_S ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
|
||||
const u32 c_36s = rotl32_S ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
|
||||
const u32 c_37s = rotl32_S ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
|
||||
const u32 c_38s = rotl32_S ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
|
||||
const u32 c_39s = rotl32_S ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
|
||||
const u32 c_40s = rotl32_S ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
|
||||
const u32 c_41s = rotl32_S ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
|
||||
const u32 c_42s = rotl32_S ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
|
||||
const u32 c_43s = rotl32_S ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
|
||||
const u32 c_44s = rotl32_S ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
|
||||
const u32 c_45s = rotl32_S ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
|
||||
const u32 c_46s = rotl32_S ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
|
||||
const u32 c_47s = rotl32_S ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
|
||||
const u32 c_48s = rotl32_S ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
|
||||
const u32 c_49s = rotl32_S ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
|
||||
const u32 c_50s = rotl32_S ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
|
||||
const u32 c_51s = rotl32_S ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
|
||||
const u32 c_52s = rotl32_S ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
|
||||
const u32 c_53s = rotl32_S ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
|
||||
const u32 c_54s = rotl32_S ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
|
||||
const u32 c_55s = rotl32_S ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
|
||||
const u32 c_56s = rotl32_S ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
|
||||
const u32 c_57s = rotl32_S ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
|
||||
const u32 c_58s = rotl32_S ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
|
||||
const u32 c_59s = rotl32_S ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
|
||||
const u32 c_60s = rotl32_S ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
|
||||
const u32 c_61s = rotl32_S ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
|
||||
const u32 c_62s = rotl32_S ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
|
||||
const u32 c_63s = rotl32_S ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
|
||||
const u32 c_64s = rotl32_S ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
|
||||
const u32 c_65s = rotl32_S ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
|
||||
const u32 c_66s = rotl32_S ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
|
||||
const u32 c_67s = rotl32_S ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
|
||||
const u32 c_68s = rotl32_S ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
|
||||
const u32 c_69s = rotl32_S ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
|
||||
const u32 c_70s = rotl32_S ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
|
||||
const u32 c_71s = rotl32_S ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
|
||||
const u32 c_72s = rotl32_S ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
|
||||
const u32 c_73s = rotl32_S ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
|
||||
const u32 c_74s = rotl32_S ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
|
||||
const u32 c_75s = rotl32_S ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
|
||||
|
||||
const u32 c_17sK = c_17s + SHA1C00;
|
||||
const u32 c_18sK = c_18s + SHA1C00;
|
||||
const u32 c_20sK = c_20s + SHA1C01;
|
||||
const u32 c_21sK = c_21s + SHA1C01;
|
||||
const u32 c_23sK = c_23s + SHA1C01;
|
||||
const u32 c_26sK = c_26s + SHA1C01;
|
||||
const u32 c_27sK = c_27s + SHA1C01;
|
||||
const u32 c_29sK = c_29s + SHA1C01;
|
||||
const u32 c_33sK = c_33s + SHA1C01;
|
||||
const u32 c_39sK = c_39s + SHA1C01;
|
||||
const u32 c_41sK = c_41s + SHA1C02;
|
||||
const u32 c_45sK = c_45s + SHA1C02;
|
||||
const u32 c_53sK = c_53s + SHA1C02;
|
||||
const u32 c_65sK = c_65s + SHA1C03;
|
||||
const u32 c_69sK = c_69s + SHA1C03;
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
u32 w0l = w[0];
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
|
||||
|
||||
const u32x w0 = w0l | w0r;
|
||||
|
||||
const u32x w0s01 = rotl32 (w0, 1u);
|
||||
const u32x w0s02 = rotl32 (w0, 2u);
|
||||
const u32x w0s03 = rotl32 (w0, 3u);
|
||||
const u32x w0s04 = rotl32 (w0, 4u);
|
||||
const u32x w0s05 = rotl32 (w0, 5u);
|
||||
const u32x w0s06 = rotl32 (w0, 6u);
|
||||
const u32x w0s07 = rotl32 (w0, 7u);
|
||||
const u32x w0s08 = rotl32 (w0, 8u);
|
||||
const u32x w0s09 = rotl32 (w0, 9u);
|
||||
const u32x w0s10 = rotl32 (w0, 10u);
|
||||
const u32x w0s11 = rotl32 (w0, 11u);
|
||||
const u32x w0s12 = rotl32 (w0, 12u);
|
||||
const u32x w0s13 = rotl32 (w0, 13u);
|
||||
const u32x w0s14 = rotl32 (w0, 14u);
|
||||
const u32x w0s15 = rotl32 (w0, 15u);
|
||||
const u32x w0s16 = rotl32 (w0, 16u);
|
||||
const u32x w0s17 = rotl32 (w0, 17u);
|
||||
const u32x w0s18 = rotl32 (w0, 18u);
|
||||
const u32x w0s19 = rotl32 (w0, 19u);
|
||||
const u32x w0s20 = rotl32 (w0, 20u);
|
||||
|
||||
const u32x w0s04___w0s06 = w0s04 ^ w0s06;
|
||||
const u32x w0s04___w0s08 = w0s04 ^ w0s08;
|
||||
const u32x w0s08___w0s12 = w0s08 ^ w0s12;
|
||||
const u32x w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[ 1]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[ 2]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[ 3]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[ 4]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[ 5]);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[ 6]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[ 7]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[ 8]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[ 9]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[10]);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[11]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[12]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[13]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[14]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[15]);
|
||||
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
|
||||
SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
|
||||
SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
|
||||
SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
|
||||
SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
|
||||
SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
|
||||
SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
|
||||
SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
|
||||
SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
|
||||
SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
|
||||
SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
|
||||
SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
|
||||
|
||||
const u32x c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
|
||||
const u32x c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
|
||||
const u32x c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
|
||||
const u32x c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
|
||||
|
||||
const u32x w0s21 = rotl32 (w0, 21u);
|
||||
const u32x w0s22 = rotl32 (w0, 22U);
|
||||
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_M_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
void m00190s (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset)
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
const u32 lid = get_local_id (0);
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 c_16s = rotl32_S ((w[13] ^ w[ 8] ^ w[ 2] ), 1u);
|
||||
const u32 c_17s = rotl32_S ((w[14] ^ w[ 9] ^ w[ 3] ^ w[ 1]), 1u);
|
||||
const u32 c_18s = rotl32_S ((w[15] ^ w[10] ^ w[ 4] ^ w[ 2]), 1u);
|
||||
const u32 c_19s = rotl32_S ((c_16s ^ w[11] ^ w[ 5] ^ w[ 3]), 1u);
|
||||
const u32 c_20s = rotl32_S ((c_17s ^ w[12] ^ w[ 6] ^ w[ 4]), 1u);
|
||||
const u32 c_21s = rotl32_S ((c_18s ^ w[13] ^ w[ 7] ^ w[ 5]), 1u);
|
||||
const u32 c_22s = rotl32_S ((c_19s ^ w[14] ^ w[ 8] ^ w[ 6]), 1u);
|
||||
const u32 c_23s = rotl32_S ((c_20s ^ w[15] ^ w[ 9] ^ w[ 7]), 1u);
|
||||
const u32 c_24s = rotl32_S ((c_21s ^ c_16s ^ w[10] ^ w[ 8]), 1u);
|
||||
const u32 c_25s = rotl32_S ((c_22s ^ c_17s ^ w[11] ^ w[ 9]), 1u);
|
||||
const u32 c_26s = rotl32_S ((c_23s ^ c_18s ^ w[12] ^ w[10]), 1u);
|
||||
const u32 c_27s = rotl32_S ((c_24s ^ c_19s ^ w[13] ^ w[11]), 1u);
|
||||
const u32 c_28s = rotl32_S ((c_25s ^ c_20s ^ w[14] ^ w[12]), 1u);
|
||||
const u32 c_29s = rotl32_S ((c_26s ^ c_21s ^ w[15] ^ w[13]), 1u);
|
||||
const u32 c_30s = rotl32_S ((c_27s ^ c_22s ^ c_16s ^ w[14]), 1u);
|
||||
const u32 c_31s = rotl32_S ((c_28s ^ c_23s ^ c_17s ^ w[15]), 1u);
|
||||
const u32 c_32s = rotl32_S ((c_29s ^ c_24s ^ c_18s ^ c_16s), 1u);
|
||||
const u32 c_33s = rotl32_S ((c_30s ^ c_25s ^ c_19s ^ c_17s), 1u);
|
||||
const u32 c_34s = rotl32_S ((c_31s ^ c_26s ^ c_20s ^ c_18s), 1u);
|
||||
const u32 c_35s = rotl32_S ((c_32s ^ c_27s ^ c_21s ^ c_19s), 1u);
|
||||
const u32 c_36s = rotl32_S ((c_33s ^ c_28s ^ c_22s ^ c_20s), 1u);
|
||||
const u32 c_37s = rotl32_S ((c_34s ^ c_29s ^ c_23s ^ c_21s), 1u);
|
||||
const u32 c_38s = rotl32_S ((c_35s ^ c_30s ^ c_24s ^ c_22s), 1u);
|
||||
const u32 c_39s = rotl32_S ((c_36s ^ c_31s ^ c_25s ^ c_23s), 1u);
|
||||
const u32 c_40s = rotl32_S ((c_37s ^ c_32s ^ c_26s ^ c_24s), 1u);
|
||||
const u32 c_41s = rotl32_S ((c_38s ^ c_33s ^ c_27s ^ c_25s), 1u);
|
||||
const u32 c_42s = rotl32_S ((c_39s ^ c_34s ^ c_28s ^ c_26s), 1u);
|
||||
const u32 c_43s = rotl32_S ((c_40s ^ c_35s ^ c_29s ^ c_27s), 1u);
|
||||
const u32 c_44s = rotl32_S ((c_41s ^ c_36s ^ c_30s ^ c_28s), 1u);
|
||||
const u32 c_45s = rotl32_S ((c_42s ^ c_37s ^ c_31s ^ c_29s), 1u);
|
||||
const u32 c_46s = rotl32_S ((c_43s ^ c_38s ^ c_32s ^ c_30s), 1u);
|
||||
const u32 c_47s = rotl32_S ((c_44s ^ c_39s ^ c_33s ^ c_31s), 1u);
|
||||
const u32 c_48s = rotl32_S ((c_45s ^ c_40s ^ c_34s ^ c_32s), 1u);
|
||||
const u32 c_49s = rotl32_S ((c_46s ^ c_41s ^ c_35s ^ c_33s), 1u);
|
||||
const u32 c_50s = rotl32_S ((c_47s ^ c_42s ^ c_36s ^ c_34s), 1u);
|
||||
const u32 c_51s = rotl32_S ((c_48s ^ c_43s ^ c_37s ^ c_35s), 1u);
|
||||
const u32 c_52s = rotl32_S ((c_49s ^ c_44s ^ c_38s ^ c_36s), 1u);
|
||||
const u32 c_53s = rotl32_S ((c_50s ^ c_45s ^ c_39s ^ c_37s), 1u);
|
||||
const u32 c_54s = rotl32_S ((c_51s ^ c_46s ^ c_40s ^ c_38s), 1u);
|
||||
const u32 c_55s = rotl32_S ((c_52s ^ c_47s ^ c_41s ^ c_39s), 1u);
|
||||
const u32 c_56s = rotl32_S ((c_53s ^ c_48s ^ c_42s ^ c_40s), 1u);
|
||||
const u32 c_57s = rotl32_S ((c_54s ^ c_49s ^ c_43s ^ c_41s), 1u);
|
||||
const u32 c_58s = rotl32_S ((c_55s ^ c_50s ^ c_44s ^ c_42s), 1u);
|
||||
const u32 c_59s = rotl32_S ((c_56s ^ c_51s ^ c_45s ^ c_43s), 1u);
|
||||
const u32 c_60s = rotl32_S ((c_57s ^ c_52s ^ c_46s ^ c_44s), 1u);
|
||||
const u32 c_61s = rotl32_S ((c_58s ^ c_53s ^ c_47s ^ c_45s), 1u);
|
||||
const u32 c_62s = rotl32_S ((c_59s ^ c_54s ^ c_48s ^ c_46s), 1u);
|
||||
const u32 c_63s = rotl32_S ((c_60s ^ c_55s ^ c_49s ^ c_47s), 1u);
|
||||
const u32 c_64s = rotl32_S ((c_61s ^ c_56s ^ c_50s ^ c_48s), 1u);
|
||||
const u32 c_65s = rotl32_S ((c_62s ^ c_57s ^ c_51s ^ c_49s), 1u);
|
||||
const u32 c_66s = rotl32_S ((c_63s ^ c_58s ^ c_52s ^ c_50s), 1u);
|
||||
const u32 c_67s = rotl32_S ((c_64s ^ c_59s ^ c_53s ^ c_51s), 1u);
|
||||
const u32 c_68s = rotl32_S ((c_65s ^ c_60s ^ c_54s ^ c_52s), 1u);
|
||||
const u32 c_69s = rotl32_S ((c_66s ^ c_61s ^ c_55s ^ c_53s), 1u);
|
||||
const u32 c_70s = rotl32_S ((c_67s ^ c_62s ^ c_56s ^ c_54s), 1u);
|
||||
const u32 c_71s = rotl32_S ((c_68s ^ c_63s ^ c_57s ^ c_55s), 1u);
|
||||
const u32 c_72s = rotl32_S ((c_69s ^ c_64s ^ c_58s ^ c_56s), 1u);
|
||||
const u32 c_73s = rotl32_S ((c_70s ^ c_65s ^ c_59s ^ c_57s), 1u);
|
||||
const u32 c_74s = rotl32_S ((c_71s ^ c_66s ^ c_60s ^ c_58s), 1u);
|
||||
const u32 c_75s = rotl32_S ((c_72s ^ c_67s ^ c_61s ^ c_59s), 1u);
|
||||
|
||||
const u32 c_17sK = c_17s + SHA1C00;
|
||||
const u32 c_18sK = c_18s + SHA1C00;
|
||||
const u32 c_20sK = c_20s + SHA1C01;
|
||||
const u32 c_21sK = c_21s + SHA1C01;
|
||||
const u32 c_23sK = c_23s + SHA1C01;
|
||||
const u32 c_26sK = c_26s + SHA1C01;
|
||||
const u32 c_27sK = c_27s + SHA1C01;
|
||||
const u32 c_29sK = c_29s + SHA1C01;
|
||||
const u32 c_33sK = c_33s + SHA1C01;
|
||||
const u32 c_39sK = c_39s + SHA1C01;
|
||||
const u32 c_41sK = c_41s + SHA1C02;
|
||||
const u32 c_45sK = c_45s + SHA1C02;
|
||||
const u32 c_53sK = c_53s + SHA1C02;
|
||||
const u32 c_65sK = c_65s + SHA1C03;
|
||||
const u32 c_69sK = c_69s + SHA1C03;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[digests_offset].digest_buf[DGST_R0],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R1],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R2],
|
||||
digests_buf[digests_offset].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
u32 w0l = w[0];
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
|
||||
|
||||
const u32x w0 = w0l | w0r;
|
||||
|
||||
const u32x w0s01 = rotl32 (w0, 1u);
|
||||
const u32x w0s02 = rotl32 (w0, 2u);
|
||||
const u32x w0s03 = rotl32 (w0, 3u);
|
||||
const u32x w0s04 = rotl32 (w0, 4u);
|
||||
const u32x w0s05 = rotl32 (w0, 5u);
|
||||
const u32x w0s06 = rotl32 (w0, 6u);
|
||||
const u32x w0s07 = rotl32 (w0, 7u);
|
||||
const u32x w0s08 = rotl32 (w0, 8u);
|
||||
const u32x w0s09 = rotl32 (w0, 9u);
|
||||
const u32x w0s10 = rotl32 (w0, 10u);
|
||||
const u32x w0s11 = rotl32 (w0, 11u);
|
||||
const u32x w0s12 = rotl32 (w0, 12u);
|
||||
const u32x w0s13 = rotl32 (w0, 13u);
|
||||
const u32x w0s14 = rotl32 (w0, 14u);
|
||||
const u32x w0s15 = rotl32 (w0, 15u);
|
||||
const u32x w0s16 = rotl32 (w0, 16u);
|
||||
const u32x w0s17 = rotl32 (w0, 17u);
|
||||
const u32x w0s18 = rotl32 (w0, 18u);
|
||||
const u32x w0s19 = rotl32 (w0, 19u);
|
||||
const u32x w0s20 = rotl32 (w0, 20u);
|
||||
|
||||
const u32x w0s04___w0s06 = w0s04 ^ w0s06;
|
||||
const u32x w0s04___w0s08 = w0s04 ^ w0s08;
|
||||
const u32x w0s08___w0s12 = w0s08 ^ w0s12;
|
||||
const u32x w0s04___w0s06___w0s07 = w0s04___w0s06 ^ w0s07;
|
||||
|
||||
u32x a = SHA1M_A;
|
||||
u32x b = SHA1M_B;
|
||||
u32x c = SHA1M_C;
|
||||
u32x d = SHA1M_D;
|
||||
u32x e = SHA1M_E;
|
||||
|
||||
#undef K
|
||||
#define K SHA1C00
|
||||
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[ 1]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[ 2]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[ 3]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[ 4]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[ 5]);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[ 6]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[ 7]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[ 8]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[ 9]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[10]);
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, w[11]);
|
||||
SHA1_STEP (SHA1_F0o, d, e, a, b, c, w[12]);
|
||||
SHA1_STEP (SHA1_F0o, c, d, e, a, b, w[13]);
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, w[14]);
|
||||
SHA1_STEP (SHA1_F0o, a, b, c, d, e, w[15]);
|
||||
|
||||
SHA1_STEP (SHA1_F0o, e, a, b, c, d, (c_16s ^ w0s01));
|
||||
SHA1_STEPX(SHA1_F0o, d, e, a, b, c, (c_17sK));
|
||||
SHA1_STEPX(SHA1_F0o, c, d, e, a, b, (c_18sK));
|
||||
SHA1_STEP (SHA1_F0o, b, c, d, e, a, (c_19s ^ w0s02));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C01
|
||||
|
||||
SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_20sK));
|
||||
SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_21sK));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_22s ^ w0s03));
|
||||
SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_23sK));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_24s ^ w0s02));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_25s ^ w0s04));
|
||||
SHA1_STEPX(SHA1_F1 , e, a, b, c, d, (c_26sK));
|
||||
SHA1_STEPX(SHA1_F1 , d, e, a, b, c, (c_27sK));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_28s ^ w0s05));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_29sK));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_30s ^ w0s02 ^ w0s04));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_31s ^ w0s06));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_32s ^ w0s02 ^ w0s03));
|
||||
SHA1_STEPX(SHA1_F1 , c, d, e, a, b, (c_33sK));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_34s ^ w0s07));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_35s ^ w0s04));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_36s ^ w0s04___w0s06));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_37s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_38s ^ w0s04));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_39sK));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C02
|
||||
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_40s ^ w0s04 ^ w0s09));
|
||||
SHA1_STEPX(SHA1_F2o, e, a, b, c, d, (c_41sK));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_42s ^ w0s06 ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_43s ^ w0s10));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_44s ^ w0s03 ^ w0s06 ^ w0s07));
|
||||
SHA1_STEPX(SHA1_F2o, a, b, c, d, e, (c_45sK));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_46s ^ w0s04 ^ w0s11));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_47s ^ w0s04___w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_48s ^ w0s03 ^ w0s04___w0s08 ^ w0s05 ^ w0s10));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_49s ^ w0s12));
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_50s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_51s ^ w0s04___w0s06));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_52s ^ w0s04___w0s08 ^ w0s13));
|
||||
SHA1_STEPX(SHA1_F2o, c, d, e, a, b, (c_53sK));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_54s ^ w0s07 ^ w0s10 ^ w0s12));
|
||||
SHA1_STEP (SHA1_F2o, a, b, c, d, e, (c_55s ^ w0s14));
|
||||
SHA1_STEP (SHA1_F2o, e, a, b, c, d, (c_56s ^ w0s04___w0s06___w0s07 ^ w0s10 ^ w0s11));
|
||||
SHA1_STEP (SHA1_F2o, d, e, a, b, c, (c_57s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F2o, c, d, e, a, b, (c_58s ^ w0s04___w0s08 ^ w0s15));
|
||||
SHA1_STEP (SHA1_F2o, b, c, d, e, a, (c_59s ^ w0s08___w0s12));
|
||||
|
||||
#undef K
|
||||
#define K SHA1C03
|
||||
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_60s ^ w0s04 ^ w0s08___w0s12 ^ w0s07 ^ w0s14));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_61s ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_62s ^ w0s04___w0s06 ^ w0s08___w0s12));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_63s ^ w0s08));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_64s ^ w0s04___w0s06___w0s07 ^ w0s08___w0s12 ^ w0s17));
|
||||
SHA1_STEPX(SHA1_F1 , a, b, c, d, e, (c_65sK));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_66s ^ w0s14 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_67s ^ w0s08 ^ w0s18));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_68s ^ w0s11 ^ w0s14 ^ w0s15));
|
||||
SHA1_STEPX(SHA1_F1 , b, c, d, e, a, (c_69sK));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_70s ^ w0s12 ^ w0s19));
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_71s ^ w0s12 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_72s ^ w0s05 ^ w0s11 ^ w0s12 ^ w0s13 ^ w0s16 ^ w0s18));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_73s ^ w0s20));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_74s ^ w0s08 ^ w0s16));
|
||||
SHA1_STEP (SHA1_F1 , a, b, c, d, e, (c_75s ^ w0s06 ^ w0s12 ^ w0s14));
|
||||
|
||||
const u32x c_76s = rotl32 ((c_73s ^ c_68s ^ c_62s ^ c_60s), 1u);
|
||||
const u32x c_77s = rotl32 ((c_74s ^ c_69s ^ c_63s ^ c_61s), 1u);
|
||||
const u32x c_78s = rotl32 ((c_75s ^ c_70s ^ c_64s ^ c_62s), 1u);
|
||||
const u32x c_79s = rotl32 ((c_76s ^ c_71s ^ c_65s ^ c_63s), 1u);
|
||||
|
||||
const u32x w0s21 = rotl32 (w0, 21u);
|
||||
const u32x w0s22 = rotl32 (w0, 22U);
|
||||
|
||||
SHA1_STEP (SHA1_F1 , e, a, b, c, d, (c_76s ^ w0s07 ^ w0s08___w0s12 ^ w0s16 ^ w0s21));
|
||||
SHA1_STEP (SHA1_F1 , d, e, a, b, c, (c_77s));
|
||||
SHA1_STEP (SHA1_F1 , c, d, e, a, b, (c_78s ^ w0s07 ^ w0s08 ^ w0s15 ^ w0s18 ^ w0s20));
|
||||
SHA1_STEP (SHA1_F1 , b, c, d, e, a, (c_79s ^ w0s08 ^ w0s22));
|
||||
|
||||
a += SHA1M_A;
|
||||
e += SHA1M_E;
|
||||
d += SHA1M_D;
|
||||
c += SHA1M_C;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
|
||||
a &= 0x00000fff;
|
||||
|
||||
COMPARE_S_SIMD (a, e, d, c);
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m00190_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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] = 0;
|
||||
w[ 5] = 0;
|
||||
w[ 6] = 0;
|
||||
w[ 7] = 0;
|
||||
w[ 8] = 0;
|
||||
w[ 9] = 0;
|
||||
w[10] = 0;
|
||||
w[11] = 0;
|
||||
w[12] = 0;
|
||||
w[13] = 0;
|
||||
w[14] = 0;
|
||||
w[15] = pws[gid].i[15];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
||||
|
||||
__kernel void m00190_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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] = 0;
|
||||
w[ 9] = 0;
|
||||
w[10] = 0;
|
||||
w[11] = 0;
|
||||
w[12] = 0;
|
||||
w[13] = 0;
|
||||
w[14] = 0;
|
||||
w[15] = pws[gid].i[15];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
||||
|
||||
__kernel void m00190_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
||||
|
||||
__kernel void m00190_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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] = 0;
|
||||
w[ 5] = 0;
|
||||
w[ 6] = 0;
|
||||
w[ 7] = 0;
|
||||
w[ 8] = 0;
|
||||
w[ 9] = 0;
|
||||
w[10] = 0;
|
||||
w[11] = 0;
|
||||
w[12] = 0;
|
||||
w[13] = 0;
|
||||
w[14] = 0;
|
||||
w[15] = pws[gid].i[15];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
||||
|
||||
__kernel void m00190_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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] = 0;
|
||||
w[ 9] = 0;
|
||||
w[10] = 0;
|
||||
w[11] = 0;
|
||||
w[12] = 0;
|
||||
w[13] = 0;
|
||||
w[14] = 0;
|
||||
w[15] = pws[gid].i[15];
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
||||
|
||||
__kernel void m00190_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 gid = get_global_id (0);
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
u32 w[16];
|
||||
|
||||
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_len = pws[gid].pw_len;
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
|
||||
m00190s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset);
|
||||
}
|
@ -177,7 +177,7 @@ _hashcat ()
|
||||
{
|
||||
local VERSION=2.10
|
||||
|
||||
local HASH_MODES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 124 130 131 132 133 140 141 150 160 190 200 300 400 500 501 900 1000 1100 1400 1410 1420 1421 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9710 9720 9800 9810 9820 9900 10000 10100 10200 10300 10400 10410 10420 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000"
|
||||
local HASH_MODES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 124 130 131 132 133 140 141 150 160 200 300 400 500 501 900 1000 1100 1400 1410 1420 1421 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9710 9720 9800 9810 9820 9900 10000 10100 10200 10300 10400 10410 10420 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000"
|
||||
local ATTACK_MODES="0 1 3 6 7"
|
||||
local OUTFILE_FORMATS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
|
||||
local OPENCL_DEVICE_TYPES="1 2 3"
|
||||
|
@ -235,7 +235,6 @@ extern hc_thread_mutex_t mux_display;
|
||||
#define HT_00140 "sha1($salt.unicode($pass))"
|
||||
#define HT_00150 "HMAC-SHA1 (key = $pass)"
|
||||
#define HT_00160 "HMAC-SHA1 (key = $salt)"
|
||||
#define HT_00190 "sha1(LinkedIn)"
|
||||
#define HT_00200 "MySQL323"
|
||||
#define HT_00300 "MySQL4.1/MySQL5"
|
||||
#define HT_00400 "phpass, MD5(Wordpress), MD5(phpBB3), MD5(Joomla)"
|
||||
@ -468,8 +467,6 @@ extern hc_thread_mutex_t mux_display;
|
||||
#define DISPLAY_LEN_MAX_150 40 + 1 + 51
|
||||
#define DISPLAY_LEN_MIN_150H 40 + 1 + 0
|
||||
#define DISPLAY_LEN_MAX_150H 40 + 1 + 102
|
||||
#define DISPLAY_LEN_MIN_190 40
|
||||
#define DISPLAY_LEN_MAX_190 40
|
||||
#define DISPLAY_LEN_MIN_200 16
|
||||
#define DISPLAY_LEN_MAX_200 16
|
||||
#define DISPLAY_LEN_MIN_300 40
|
||||
@ -868,7 +865,6 @@ extern hc_thread_mutex_t mux_display;
|
||||
#define KERN_TYPE_SHA1_SLTPWU 140
|
||||
#define KERN_TYPE_HMACSHA1_PW 150
|
||||
#define KERN_TYPE_HMACSHA1_SLT 160
|
||||
#define KERN_TYPE_SHA1_LINKEDIN 190
|
||||
#define KERN_TYPE_MYSQL 200
|
||||
#define KERN_TYPE_MYSQL41 300
|
||||
#define KERN_TYPE_PHPASS 400
|
||||
@ -1552,7 +1548,6 @@ int osx1_parse_hash (char *input_buf, uint input_len, hash_t *hash
|
||||
int osx512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int phpass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int sha1linkedin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int sha1b64_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int sha1b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
int sha1s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||
|
@ -8086,27 +8086,6 @@ int main (int argc, char **argv)
|
||||
dgst_pos3 = 1;
|
||||
break;
|
||||
|
||||
case 190: hash_type = HASH_TYPE_SHA1;
|
||||
salt_type = SALT_TYPE_NONE;
|
||||
attack_exec = ATTACK_EXEC_INSIDE_KERNEL;
|
||||
opts_type = OPTS_TYPE_PT_GENERATE_BE
|
||||
| OPTS_TYPE_PT_ADD80
|
||||
| OPTS_TYPE_PT_ADDBITS15;
|
||||
kern_type = KERN_TYPE_SHA1_LINKEDIN;
|
||||
dgst_size = DGST_SIZE_4_5;
|
||||
parse_func = sha1linkedin_parse_hash;
|
||||
sort_by_digest = sort_by_digest_4_5;
|
||||
opti_type = OPTI_TYPE_ZERO_BYTE
|
||||
| OPTI_TYPE_PRECOMPUTE_INIT
|
||||
| OPTI_TYPE_EARLY_SKIP
|
||||
| OPTI_TYPE_NOT_ITERATED
|
||||
| OPTI_TYPE_NOT_SALTED;
|
||||
dgst_pos0 = 0;
|
||||
dgst_pos1 = 4;
|
||||
dgst_pos2 = 3;
|
||||
dgst_pos3 = 2;
|
||||
break;
|
||||
|
||||
case 200: hash_type = HASH_TYPE_MYSQL;
|
||||
salt_type = SALT_TYPE_NONE;
|
||||
attack_exec = ATTACK_EXEC_INSIDE_KERNEL;
|
||||
|
16
src/shared.c
16
src/shared.c
@ -5903,7 +5903,6 @@ char *strhashtype (const uint hash_mode)
|
||||
case 141: return ((char *) HT_00141); break;
|
||||
case 150: return ((char *) HT_00150); break;
|
||||
case 160: return ((char *) HT_00160); break;
|
||||
case 190: return ((char *) HT_00190); break;
|
||||
case 200: return ((char *) HT_00200); break;
|
||||
case 300: return ((char *) HT_00300); break;
|
||||
case 400: return ((char *) HT_00400); break;
|
||||
@ -12005,21 +12004,6 @@ int sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
||||
return (PARSER_OK);
|
||||
}
|
||||
|
||||
int sha1linkedin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
||||
{
|
||||
if ((input_len < DISPLAY_LEN_MIN_100) || (input_len > DISPLAY_LEN_MAX_100)) return (PARSER_GLOBAL_LENGTH);
|
||||
|
||||
u32 *digest = (u32 *) hash_buf->digest;
|
||||
|
||||
digest[0] = hex_to_u32 ((const u8 *) &input_buf[ 0]);
|
||||
digest[1] = hex_to_u32 ((const u8 *) &input_buf[ 8]);
|
||||
digest[2] = hex_to_u32 ((const u8 *) &input_buf[16]);
|
||||
digest[3] = hex_to_u32 ((const u8 *) &input_buf[24]);
|
||||
digest[4] = hex_to_u32 ((const u8 *) &input_buf[32]);
|
||||
|
||||
return (PARSER_OK);
|
||||
}
|
||||
|
||||
int sha1axcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
||||
{
|
||||
if ((input_len < DISPLAY_LEN_MIN_13300) || (input_len > DISPLAY_LEN_MAX_13300)) return (PARSER_GLOBAL_LENGTH);
|
||||
|
@ -45,7 +45,7 @@ my $hashcat = "./hashcat";
|
||||
|
||||
my $MAX_LEN = 55;
|
||||
|
||||
my @modes = (0, 10, 11, 12, 20, 21, 22, 23, 30, 40, 50, 60, 100, 101, 110, 111, 112, 120, 121, 122, 125, 130, 131, 132, 133, 140, 141, 150, 160, 190, 200, 300, 400, 500, 900, 1000, 1100, 1400, 1410, 1420, 1430, 1440, 1441, 1450, 1460, 1500, 1600, 1700, 1710, 1711, 1720, 1730, 1740, 1722, 1731, 1750, 1760, 1800, 2100, 2400, 2410, 2500, 2600, 2611, 2612, 2711, 2811, 3000, 3100, 3200, 3710, 3711, 3300, 3500, 3610, 3720, 3800, 3910, 4010, 4110, 4210, 4300, 4400, 4500, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7100, 7200, 7300, 7400, 7500, 7600, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8900, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11900, 12000, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800);
|
||||
my @modes = (0, 10, 11, 12, 20, 21, 22, 23, 30, 40, 50, 60, 100, 101, 110, 111, 112, 120, 121, 122, 125, 130, 131, 132, 133, 140, 141, 150, 160, 200, 300, 400, 500, 900, 1000, 1100, 1400, 1410, 1420, 1430, 1440, 1441, 1450, 1460, 1500, 1600, 1700, 1710, 1711, 1720, 1730, 1740, 1722, 1731, 1750, 1760, 1800, 2100, 2400, 2410, 2500, 2600, 2611, 2612, 2711, 2811, 3000, 3100, 3200, 3710, 3711, 3300, 3500, 3610, 3720, 3800, 3910, 4010, 4110, 4210, 4300, 4400, 4500, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7100, 7200, 7300, 7400, 7500, 7600, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8900, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11900, 12000, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800);
|
||||
|
||||
my %is_unicode = map { $_ => 1 } qw(30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
|
||||
my %less_fifteen = map { $_ => 1 } qw(500 1600 1800 2400 2410 3200 6300 7400 10500 10700);
|
||||
@ -213,7 +213,7 @@ sub verify
|
||||
# remember always do "exists ($db->{$hash_in})" checks as soon as possible and don't forget it
|
||||
|
||||
# unsalted
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 190 || $mode == 200 || $mode == 300 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3000 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 5700 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 8600 || $mode == 9900 || $mode == 10800 || $mode == 11500)
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 200 || $mode == 300 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3000 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 5700 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 8600 || $mode == 9900 || $mode == 10800 || $mode == 11500)
|
||||
{
|
||||
my $index = index ($line, ":");
|
||||
|
||||
@ -2456,19 +2456,6 @@ sub verify
|
||||
|
||||
return unless (substr ($line, 0, $len) eq $hash_out);
|
||||
}
|
||||
elsif ($mode == 190)
|
||||
{
|
||||
$hash_out = gen_hash ($mode, $word, $salt, $iter, 0);
|
||||
|
||||
$len = length $hash_out; # == length $alternative
|
||||
|
||||
if (substr ($line, 0, $len) ne $hash_out)
|
||||
{
|
||||
my $alternative = gen_hash ($mode, $word, $salt, $iter, 1);
|
||||
|
||||
return unless (substr ($line, 0, $len) eq $alternative);
|
||||
}
|
||||
}
|
||||
elsif ($mode == 3300)
|
||||
{
|
||||
$hash_out = gen_hash ($mode, $word, $salt, $iter, $param);
|
||||
@ -2796,7 +2783,7 @@ sub passthrough
|
||||
|
||||
my $tmp_hash;
|
||||
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 190 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 5700 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300)
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 5700 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300)
|
||||
{
|
||||
$tmp_hash = gen_hash ($mode, $word_buf, "");
|
||||
}
|
||||
@ -3197,7 +3184,7 @@ sub single
|
||||
{
|
||||
my $mode = $modes[$j];
|
||||
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 190 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 5300 || $mode == 5400 || $mode == 6000 || $mode == 6100 || $mode == 6600 || $mode == 6900 || $mode == 5700 || $mode == 8200 || $mode == 8300 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300)
|
||||
if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 5300 || $mode == 5400 || $mode == 6000 || $mode == 6100 || $mode == 6600 || $mode == 6900 || $mode == 5700 || $mode == 8200 || $mode == 8300 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300)
|
||||
{
|
||||
for (my $i = 1; $i < 32; $i++)
|
||||
{
|
||||
@ -4268,24 +4255,6 @@ sub gen_hash
|
||||
|
||||
$tmp_hash = sprintf ("%s:%s", $hash_buf, $salt_buf);
|
||||
}
|
||||
elsif ($mode == 190)
|
||||
{
|
||||
$hash_buf = sha1_hex ($word_buf);
|
||||
|
||||
my $variant = int (rand (2));
|
||||
|
||||
if (defined ($additional_param))
|
||||
{
|
||||
$variant = $additional_param;
|
||||
}
|
||||
|
||||
if ($variant == 1)
|
||||
{
|
||||
substr ($hash_buf, 0, 5) = "00000";
|
||||
}
|
||||
|
||||
$tmp_hash = sprintf ("%s", $hash_buf);
|
||||
}
|
||||
elsif ($mode == 200)
|
||||
{
|
||||
my $ppr = Authen::Passphrase::MySQL323->new (passphrase => $word_buf);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
# missing hash types: 5200,6211,6221,6231,6241,6251,6261,6271,6281
|
||||
|
||||
HASH_TYPES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 125 130 131 132 133 140 141 150 160 190 200 300 400 500 900 1000 1100 1400 1410 1420 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8900 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11900 12000 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800"
|
||||
HASH_TYPES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 125 130 131 132 133 140 141 150 160 200 300 400 500 900 1000 1100 1400 1410 1420 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8900 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11900 12000 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800"
|
||||
|
||||
#ATTACK_MODES="0 1 3 6 7"
|
||||
ATTACK_MODES="0 1 3 7"
|
||||
|
Loading…
Reference in New Issue
Block a user