1
mirror of https://github.com/hashcat/hashcat synced 2024-12-23 14:13:43 +01:00

Cleanup -m 55xx kernels to latest standard

This commit is contained in:
Jens Steube 2016-04-12 20:17:18 +02:00
parent ca9b34277f
commit d6e5f7e829
3 changed files with 361 additions and 407 deletions

View File

@ -542,18 +542,16 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
*/
u32 pw_buf0[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];
u32 pw_buf1[4];
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];
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;
@ -594,6 +592,7 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
make_unicode (w1, w2_t, w3_t);
w3_t[2] = out_len * 8 * 2;
w3_t[3] = 0;
u32x a = MD4M_A;
u32x b = MD4M_B;
@ -685,10 +684,7 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
* DES2
*/
const u32x bc = (b >> 24) | (c << 8);
const u32x cd = (c >> 24) | (d << 8);
transform_netntlmv1_key (bc, cd, key);
transform_netntlmv1_key (((b >> 24) | (c << 8)), ((c >> 24) | (d << 8)), key);
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
@ -759,18 +755,16 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
*/
u32 pw_buf0[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];
u32 pw_buf1[4];
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];
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;
@ -782,11 +776,6 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
const u32 s1 = salt_bufs[salt_pos].salt_buf[1];
const u32 s2 = salt_bufs[salt_pos].salt_buf[2];
u32 data[2];
data[0] = s0;
data[1] = s1;
/**
* digest
*/
@ -823,6 +812,7 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t * rules_bu
make_unicode (w1, w2_t, w3_t);
w3_t[2] = out_len * 8 * 2;
w3_t[3] = 0;
u32x a = MD4M_A;
u32x b = MD4M_B;

View File

@ -7,6 +7,8 @@
#define _MD4_
#define NEW_SIMD_CODE
#include "include/constants.h"
#include "include/kernel_vendor.h"
@ -18,9 +20,7 @@
#include "include/kernel_functions.c"
#include "OpenCL/types_ocl.c"
#include "OpenCL/common.c"
#define COMPARE_S "OpenCL/check_single_comp4.c"
#define COMPARE_M "OpenCL/check_multi_comp4.c"
#include "OpenCL/simd.c"
#define PERM_OP(a,b,tt,n,m) \
{ \
@ -338,18 +338,28 @@ __constant u32 c_skb[8][64] =
}
};
#if VECT_SIZE == 1
#define BOX(i,n,S) (S)[(n)][(i)]
#elif VECT_SIZE == 2
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1])
#elif VECT_SIZE == 4
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3])
#elif VECT_SIZE == 8
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7])
#elif VECT_SIZE == 16
#define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf])
#endif
static void _des_crypt_encrypt (u32 iv[2], u32 data[2], u32 Kc[16], u32 Kd[16], __local u32 (*s_SPtrans)[64])
static void _des_crypt_encrypt (u32x iv[2], u32x data[2], u32x Kc[16], u32x Kd[16], __local u32 (*s_SPtrans)[64])
{
u32 r = data[0];
u32 l = data[1];
u32x r = data[0];
u32x l = data[1];
#pragma unroll 16
for (u32 i = 0; i < 16; i += 2)
{
u32 u;
u32 t;
u32x u;
u32x t;
u = Kc[i + 0] ^ rotl32 (r, 30u);
t = Kd[i + 0] ^ rotl32 (r, 26u);
@ -380,9 +390,9 @@ static void _des_crypt_encrypt (u32 iv[2], u32 data[2], u32 Kc[16], u32 Kd[16],
iv[1] = r;
}
static void _des_crypt_keysetup (u32 c, u32 d, u32 Kc[16], u32 Kd[16], __local u32 (*s_skb)[64])
static void _des_crypt_keysetup (u32x c, u32x d, u32x Kc[16], u32x Kd[16], __local u32 (*s_skb)[64])
{
u32 tt;
u32x tt;
PERM_OP (d, c, tt, 4, 0x0f0f0f0f);
HPERM_OP (c, tt, 2, 0xcccc0000);
@ -415,32 +425,32 @@ static void _des_crypt_keysetup (u32 c, u32 d, u32 Kc[16], u32 Kd[16], __local u
c = c & 0x0fffffff;
d = d & 0x0fffffff;
const u32 c00 = (c >> 0) & 0x0000003f;
const u32 c06 = (c >> 6) & 0x00383003;
const u32 c07 = (c >> 7) & 0x0000003c;
const u32 c13 = (c >> 13) & 0x0000060f;
const u32 c20 = (c >> 20) & 0x00000001;
const u32x c00 = (c >> 0) & 0x0000003f;
const u32x c06 = (c >> 6) & 0x00383003;
const u32x c07 = (c >> 7) & 0x0000003c;
const u32x c13 = (c >> 13) & 0x0000060f;
const u32x c20 = (c >> 20) & 0x00000001;
u32 s = BOX (((c00 >> 0) & 0xff), 0, s_skb)
| BOX (((c06 >> 0) & 0xff)
|((c07 >> 0) & 0xff), 1, s_skb)
| BOX (((c13 >> 0) & 0xff)
|((c06 >> 8) & 0xff), 2, s_skb)
| BOX (((c20 >> 0) & 0xff)
|((c13 >> 8) & 0xff)
|((c06 >> 16) & 0xff), 3, s_skb);
u32x s = BOX (((c00 >> 0) & 0xff), 0, s_skb)
| BOX (((c06 >> 0) & 0xff)
|((c07 >> 0) & 0xff), 1, s_skb)
| BOX (((c13 >> 0) & 0xff)
|((c06 >> 8) & 0xff), 2, s_skb)
| BOX (((c20 >> 0) & 0xff)
|((c13 >> 8) & 0xff)
|((c06 >> 16) & 0xff), 3, s_skb);
const u32 d00 = (d >> 0) & 0x00003c3f;
const u32 d07 = (d >> 7) & 0x00003f03;
const u32 d21 = (d >> 21) & 0x0000000f;
const u32 d22 = (d >> 22) & 0x00000030;
const u32x d00 = (d >> 0) & 0x00003c3f;
const u32x d07 = (d >> 7) & 0x00003f03;
const u32x d21 = (d >> 21) & 0x0000000f;
const u32x d22 = (d >> 22) & 0x00000030;
u32 t = BOX (((d00 >> 0) & 0xff), 4, s_skb)
| BOX (((d07 >> 0) & 0xff)
|((d00 >> 8) & 0xff), 5, s_skb)
| BOX (((d07 >> 8) & 0xff), 6, s_skb)
| BOX (((d21 >> 0) & 0xff)
|((d22 >> 0) & 0xff), 7, s_skb);
u32x t = BOX (((d00 >> 0) & 0xff), 4, s_skb)
| BOX (((d07 >> 0) & 0xff)
|((d00 >> 8) & 0xff), 5, s_skb)
| BOX (((d07 >> 8) & 0xff), 6, s_skb)
| BOX (((d21 >> 0) & 0xff)
|((d22 >> 0) & 0xff), 7, s_skb);
Kc[i] = ((t << 16) | (s & 0x0000ffff));
Kd[i] = ((s >> 16) | (t & 0xffff0000));
@ -528,43 +538,20 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* base
*/
u32 wordl0[4];
u32 pw_buf0[4];
u32 pw_buf1[4];
wordl0[0] = pws[gid].i[ 0];
wordl0[1] = pws[gid].i[ 1];
wordl0[2] = pws[gid].i[ 2];
wordl0[3] = pws[gid].i[ 3];
u32 wordl1[4];
wordl1[0] = pws[gid].i[ 4];
wordl1[1] = pws[gid].i[ 5];
wordl1[2] = pws[gid].i[ 6];
wordl1[3] = pws[gid].i[ 7];
u32 wordl2[4];
wordl2[0] = 0;
wordl2[1] = 0;
wordl2[2] = 0;
wordl2[3] = 0;
u32 wordl3[4];
wordl3[0] = 0;
wordl3[1] = 0;
wordl3[2] = 0;
wordl3[3] = 0;
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;
if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
{
append_0x80_2x4 (wordl0, wordl1, pw_l_len);
switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
}
/**
* salt
*/
@ -573,96 +560,94 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
const u32 s1 = salt_bufs[salt_pos].salt_buf[1];
const u32 s2 = salt_bufs[salt_pos].salt_buf[2];
u32 data[2];
data[0] = s0;
data[1] = s1;
/**
* loop
*/
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
{
const u32 pw_r_len = combs_buf[il_pos].pw_len;
const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
const u32 pw_len = pw_l_len + pw_r_len;
const u32x pw_len = pw_l_len + pw_r_len;
u32 wordr0[4];
/**
* concat password candidate
*/
wordr0[0] = combs_buf[il_pos].i[0];
wordr0[1] = combs_buf[il_pos].i[1];
wordr0[2] = combs_buf[il_pos].i[2];
wordr0[3] = combs_buf[il_pos].i[3];
u32x wordl0[4] = { 0 };
u32x wordl1[4] = { 0 };
u32x wordl2[4] = { 0 };
u32x wordl3[4] = { 0 };
u32 wordr1[4];
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];
wordr1[0] = combs_buf[il_pos].i[4];
wordr1[1] = combs_buf[il_pos].i[5];
wordr1[2] = combs_buf[il_pos].i[6];
wordr1[3] = combs_buf[il_pos].i[7];
u32x wordr0[4] = { 0 };
u32x wordr1[4] = { 0 };
u32x wordr2[4] = { 0 };
u32x wordr3[4] = { 0 };
u32 wordr2[4];
wordr2[0] = 0;
wordr2[1] = 0;
wordr2[2] = 0;
wordr2[3] = 0;
u32 wordr3[4];
wordr3[0] = 0;
wordr3[1] = 0;
wordr3[2] = 0;
wordr3[3] = 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 (wordr0, wordr1, wordr2, wordr3, pw_l_len);
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);
}
u32 w0[4];
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];
u32 w1[4];
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];
u32 w2[4];
w2[0] = 0;
w2[1] = 0;
w2[2] = 0;
w2[3] = 0;
u32 w3[4];
w3[0] = 0;
w3[1] = 0;
w3[2] = 0;
w3[3] = 0;
u32 w0_t[4];
u32 w1_t[4];
u32 w2_t[4];
u32 w3_t[4];
u32x w0_t[4];
u32x w1_t[4];
u32x w2_t[4];
u32x w3_t[4];
make_unicode (w0, w0_t, w1_t);
make_unicode (w1, w2_t, w3_t);
w3_t[2] = pw_len * 8 * 2;
w3_t[3] = 0;
u32 a = MD4M_A;
u32 b = MD4M_B;
u32 c = MD4M_C;
u32 d = MD4M_D;
u32x a = MD4M_A;
u32x b = MD4M_B;
u32x c = MD4M_C;
u32x d = MD4M_D;
MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
@ -713,7 +698,7 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
if (allx (s2 != ((d + MD4M_D) >> 16))) continue;
if (MATCHES_NONE_VS (((d + MD4M_D) >> 16), s2)) continue;
MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
@ -727,16 +712,21 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* DES1
*/
u32 key[2];
u32x key[2];
transform_netntlmv1_key (a, b, key);
u32 Kc[16];
u32 Kd[16];
u32x Kc[16];
u32x Kd[16];
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
u32 iv1[2];
u32x data[2];
data[0] = s0;
data[1] = s1;
u32x iv1[2];
_des_crypt_encrypt (iv1, data, Kc, Kd, s_SPtrans);
@ -744,14 +734,11 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* DES2
*/
const u32 bc = (b >> 24) | (c << 8);
const u32 cd = (c >> 24) | (d << 8);
transform_netntlmv1_key (bc, cd, key);
transform_netntlmv1_key (((b >> 24) | (c << 8)), ((c >> 24) | (d << 8)), key);
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
u32 iv2[2];
u32x iv2[2];
_des_crypt_encrypt (iv2, data, Kc, Kd, s_SPtrans);
@ -759,12 +746,7 @@ __kernel void m05500_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* compare
*/
const u32 r0 = iv1[0];
const u32 r1 = iv1[1];
const u32 r2 = iv2[0];
const u32 r3 = iv2[1];
#include COMPARE_M
COMPARE_M_SIMD (iv1[0], iv1[1], iv2[0], iv2[1]);
}
}
@ -822,43 +804,20 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* base
*/
u32 wordl0[4];
u32 pw_buf0[4];
u32 pw_buf1[4];
wordl0[0] = pws[gid].i[ 0];
wordl0[1] = pws[gid].i[ 1];
wordl0[2] = pws[gid].i[ 2];
wordl0[3] = pws[gid].i[ 3];
u32 wordl1[4];
wordl1[0] = pws[gid].i[ 4];
wordl1[1] = pws[gid].i[ 5];
wordl1[2] = pws[gid].i[ 6];
wordl1[3] = pws[gid].i[ 7];
u32 wordl2[4];
wordl2[0] = 0;
wordl2[1] = 0;
wordl2[2] = 0;
wordl2[3] = 0;
u32 wordl3[4];
wordl3[0] = 0;
wordl3[1] = 0;
wordl3[2] = 0;
wordl3[3] = 0;
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;
if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
{
append_0x80_2x4 (wordl0, wordl1, pw_l_len);
switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
}
/**
* salt
*/
@ -867,11 +826,6 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
const u32 s1 = salt_bufs[salt_pos].salt_buf[1];
const u32 s2 = salt_bufs[salt_pos].salt_buf[2];
u32 data[2];
data[0] = s0;
data[1] = s1;
/**
* digest
*/
@ -888,87 +842,90 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* loop
*/
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
{
const u32 pw_r_len = combs_buf[il_pos].pw_len;
const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
const u32 pw_len = pw_l_len + pw_r_len;
const u32x pw_len = pw_l_len + pw_r_len;
u32 wordr0[4];
/**
* concat password candidate
*/
wordr0[0] = combs_buf[il_pos].i[0];
wordr0[1] = combs_buf[il_pos].i[1];
wordr0[2] = combs_buf[il_pos].i[2];
wordr0[3] = combs_buf[il_pos].i[3];
u32x wordl0[4] = { 0 };
u32x wordl1[4] = { 0 };
u32x wordl2[4] = { 0 };
u32x wordl3[4] = { 0 };
u32 wordr1[4];
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];
wordr1[0] = combs_buf[il_pos].i[4];
wordr1[1] = combs_buf[il_pos].i[5];
wordr1[2] = combs_buf[il_pos].i[6];
wordr1[3] = combs_buf[il_pos].i[7];
u32x wordr0[4] = { 0 };
u32x wordr1[4] = { 0 };
u32x wordr2[4] = { 0 };
u32x wordr3[4] = { 0 };
u32 wordr2[4];
wordr2[0] = 0;
wordr2[1] = 0;
wordr2[2] = 0;
wordr2[3] = 0;
u32 wordr3[4];
wordr3[0] = 0;
wordr3[1] = 0;
wordr3[2] = 0;
wordr3[3] = 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 (wordr0, wordr1, wordr2, wordr3, pw_l_len);
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);
}
u32 w0[4];
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];
u32 w1[4];
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];
u32 w2[4];
w2[0] = 0;
w2[1] = 0;
w2[2] = 0;
w2[3] = 0;
u32 w3[4];
w3[0] = 0;
w3[1] = 0;
w3[2] = 0;
w3[3] = 0;
u32 w0_t[4];
u32 w1_t[4];
u32 w2_t[4];
u32 w3_t[4];
u32x w0_t[4];
u32x w1_t[4];
u32x w2_t[4];
u32x w3_t[4];
make_unicode (w0, w0_t, w1_t);
make_unicode (w1, w2_t, w3_t);
w3_t[2] = pw_len * 8 * 2;
w3_t[3] = 0;
u32 a = MD4M_A;
u32 b = MD4M_B;
u32 c = MD4M_C;
u32 d = MD4M_D;
u32x a = MD4M_A;
u32x b = MD4M_B;
u32x c = MD4M_C;
u32x d = MD4M_D;
MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
@ -1019,7 +976,7 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
if (allx (s2 != ((d + MD4M_D) >> 16))) continue;
if (MATCHES_NONE_VS (((d + MD4M_D) >> 16), s2)) continue;
MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
@ -1033,16 +990,21 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* DES1
*/
u32 key[2];
u32x key[2];
transform_netntlmv1_key (a, b, key);
u32 Kc[16];
u32 Kd[16];
u32x Kc[16];
u32x Kd[16];
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
u32 iv1[2];
u32x data[2];
data[0] = s0;
data[1] = s1;
u32x iv1[2];
_des_crypt_encrypt (iv1, data, Kc, Kd, s_SPtrans);
@ -1055,12 +1017,12 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
u32 iv2[2];
u32x iv2[2];
_des_crypt_encrypt (iv2, data, Kc, Kd, s_SPtrans);
*/
u32 iv2[2];
u32x iv2[2];
iv2[0] = search[2];
iv2[1] = search[3];
@ -1069,12 +1031,7 @@ __kernel void m05500_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf,
* compare
*/
const u32 r0 = iv1[0];
const u32 r1 = iv1[1];
const u32 r2 = iv2[0];
const u32 r3 = iv2[1];
#include COMPARE_S
COMPARE_S_SIMD (iv1[0], iv1[1], iv2[0], iv2[1]);
}
}

View File

@ -522,81 +522,86 @@ static void m05500m (__local u32 (*s_SPtrans)[64], __local u32 (*s_skb)[64], u32
const u32x w0 = w0l | w0r;
u32x w0_t[4];
u32x w1_t[4];
u32x w2_t[4];
u32x w3_t[4];
w0_t[0] = w0;
w0_t[1] = w[ 1];
w0_t[2] = w[ 2];
w0_t[3] = w[ 3];
w1_t[0] = w[ 4];
w1_t[1] = w[ 5];
w1_t[2] = w[ 6];
w1_t[3] = w[ 7];
w2_t[0] = w[ 8];
w2_t[1] = w[ 9];
w2_t[2] = w[10];
w2_t[3] = w[11];
w3_t[0] = w[12];
w3_t[1] = w[13];
w3_t[2] = w[14];
w3_t[3] = w[15];
u32x a = MD4M_A;
u32x b = MD4M_B;
u32x c = MD4M_C;
u32x d = MD4M_D;
#define w0_t w0
#define w1_t w[ 1]
#define w2_t w[ 2]
#define w3_t w[ 3]
#define w4_t w[ 4]
#define w5_t w[ 5]
#define w6_t w[ 6]
#define w7_t w[ 7]
#define w8_t w[ 8]
#define w9_t w[ 9]
#define wa_t w[10]
#define wb_t w[11]
#define wc_t w[12]
#define wd_t w[13]
#define we_t w[14]
#define wf_t w[15]
MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w0_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w1_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w2_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w3_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w4_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w5_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w6_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w7_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w8_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w9_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, wa_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, wb_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, wc_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, wd_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, we_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, wf_t, MD4C00, MD4S03);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w4_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w8_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wc_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w1_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w5_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w9_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wd_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w2_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w6_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, wa_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, we_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w3_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w7_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, wb_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wf_t, MD4C01, MD4S13);
MD4_STEP (MD4_H , a, b, c, d, w0_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w8_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w4_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wc_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w2_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, wa_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w6_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, we_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w1_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w9_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w5_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wd_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w3_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, wb_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
if (MATCHES_NONE_VS (((d + MD4M_D) >> 16), s2)) continue;
MD4_STEP (MD4_H , c, d, a, b, w7_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wf_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
a += MD4M_A;
b += MD4M_B;
@ -629,10 +634,7 @@ static void m05500m (__local u32 (*s_SPtrans)[64], __local u32 (*s_skb)[64], u32
* DES2
*/
const u32x bc = (b >> 24) | (c << 8);
const u32x cd = (c >> 24) | (d << 8);
transform_netntlmv1_key (bc, cd, key);
transform_netntlmv1_key (((b >> 24) | (c << 8)), ((c >> 24) | (d << 8)), key);
_des_crypt_keysetup (key[0], key[1], Kc, Kd, s_skb);
@ -689,81 +691,86 @@ static void m05500s (__local u32 (*s_SPtrans)[64], __local u32 (*s_skb)[64], u32
const u32x w0 = w0l | w0r;
u32x w0_t[4];
u32x w1_t[4];
u32x w2_t[4];
u32x w3_t[4];
w0_t[0] = w0;
w0_t[1] = w[ 1];
w0_t[2] = w[ 2];
w0_t[3] = w[ 3];
w1_t[0] = w[ 4];
w1_t[1] = w[ 5];
w1_t[2] = w[ 6];
w1_t[3] = w[ 7];
w2_t[0] = w[ 8];
w2_t[1] = w[ 9];
w2_t[2] = w[10];
w2_t[3] = w[11];
w3_t[0] = w[12];
w3_t[1] = w[13];
w3_t[2] = w[14];
w3_t[3] = w[15];
u32x a = MD4M_A;
u32x b = MD4M_B;
u32x c = MD4M_C;
u32x d = MD4M_D;
#define w0_t w0
#define w1_t w[ 1]
#define w2_t w[ 2]
#define w3_t w[ 3]
#define w4_t w[ 4]
#define w5_t w[ 5]
#define w6_t w[ 6]
#define w7_t w[ 7]
#define w8_t w[ 8]
#define w9_t w[ 9]
#define wa_t w[10]
#define wb_t w[11]
#define wc_t w[12]
#define wd_t w[13]
#define we_t w[14]
#define wf_t w[15]
MD4_STEP (MD4_Fo, a, b, c, d, w0_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w0_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w0_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w0_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w1_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w1_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w1_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w1_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w2_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w2_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w2_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w2_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w3_t[0], MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w3_t[1], MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w3_t[2], MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w3_t[3], MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w0_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w1_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w2_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w3_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w4_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w5_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, w6_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, w7_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, w8_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, w9_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, wa_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, wb_t, MD4C00, MD4S03);
MD4_STEP (MD4_Fo, a, b, c, d, wc_t, MD4C00, MD4S00);
MD4_STEP (MD4_Fo, d, a, b, c, wd_t, MD4C00, MD4S01);
MD4_STEP (MD4_Fo, c, d, a, b, we_t, MD4C00, MD4S02);
MD4_STEP (MD4_Fo, b, c, d, a, wf_t, MD4C00, MD4S03);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[0], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[0], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[0], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[0], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[1], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[1], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[1], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[1], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[2], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[2], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[2], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[2], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t[3], MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w1_t[3], MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w2_t[3], MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, w3_t[3], MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w0_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w4_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w8_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wc_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w1_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w5_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, w9_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wd_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w2_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w6_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, wa_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, we_t, MD4C01, MD4S13);
MD4_STEP (MD4_Go, a, b, c, d, w3_t, MD4C01, MD4S10);
MD4_STEP (MD4_Go, d, a, b, c, w7_t, MD4C01, MD4S11);
MD4_STEP (MD4_Go, c, d, a, b, wb_t, MD4C01, MD4S12);
MD4_STEP (MD4_Go, b, c, d, a, wf_t, MD4C01, MD4S13);
MD4_STEP (MD4_H , a, b, c, d, w0_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w8_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w4_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wc_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w2_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, wa_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w6_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, we_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w1_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w9_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w5_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wd_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w3_t, MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, wb_t, MD4C02, MD4S21);
MD4_STEP (MD4_H , a, b, c, d, w0_t[0], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[0], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[0], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[0], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[2], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[2], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[2], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[2], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[1], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[1], MD4C02, MD4S21);
MD4_STEP (MD4_H , c, d, a, b, w1_t[1], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[1], MD4C02, MD4S23);
MD4_STEP (MD4_H , a, b, c, d, w0_t[3], MD4C02, MD4S20);
MD4_STEP (MD4_H , d, a, b, c, w2_t[3], MD4C02, MD4S21);
if (MATCHES_NONE_VS (((d + MD4M_D) >> 16), s2)) continue;
MD4_STEP (MD4_H , c, d, a, b, w7_t, MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, wf_t, MD4C02, MD4S23);
MD4_STEP (MD4_H , c, d, a, b, w1_t[3], MD4C02, MD4S22);
MD4_STEP (MD4_H , b, c, d, a, w3_t[3], MD4C02, MD4S23);
a += MD4M_A;
b += MD4M_B;