"Fossies" - the Fresh Open Source Software Archive

Member "hashcat-6.2.6/OpenCL/m04410_a3-optimized.cl" (2 Sep 2022, 59732 Bytes) of package /linux/privat/hashcat-6.2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lisp source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 /**
    2  * Author......: See docs/credits.txt
    3  * License.....: MIT
    4  */
    5 
    6 #define NEW_SIMD_CODE
    7 
    8 #ifdef KERNEL_STATIC
    9 #include M2S(INCLUDE_PATH/inc_vendor.h)
   10 #include M2S(INCLUDE_PATH/inc_types.h)
   11 #include M2S(INCLUDE_PATH/inc_platform.cl)
   12 #include M2S(INCLUDE_PATH/inc_common.cl)
   13 #include M2S(INCLUDE_PATH/inc_simd.cl)
   14 #include M2S(INCLUDE_PATH/inc_hash_md5.cl)
   15 #include M2S(INCLUDE_PATH/inc_hash_sha1.cl)
   16 #endif
   17 
   18 #if   VECT_SIZE == 1
   19 #define uint_to_hex_lower8(i) make_u32x (l_bin2asc[(i)])
   20 #elif VECT_SIZE == 2
   21 #define uint_to_hex_lower8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
   22 #elif VECT_SIZE == 4
   23 #define uint_to_hex_lower8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
   24 #elif VECT_SIZE == 8
   25 #define uint_to_hex_lower8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
   26 #elif VECT_SIZE == 16
   27 #define uint_to_hex_lower8(i) make_u32x (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf])
   28 #endif
   29 
   30 DECLSPEC void m04410m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc)
   31 {
   32   /**
   33    * modifiers are taken from args
   34    */
   35 
   36   /**
   37    * salt
   38    */
   39 
   40   u32 salt_buf0[4];
   41   u32 salt_buf1[4];
   42   u32 salt_buf2[4];
   43   u32 salt_buf3[4];
   44 
   45   salt_buf0[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 0];
   46   salt_buf0[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 1];
   47   salt_buf0[2] = salt_bufs[SALT_POS_HOST].salt_buf[ 2];
   48   salt_buf0[3] = salt_bufs[SALT_POS_HOST].salt_buf[ 3];
   49   salt_buf1[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 4];
   50   salt_buf1[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 5];
   51   salt_buf1[2] = salt_bufs[SALT_POS_HOST].salt_buf[ 6];
   52   salt_buf1[3] = salt_bufs[SALT_POS_HOST].salt_buf[ 7];
   53   salt_buf2[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 8];
   54   salt_buf2[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 9];
   55   salt_buf2[2] = salt_bufs[SALT_POS_HOST].salt_buf[10];
   56   salt_buf2[3] = salt_bufs[SALT_POS_HOST].salt_buf[11];
   57   salt_buf3[0] = salt_bufs[SALT_POS_HOST].salt_buf[12];
   58   salt_buf3[1] = salt_bufs[SALT_POS_HOST].salt_buf[13];
   59   salt_buf3[2] = salt_bufs[SALT_POS_HOST].salt_buf[14];
   60   salt_buf3[3] = salt_bufs[SALT_POS_HOST].salt_buf[15];
   61 
   62   const u32 salt_len = salt_bufs[SALT_POS_HOST].salt_len;
   63 
   64   /**
   65    * loop
   66    */
   67 
   68   u32 w0l = w0[0];
   69 
   70   for (u32 il_pos = 0; il_pos < IL_CNT; il_pos += VECT_SIZE)
   71   {
   72     const u32x w0r = ix_create_bft (bfs_buf, il_pos);
   73 
   74     const u32x w0lr = w0l | w0r;
   75 
   76     /**
   77      * sha1
   78      */
   79 
   80     u32x w0_t = w0lr;
   81     u32x w1_t = w0[1];
   82     u32x w2_t = w0[2];
   83     u32x w3_t = w0[3];
   84     u32x w4_t = w1[0];
   85     u32x w5_t = w1[1];
   86     u32x w6_t = w1[2];
   87     u32x w7_t = w1[3];
   88     u32x w8_t = w2[0];
   89     u32x w9_t = w2[1];
   90     u32x wa_t = w2[2];
   91     u32x wb_t = w2[3];
   92     u32x wc_t = w3[0];
   93     u32x wd_t = w3[1];
   94     u32x we_t = 0;
   95     u32x wf_t = pw_len * 8;
   96 
   97     u32x a = SHA1M_A;
   98     u32x b = SHA1M_B;
   99     u32x c = SHA1M_C;
  100     u32x d = SHA1M_D;
  101     u32x e = SHA1M_E;
  102 
  103     #undef K
  104     #define K SHA1C00
  105 
  106     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
  107     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
  108     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
  109     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
  110     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
  111     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
  112     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
  113     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
  114     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
  115     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
  116     SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
  117     SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
  118     SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
  119     SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
  120     SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
  121     SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
  122     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
  123     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
  124     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
  125     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
  126 
  127     #undef K
  128     #define K SHA1C01
  129 
  130     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
  131     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
  132     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
  133     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
  134     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
  135     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
  136     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
  137     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
  138     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
  139     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
  140     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
  141     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
  142     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
  143     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
  144     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
  145     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
  146     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
  147     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
  148     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
  149     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
  150 
  151     #undef K
  152     #define K SHA1C02
  153 
  154     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
  155     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
  156     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
  157     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
  158     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
  159     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
  160     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
  161     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
  162     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
  163     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
  164     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
  165     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
  166     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
  167     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
  168     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
  169     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
  170     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
  171     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
  172     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
  173     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
  174 
  175     #undef K
  176     #define K SHA1C03
  177 
  178     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
  179     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
  180     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
  181     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
  182     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
  183     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
  184     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
  185     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
  186     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
  187     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
  188     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
  189     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
  190     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
  191     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
  192     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
  193     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
  194     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
  195     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
  196     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
  197     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
  198 
  199     a += make_u32x (SHA1M_A);
  200     b += make_u32x (SHA1M_B);
  201     c += make_u32x (SHA1M_C);
  202     d += make_u32x (SHA1M_D);
  203     e += make_u32x (SHA1M_E);
  204 
  205     /**
  206      * md5
  207      */
  208 
  209     w0_t = uint_to_hex_lower8 ((a >> 24) & 255) <<  0
  210          | uint_to_hex_lower8 ((a >> 16) & 255) << 16;
  211     w1_t = uint_to_hex_lower8 ((a >>  8) & 255) <<  0
  212          | uint_to_hex_lower8 ((a >>  0) & 255) << 16;
  213     w2_t = uint_to_hex_lower8 ((b >> 24) & 255) <<  0
  214          | uint_to_hex_lower8 ((b >> 16) & 255) << 16;
  215     w3_t = uint_to_hex_lower8 ((b >>  8) & 255) <<  0
  216          | uint_to_hex_lower8 ((b >>  0) & 255) << 16;
  217     w4_t = uint_to_hex_lower8 ((c >> 24) & 255) <<  0
  218          | uint_to_hex_lower8 ((c >> 16) & 255) << 16;
  219     w5_t = uint_to_hex_lower8 ((c >>  8) & 255) <<  0
  220          | uint_to_hex_lower8 ((c >>  0) & 255) << 16;
  221     w6_t = uint_to_hex_lower8 ((d >> 24) & 255) <<  0
  222          | uint_to_hex_lower8 ((d >> 16) & 255) << 16;
  223     w7_t = uint_to_hex_lower8 ((d >>  8) & 255) <<  0
  224          | uint_to_hex_lower8 ((d >>  0) & 255) << 16;
  225     w8_t = uint_to_hex_lower8 ((e >> 24) & 255) <<  0
  226          | uint_to_hex_lower8 ((e >> 16) & 255) << 16;
  227     w9_t = uint_to_hex_lower8 ((e >>  8) & 255) <<  0
  228          | uint_to_hex_lower8 ((e >>  0) & 255) << 16;
  229 
  230     wa_t = 0;
  231     wb_t = 0;
  232     wc_t = 0;
  233     wd_t = 0;
  234     we_t = 0;
  235     wf_t = 0;
  236 
  237     a = MD5M_A;
  238     b = MD5M_B;
  239     c = MD5M_C;
  240     d = MD5M_D;
  241     e = 0;
  242 
  243     u32x digest[4];
  244 
  245     digest[0] = a;
  246     digest[1] = b;
  247     digest[2] = c;
  248     digest[3] = d;
  249 
  250     int pos = 40;
  251 
  252     u32x s0[4];
  253     u32x s1[4];
  254     u32x s2[4];
  255     u32x s3[4];
  256 
  257     s0[0] = salt_buf0[0];
  258     s0[1] = salt_buf0[1];
  259     s0[2] = salt_buf0[2];
  260     s0[3] = salt_buf0[3];
  261     s1[0] = salt_buf1[0];
  262     s1[1] = salt_buf1[1];
  263     s1[2] = salt_buf1[2];
  264     s1[3] = salt_buf1[3];
  265     s2[0] = salt_buf2[0];
  266     s2[1] = salt_buf2[1];
  267     s2[2] = salt_buf2[2];
  268     s2[3] = salt_buf2[3];
  269     s3[0] = salt_buf3[0];
  270     s3[1] = salt_buf3[1];
  271     s3[2] = salt_buf3[2];
  272     s3[3] = salt_buf3[3];
  273 
  274     if ((pos + salt_len) < 64)
  275     {
  276       switch_buffer_by_offset_be (s0, s1, s2, s3, pos);
  277 
  278       w0_t |= s0[0];
  279       w1_t |= s0[1];
  280       w2_t |= s0[2];
  281       w3_t |= s0[3];
  282       w4_t |= s1[0];
  283       w5_t |= s1[1];
  284       w6_t |= s1[2];
  285       w7_t |= s1[3];
  286       w8_t |= s2[0];
  287       w9_t |= s2[1];
  288       wa_t |= s2[2];
  289       wb_t |= s2[3];
  290       wc_t |= s3[0];
  291       wd_t |= s3[1];
  292       we_t |= s3[2];
  293       wf_t |= s3[3];
  294     }
  295     else
  296     {
  297       u32x _w0[4] = { 0 };
  298       u32x _w1[4] = { 0 };
  299       u32x _w2[4] = { 0 };
  300       u32x _w3[4] = { 0 };
  301 
  302       switch_buffer_by_offset_carry_be (s0, s1, s2, s3, _w0, _w1, _w2, _w3, pos);
  303 
  304       w0_t |= s0[0];
  305       w1_t |= s0[1];
  306       w2_t |= s0[2];
  307       w3_t |= s0[3];
  308       w4_t |= s1[0];
  309       w5_t |= s1[1];
  310       w6_t |= s1[2];
  311       w7_t |= s1[3];
  312       w8_t |= s2[0];
  313       w9_t |= s2[1];
  314       wa_t |= s2[2];
  315       wb_t |= s2[3];
  316       wc_t |= s3[0];
  317       wd_t |= s3[1];
  318       we_t |= s3[2];
  319       wf_t |= s3[3];
  320 
  321       // md5 transform
  322 
  323       MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
  324       MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
  325       MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
  326       MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
  327       MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
  328       MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
  329       MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
  330       MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
  331       MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
  332       MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
  333       MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
  334       MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
  335       MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
  336       MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
  337       MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
  338       MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
  339 
  340       MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
  341       MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
  342       MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
  343       MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
  344       MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
  345       MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
  346       MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
  347       MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
  348       MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
  349       MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
  350       MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
  351       MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
  352       MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
  353       MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
  354       MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
  355       MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
  356 
  357       u32x t;
  358 
  359       MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
  360       MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
  361       MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
  362       MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
  363       MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
  364       MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
  365       MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
  366       MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
  367       MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
  368       MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
  369       MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
  370       MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
  371       MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
  372       MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
  373       MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
  374       MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
  375 
  376       MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
  377       MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
  378       MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
  379       MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
  380       MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
  381       MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
  382       MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
  383       MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
  384       MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
  385       MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
  386       MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
  387       MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
  388       MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
  389       MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
  390       MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
  391       MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
  392 
  393       digest[0] += a;
  394       digest[1] += b;
  395       digest[2] += c;
  396       digest[3] += d;
  397 
  398       w0_t = _w0[0];
  399       w1_t = _w0[1];
  400       w2_t = _w0[2];
  401       w3_t = _w0[3];
  402       w4_t = _w1[0];
  403       w5_t = _w1[1];
  404       w6_t = _w1[2];
  405       w7_t = _w1[3];
  406       w8_t = _w2[0];
  407       w9_t = _w2[1];
  408       wa_t = _w2[2];
  409       wb_t = _w2[3];
  410       wc_t = _w3[0];
  411       wd_t = _w3[1];
  412       we_t = _w3[2];
  413       wf_t = _w3[3];
  414     }
  415 
  416     const int ctx_len = 40 + salt_len;
  417 
  418     pos = ctx_len & 63;
  419 
  420     if (pos >= 56)
  421     {
  422       a = digest[0];
  423       b = digest[1];
  424       c = digest[2];
  425       d = digest[3];
  426 
  427       MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
  428       MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
  429       MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
  430       MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
  431       MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
  432       MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
  433       MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
  434       MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
  435       MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
  436       MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
  437       MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
  438       MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
  439       MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
  440       MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
  441       MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
  442       MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
  443 
  444       MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
  445       MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
  446       MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
  447       MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
  448       MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
  449       MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
  450       MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
  451       MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
  452       MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
  453       MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
  454       MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
  455       MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
  456       MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
  457       MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
  458       MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
  459       MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
  460 
  461       u32x t;
  462 
  463       MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
  464       MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
  465       MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
  466       MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
  467       MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
  468       MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
  469       MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
  470       MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
  471       MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
  472       MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
  473       MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
  474       MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
  475       MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
  476       MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
  477       MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
  478       MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
  479 
  480       MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
  481       MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
  482       MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
  483       MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
  484       MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
  485       MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
  486       MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
  487       MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
  488       MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
  489       MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
  490       MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
  491       MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
  492       MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
  493       MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
  494       MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
  495       MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
  496 
  497       digest[0] += a;
  498       digest[1] += b;
  499       digest[2] += c;
  500       digest[3] += d;
  501 
  502       w0_t = 0;
  503       w1_t = 0;
  504       w2_t = 0;
  505       w3_t = 0;
  506       w4_t = 0;
  507       w5_t = 0;
  508       w6_t = 0;
  509       w7_t = 0;
  510       w8_t = 0;
  511       w9_t = 0;
  512       wa_t = 0;
  513       wb_t = 0;
  514       wc_t = 0;
  515       wd_t = 0;
  516       we_t = 0;
  517       wf_t = 0;
  518     }
  519 
  520     we_t = ctx_len * 8;
  521     wf_t = 0;
  522 
  523     a = digest[0];
  524     b = digest[1];
  525     c = digest[2];
  526     d = digest[3];
  527 
  528     MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
  529     MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
  530     MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
  531     MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
  532     MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
  533     MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
  534     MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
  535     MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
  536     MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
  537     MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
  538     MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
  539     MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
  540     MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
  541     MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
  542     MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
  543     MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
  544 
  545     MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
  546     MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
  547     MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
  548     MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
  549     MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
  550     MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
  551     MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
  552     MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
  553     MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
  554     MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
  555     MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
  556     MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
  557     MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
  558     MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
  559     MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
  560     MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
  561 
  562     u32x t;
  563 
  564     MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
  565     MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
  566     MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
  567     MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
  568     MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
  569     MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
  570     MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
  571     MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
  572     MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
  573     MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
  574     MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
  575     MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
  576     MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
  577     MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
  578     MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
  579     MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
  580 
  581     MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
  582     MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
  583     MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
  584     MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
  585     MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
  586     MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
  587     MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
  588     MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
  589     MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
  590     MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
  591     MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
  592     MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
  593     MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
  594     MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
  595     MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
  596     MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
  597 
  598     a += digest[0] - MD5M_A;
  599     b += digest[1] - MD5M_B;
  600     c += digest[2] - MD5M_C;
  601     d += digest[3] - MD5M_D;
  602 
  603     COMPARE_M_SIMD (a, d, c, b);
  604   }
  605 }
  606 
  607 DECLSPEC void m04410s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC (), LOCAL_AS u32 *l_bin2asc)
  608 {
  609   /**
  610    * modifiers are taken from args
  611    */
  612 
  613   /**
  614    * salt
  615    */
  616 
  617   u32 salt_buf0[4];
  618   u32 salt_buf1[4];
  619   u32 salt_buf2[4];
  620   u32 salt_buf3[4];
  621 
  622   salt_buf0[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 0];
  623   salt_buf0[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 1];
  624   salt_buf0[2] = salt_bufs[SALT_POS_HOST].salt_buf[ 2];
  625   salt_buf0[3] = salt_bufs[SALT_POS_HOST].salt_buf[ 3];
  626   salt_buf1[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 4];
  627   salt_buf1[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 5];
  628   salt_buf1[2] = salt_bufs[SALT_POS_HOST].salt_buf[ 6];
  629   salt_buf1[3] = salt_bufs[SALT_POS_HOST].salt_buf[ 7];
  630   salt_buf2[0] = salt_bufs[SALT_POS_HOST].salt_buf[ 8];
  631   salt_buf2[1] = salt_bufs[SALT_POS_HOST].salt_buf[ 9];
  632   salt_buf2[2] = salt_bufs[SALT_POS_HOST].salt_buf[10];
  633   salt_buf2[3] = salt_bufs[SALT_POS_HOST].salt_buf[11];
  634   salt_buf3[0] = salt_bufs[SALT_POS_HOST].salt_buf[12];
  635   salt_buf3[1] = salt_bufs[SALT_POS_HOST].salt_buf[13];
  636   salt_buf3[2] = salt_bufs[SALT_POS_HOST].salt_buf[14];
  637   salt_buf3[3] = salt_bufs[SALT_POS_HOST].salt_buf[15];
  638 
  639   const u32 salt_len = salt_bufs[SALT_POS_HOST].salt_len;
  640 
  641   /**
  642    * digest
  643    */
  644 
  645   const u32 search[4] =
  646   {
  647     digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R0],
  648     digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R1],
  649     digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R2],
  650     digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R3]
  651   };
  652 
  653   /**
  654    * loop
  655    */
  656 
  657   u32 w0l = w0[0];
  658 
  659   for (u32 il_pos = 0; il_pos < IL_CNT; il_pos += VECT_SIZE)
  660   {
  661     const u32x w0r = ix_create_bft (bfs_buf, il_pos);
  662 
  663     const u32x w0lr = w0l | w0r;
  664 
  665     /**
  666      * sha1
  667      */
  668 
  669     u32x w0_t = w0lr;
  670     u32x w1_t = w0[1];
  671     u32x w2_t = w0[2];
  672     u32x w3_t = w0[3];
  673     u32x w4_t = w1[0];
  674     u32x w5_t = w1[1];
  675     u32x w6_t = w1[2];
  676     u32x w7_t = w1[3];
  677     u32x w8_t = w2[0];
  678     u32x w9_t = w2[1];
  679     u32x wa_t = w2[2];
  680     u32x wb_t = w2[3];
  681     u32x wc_t = w3[0];
  682     u32x wd_t = w3[1];
  683     u32x we_t = 0;
  684     u32x wf_t = pw_len * 8;
  685 
  686     u32x a = SHA1M_A;
  687     u32x b = SHA1M_B;
  688     u32x c = SHA1M_C;
  689     u32x d = SHA1M_D;
  690     u32x e = SHA1M_E;
  691 
  692     #undef K
  693     #define K SHA1C00
  694 
  695     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w0_t);
  696     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w1_t);
  697     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w2_t);
  698     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w3_t);
  699     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w4_t);
  700     SHA1_STEP (SHA1_F0o, a, b, c, d, e, w5_t);
  701     SHA1_STEP (SHA1_F0o, e, a, b, c, d, w6_t);
  702     SHA1_STEP (SHA1_F0o, d, e, a, b, c, w7_t);
  703     SHA1_STEP (SHA1_F0o, c, d, e, a, b, w8_t);
  704     SHA1_STEP (SHA1_F0o, b, c, d, e, a, w9_t);
  705     SHA1_STEP (SHA1_F0o, a, b, c, d, e, wa_t);
  706     SHA1_STEP (SHA1_F0o, e, a, b, c, d, wb_t);
  707     SHA1_STEP (SHA1_F0o, d, e, a, b, c, wc_t);
  708     SHA1_STEP (SHA1_F0o, c, d, e, a, b, wd_t);
  709     SHA1_STEP (SHA1_F0o, b, c, d, e, a, we_t);
  710     SHA1_STEP (SHA1_F0o, a, b, c, d, e, wf_t);
  711     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F0o, e, a, b, c, d, w0_t);
  712     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F0o, d, e, a, b, c, w1_t);
  713     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F0o, c, d, e, a, b, w2_t);
  714     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F0o, b, c, d, e, a, w3_t);
  715 
  716     #undef K
  717     #define K SHA1C01
  718 
  719     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w4_t);
  720     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w5_t);
  721     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w6_t);
  722     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w7_t);
  723     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w8_t);
  724     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w9_t);
  725     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wa_t);
  726     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wb_t);
  727     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wc_t);
  728     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wd_t);
  729     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, we_t);
  730     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wf_t);
  731     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w0_t);
  732     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w1_t);
  733     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w2_t);
  734     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w3_t);
  735     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w4_t);
  736     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w5_t);
  737     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w6_t);
  738     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w7_t);
  739 
  740     #undef K
  741     #define K SHA1C02
  742 
  743     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w8_t);
  744     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w9_t);
  745     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wa_t);
  746     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wb_t);
  747     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wc_t);
  748     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, wd_t);
  749     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, we_t);
  750     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, wf_t);
  751     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w0_t);
  752     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w1_t);
  753     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w2_t);
  754     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w3_t);
  755     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w4_t);
  756     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, w5_t);
  757     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, w6_t);
  758     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F2o, a, b, c, d, e, w7_t);
  759     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F2o, e, a, b, c, d, w8_t);
  760     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F2o, d, e, a, b, c, w9_t);
  761     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F2o, c, d, e, a, b, wa_t);
  762     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F2o, b, c, d, e, a, wb_t);
  763 
  764     #undef K
  765     #define K SHA1C03
  766 
  767     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wc_t);
  768     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wd_t);
  769     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, we_t);
  770     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, wf_t);
  771     w0_t = hc_rotl32 ((wd_t ^ w8_t ^ w2_t ^ w0_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w0_t);
  772     w1_t = hc_rotl32 ((we_t ^ w9_t ^ w3_t ^ w1_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w1_t);
  773     w2_t = hc_rotl32 ((wf_t ^ wa_t ^ w4_t ^ w2_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w2_t);
  774     w3_t = hc_rotl32 ((w0_t ^ wb_t ^ w5_t ^ w3_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w3_t);
  775     w4_t = hc_rotl32 ((w1_t ^ wc_t ^ w6_t ^ w4_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w4_t);
  776     w5_t = hc_rotl32 ((w2_t ^ wd_t ^ w7_t ^ w5_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, w5_t);
  777     w6_t = hc_rotl32 ((w3_t ^ we_t ^ w8_t ^ w6_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, w6_t);
  778     w7_t = hc_rotl32 ((w4_t ^ wf_t ^ w9_t ^ w7_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, w7_t);
  779     w8_t = hc_rotl32 ((w5_t ^ w0_t ^ wa_t ^ w8_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, w8_t);
  780     w9_t = hc_rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t);
  781     wa_t = hc_rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t);
  782     wb_t = hc_rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t);
  783     wc_t = hc_rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t);
  784     wd_t = hc_rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t);
  785     we_t = hc_rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t);
  786     wf_t = hc_rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t);
  787 
  788     a += make_u32x (SHA1M_A);
  789     b += make_u32x (SHA1M_B);
  790     c += make_u32x (SHA1M_C);
  791     d += make_u32x (SHA1M_D);
  792     e += make_u32x (SHA1M_E);
  793 
  794     /**
  795      * md5
  796      */
  797 
  798     w0_t = uint_to_hex_lower8 ((a >> 24) & 255) <<  0
  799          | uint_to_hex_lower8 ((a >> 16) & 255) << 16;
  800     w1_t = uint_to_hex_lower8 ((a >>  8) & 255) <<  0
  801          | uint_to_hex_lower8 ((a >>  0) & 255) << 16;
  802     w2_t = uint_to_hex_lower8 ((b >> 24) & 255) <<  0
  803          | uint_to_hex_lower8 ((b >> 16) & 255) << 16;
  804     w3_t = uint_to_hex_lower8 ((b >>  8) & 255) <<  0
  805          | uint_to_hex_lower8 ((b >>  0) & 255) << 16;
  806     w4_t = uint_to_hex_lower8 ((c >> 24) & 255) <<  0
  807          | uint_to_hex_lower8 ((c >> 16) & 255) << 16;
  808     w5_t = uint_to_hex_lower8 ((c >>  8) & 255) <<  0
  809          | uint_to_hex_lower8 ((c >>  0) & 255) << 16;
  810     w6_t = uint_to_hex_lower8 ((d >> 24) & 255) <<  0
  811          | uint_to_hex_lower8 ((d >> 16) & 255) << 16;
  812     w7_t = uint_to_hex_lower8 ((d >>  8) & 255) <<  0
  813          | uint_to_hex_lower8 ((d >>  0) & 255) << 16;
  814     w8_t = uint_to_hex_lower8 ((e >> 24) & 255) <<  0
  815          | uint_to_hex_lower8 ((e >> 16) & 255) << 16;
  816     w9_t = uint_to_hex_lower8 ((e >>  8) & 255) <<  0
  817          | uint_to_hex_lower8 ((e >>  0) & 255) << 16;
  818 
  819     wa_t = 0;
  820     wb_t = 0;
  821     wc_t = 0;
  822     wd_t = 0;
  823     we_t = 0;
  824     wf_t = 0;
  825 
  826     a = MD5M_A;
  827     b = MD5M_B;
  828     c = MD5M_C;
  829     d = MD5M_D;
  830     e = 0;
  831 
  832     u32x digest[4];
  833 
  834     digest[0] = a;
  835     digest[1] = b;
  836     digest[2] = c;
  837     digest[3] = d;
  838 
  839     int pos = 40;
  840 
  841     u32x s0[4];
  842     u32x s1[4];
  843     u32x s2[4];
  844     u32x s3[4];
  845 
  846     s0[0] = salt_buf0[0];
  847     s0[1] = salt_buf0[1];
  848     s0[2] = salt_buf0[2];
  849     s0[3] = salt_buf0[3];
  850     s1[0] = salt_buf1[0];
  851     s1[1] = salt_buf1[1];
  852     s1[2] = salt_buf1[2];
  853     s1[3] = salt_buf1[3];
  854     s2[0] = salt_buf2[0];
  855     s2[1] = salt_buf2[1];
  856     s2[2] = salt_buf2[2];
  857     s2[3] = salt_buf2[3];
  858     s3[0] = salt_buf3[0];
  859     s3[1] = salt_buf3[1];
  860     s3[2] = salt_buf3[2];
  861     s3[3] = salt_buf3[3];
  862 
  863     if ((pos + salt_len) < 64)
  864     {
  865       switch_buffer_by_offset_be (s0, s1, s2, s3, pos);
  866 
  867       w0_t |= s0[0];
  868       w1_t |= s0[1];
  869       w2_t |= s0[2];
  870       w3_t |= s0[3];
  871       w4_t |= s1[0];
  872       w5_t |= s1[1];
  873       w6_t |= s1[2];
  874       w7_t |= s1[3];
  875       w8_t |= s2[0];
  876       w9_t |= s2[1];
  877       wa_t |= s2[2];
  878       wb_t |= s2[3];
  879       wc_t |= s3[0];
  880       wd_t |= s3[1];
  881       we_t |= s3[2];
  882       wf_t |= s3[3];
  883     }
  884     else
  885     {
  886       u32x _w0[4] = { 0 };
  887       u32x _w1[4] = { 0 };
  888       u32x _w2[4] = { 0 };
  889       u32x _w3[4] = { 0 };
  890 
  891       switch_buffer_by_offset_carry_be (s0, s1, s2, s3, _w0, _w1, _w2, _w3, pos);
  892 
  893       w0_t |= s0[0];
  894       w1_t |= s0[1];
  895       w2_t |= s0[2];
  896       w3_t |= s0[3];
  897       w4_t |= s1[0];
  898       w5_t |= s1[1];
  899       w6_t |= s1[2];
  900       w7_t |= s1[3];
  901       w8_t |= s2[0];
  902       w9_t |= s2[1];
  903       wa_t |= s2[2];
  904       wb_t |= s2[3];
  905       wc_t |= s3[0];
  906       wd_t |= s3[1];
  907       we_t |= s3[2];
  908       wf_t |= s3[3];
  909 
  910       // md5 transform
  911 
  912       MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
  913       MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
  914       MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
  915       MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
  916       MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
  917       MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
  918       MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
  919       MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
  920       MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
  921       MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
  922       MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
  923       MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
  924       MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
  925       MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
  926       MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
  927       MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
  928 
  929       MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
  930       MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
  931       MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
  932       MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
  933       MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
  934       MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
  935       MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
  936       MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
  937       MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
  938       MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
  939       MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
  940       MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
  941       MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
  942       MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
  943       MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
  944       MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
  945 
  946       u32x t;
  947 
  948       MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
  949       MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
  950       MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
  951       MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
  952       MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
  953       MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
  954       MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
  955       MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
  956       MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
  957       MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
  958       MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
  959       MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
  960       MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
  961       MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
  962       MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
  963       MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
  964 
  965       MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
  966       MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
  967       MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
  968       MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
  969       MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
  970       MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
  971       MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
  972       MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
  973       MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
  974       MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
  975       MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
  976       MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
  977       MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
  978       MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
  979       MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
  980       MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
  981 
  982       digest[0] += a;
  983       digest[1] += b;
  984       digest[2] += c;
  985       digest[3] += d;
  986 
  987       w0_t = _w0[0];
  988       w1_t = _w0[1];
  989       w2_t = _w0[2];
  990       w3_t = _w0[3];
  991       w4_t = _w1[0];
  992       w5_t = _w1[1];
  993       w6_t = _w1[2];
  994       w7_t = _w1[3];
  995       w8_t = _w2[0];
  996       w9_t = _w2[1];
  997       wa_t = _w2[2];
  998       wb_t = _w2[3];
  999       wc_t = _w3[0];
 1000       wd_t = _w3[1];
 1001       we_t = _w3[2];
 1002       wf_t = _w3[3];
 1003     }
 1004 
 1005     const int ctx_len = 40 + salt_len;
 1006 
 1007     pos = ctx_len & 63;
 1008 
 1009     if (pos >= 56)
 1010     {
 1011       a = digest[0];
 1012       b = digest[1];
 1013       c = digest[2];
 1014       d = digest[3];
 1015 
 1016       MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
 1017       MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
 1018       MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
 1019       MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
 1020       MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
 1021       MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
 1022       MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
 1023       MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
 1024       MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
 1025       MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
 1026       MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
 1027       MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
 1028       MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
 1029       MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
 1030       MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
 1031       MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
 1032 
 1033       MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
 1034       MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
 1035       MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
 1036       MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
 1037       MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
 1038       MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
 1039       MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
 1040       MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
 1041       MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
 1042       MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
 1043       MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
 1044       MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
 1045       MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
 1046       MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
 1047       MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
 1048       MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
 1049 
 1050       u32x t;
 1051 
 1052       MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
 1053       MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
 1054       MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
 1055       MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
 1056       MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
 1057       MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
 1058       MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
 1059       MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
 1060       MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
 1061       MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
 1062       MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
 1063       MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
 1064       MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
 1065       MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
 1066       MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
 1067       MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
 1068 
 1069       MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
 1070       MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
 1071       MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
 1072       MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
 1073       MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
 1074       MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
 1075       MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
 1076       MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
 1077       MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
 1078       MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
 1079       MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
 1080       MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
 1081       MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
 1082       MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
 1083       MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
 1084       MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
 1085 
 1086       digest[0] += a;
 1087       digest[1] += b;
 1088       digest[2] += c;
 1089       digest[3] += d;
 1090 
 1091       w0_t = 0;
 1092       w1_t = 0;
 1093       w2_t = 0;
 1094       w3_t = 0;
 1095       w4_t = 0;
 1096       w5_t = 0;
 1097       w6_t = 0;
 1098       w7_t = 0;
 1099       w8_t = 0;
 1100       w9_t = 0;
 1101       wa_t = 0;
 1102       wb_t = 0;
 1103       wc_t = 0;
 1104       wd_t = 0;
 1105       we_t = 0;
 1106       wf_t = 0;
 1107     }
 1108 
 1109     we_t = ctx_len * 8;
 1110     wf_t = 0;
 1111 
 1112     a = digest[0];
 1113     b = digest[1];
 1114     c = digest[2];
 1115     d = digest[3];
 1116 
 1117     MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
 1118     MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
 1119     MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
 1120     MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
 1121     MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
 1122     MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
 1123     MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
 1124     MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
 1125     MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
 1126     MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
 1127     MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
 1128     MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
 1129     MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
 1130     MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
 1131     MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
 1132     MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
 1133 
 1134     MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
 1135     MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
 1136     MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
 1137     MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
 1138     MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
 1139     MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
 1140     MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
 1141     MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
 1142     MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
 1143     MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
 1144     MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
 1145     MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
 1146     MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
 1147     MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
 1148     MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
 1149     MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
 1150 
 1151     u32x t;
 1152 
 1153     MD5_STEP (MD5_H1, a, b, c, d, w5_t, MD5C20, MD5S20);
 1154     MD5_STEP (MD5_H2, d, a, b, c, w8_t, MD5C21, MD5S21);
 1155     MD5_STEP (MD5_H1, c, d, a, b, wb_t, MD5C22, MD5S22);
 1156     MD5_STEP (MD5_H2, b, c, d, a, we_t, MD5C23, MD5S23);
 1157     MD5_STEP (MD5_H1, a, b, c, d, w1_t, MD5C24, MD5S20);
 1158     MD5_STEP (MD5_H2, d, a, b, c, w4_t, MD5C25, MD5S21);
 1159     MD5_STEP (MD5_H1, c, d, a, b, w7_t, MD5C26, MD5S22);
 1160     MD5_STEP (MD5_H2, b, c, d, a, wa_t, MD5C27, MD5S23);
 1161     MD5_STEP (MD5_H1, a, b, c, d, wd_t, MD5C28, MD5S20);
 1162     MD5_STEP (MD5_H2, d, a, b, c, w0_t, MD5C29, MD5S21);
 1163     MD5_STEP (MD5_H1, c, d, a, b, w3_t, MD5C2a, MD5S22);
 1164     MD5_STEP (MD5_H2, b, c, d, a, w6_t, MD5C2b, MD5S23);
 1165     MD5_STEP (MD5_H1, a, b, c, d, w9_t, MD5C2c, MD5S20);
 1166     MD5_STEP (MD5_H2, d, a, b, c, wc_t, MD5C2d, MD5S21);
 1167     MD5_STEP (MD5_H1, c, d, a, b, wf_t, MD5C2e, MD5S22);
 1168     MD5_STEP (MD5_H2, b, c, d, a, w2_t, MD5C2f, MD5S23);
 1169 
 1170     MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
 1171     MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
 1172     MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
 1173     MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
 1174     MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
 1175     MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
 1176     MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
 1177     MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
 1178     MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
 1179     MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
 1180     MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
 1181     MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
 1182     MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
 1183 
 1184     if (MATCHES_NONE_VS ((a + digest[0] - make_u32x (MD5M_A)), search[0])) continue;
 1185 
 1186     MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
 1187     MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
 1188     MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
 1189 
 1190     a += digest[0] - MD5M_A;
 1191     b += digest[1] - MD5M_B;
 1192     c += digest[2] - MD5M_C;
 1193     d += digest[3] - MD5M_D;
 1194 
 1195     COMPARE_S_SIMD (a, d, c, b);
 1196   }
 1197 }
 1198 
 1199 KERNEL_FQ void m04410_m04 (KERN_ATTR_BASIC ())
 1200 {
 1201   /**
 1202    * base
 1203    */
 1204 
 1205   const u64 lid = get_local_id (0);
 1206   const u64 gid = get_global_id (0);
 1207   const u64 lsz = get_local_size (0);
 1208 
 1209   /**
 1210    * bin2asc table
 1211    */
 1212 
 1213   LOCAL_VK u32 l_bin2asc[256];
 1214 
 1215   for (u32 i = lid; i < 256; i += lsz)
 1216   {
 1217     const u32 i0 = (i >> 0) & 15;
 1218     const u32 i1 = (i >> 4) & 15;
 1219 
 1220     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1221                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1222   }
 1223 
 1224   SYNC_THREADS ();
 1225 
 1226   if (gid >= GID_CNT) return;
 1227 
 1228   /**
 1229    * modifier
 1230    */
 1231 
 1232   u32 w0[4];
 1233 
 1234   w0[0] = pws[gid].i[ 0];
 1235   w0[1] = pws[gid].i[ 1];
 1236   w0[2] = pws[gid].i[ 2];
 1237   w0[3] = pws[gid].i[ 3];
 1238 
 1239   u32 w1[4];
 1240 
 1241   w1[0] = 0;
 1242   w1[1] = 0;
 1243   w1[2] = 0;
 1244   w1[3] = 0;
 1245 
 1246   u32 w2[4];
 1247 
 1248   w2[0] = 0;
 1249   w2[1] = 0;
 1250   w2[2] = 0;
 1251   w2[3] = 0;
 1252 
 1253   u32 w3[4];
 1254 
 1255   w3[0] = 0;
 1256   w3[1] = 0;
 1257   w3[2] = 0;
 1258   w3[3] = pws[gid].i[15];
 1259 
 1260   const u32 pw_len = pws[gid].pw_len & 63;
 1261 
 1262   /**
 1263    * main
 1264    */
 1265 
 1266   m04410m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1267 }
 1268 
 1269 KERNEL_FQ void m04410_m08 (KERN_ATTR_BASIC ())
 1270 {
 1271   /**
 1272    * base
 1273    */
 1274 
 1275   const u64 lid = get_local_id (0);
 1276   const u64 gid = get_global_id (0);
 1277   const u64 lsz = get_local_size (0);
 1278 
 1279   /**
 1280    * bin2asc table
 1281    */
 1282 
 1283   LOCAL_VK u32 l_bin2asc[256];
 1284 
 1285   for (u32 i = lid; i < 256; i += lsz)
 1286   {
 1287     const u32 i0 = (i >> 0) & 15;
 1288     const u32 i1 = (i >> 4) & 15;
 1289 
 1290     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1291                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1292   }
 1293 
 1294   SYNC_THREADS ();
 1295 
 1296   if (gid >= GID_CNT) return;
 1297 
 1298   /**
 1299    * modifier
 1300    */
 1301 
 1302   u32 w0[4];
 1303 
 1304   w0[0] = pws[gid].i[ 0];
 1305   w0[1] = pws[gid].i[ 1];
 1306   w0[2] = pws[gid].i[ 2];
 1307   w0[3] = pws[gid].i[ 3];
 1308 
 1309   u32 w1[4];
 1310 
 1311   w1[0] = pws[gid].i[ 4];
 1312   w1[1] = pws[gid].i[ 5];
 1313   w1[2] = pws[gid].i[ 6];
 1314   w1[3] = pws[gid].i[ 7];
 1315 
 1316   u32 w2[4];
 1317 
 1318   w2[0] = 0;
 1319   w2[1] = 0;
 1320   w2[2] = 0;
 1321   w2[3] = 0;
 1322 
 1323   u32 w3[4];
 1324 
 1325   w3[0] = 0;
 1326   w3[1] = 0;
 1327   w3[2] = 0;
 1328   w3[3] = pws[gid].i[15];
 1329 
 1330   const u32 pw_len = pws[gid].pw_len & 63;
 1331 
 1332   /**
 1333    * main
 1334    */
 1335 
 1336   m04410m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1337 }
 1338 
 1339 KERNEL_FQ void m04410_m16 (KERN_ATTR_BASIC ())
 1340 {
 1341   /**
 1342    * base
 1343    */
 1344 
 1345   const u64 lid = get_local_id (0);
 1346   const u64 gid = get_global_id (0);
 1347   const u64 lsz = get_local_size (0);
 1348 
 1349   /**
 1350    * bin2asc table
 1351    */
 1352 
 1353   LOCAL_VK u32 l_bin2asc[256];
 1354 
 1355   for (u32 i = lid; i < 256; i += lsz)
 1356   {
 1357     const u32 i0 = (i >> 0) & 15;
 1358     const u32 i1 = (i >> 4) & 15;
 1359 
 1360     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1361                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1362   }
 1363 
 1364   SYNC_THREADS ();
 1365 
 1366   if (gid >= GID_CNT) return;
 1367 
 1368   /**
 1369    * modifier
 1370    */
 1371 
 1372   u32 w0[4];
 1373 
 1374   w0[0] = pws[gid].i[ 0];
 1375   w0[1] = pws[gid].i[ 1];
 1376   w0[2] = pws[gid].i[ 2];
 1377   w0[3] = pws[gid].i[ 3];
 1378 
 1379   u32 w1[4];
 1380 
 1381   w1[0] = pws[gid].i[ 4];
 1382   w1[1] = pws[gid].i[ 5];
 1383   w1[2] = pws[gid].i[ 6];
 1384   w1[3] = pws[gid].i[ 7];
 1385 
 1386   u32 w2[4];
 1387 
 1388   w2[0] = pws[gid].i[ 8];
 1389   w2[1] = pws[gid].i[ 9];
 1390   w2[2] = pws[gid].i[10];
 1391   w2[3] = pws[gid].i[11];
 1392 
 1393   u32 w3[4];
 1394 
 1395   w3[0] = pws[gid].i[12];
 1396   w3[1] = pws[gid].i[13];
 1397   w3[2] = pws[gid].i[14];
 1398   w3[3] = pws[gid].i[15];
 1399 
 1400   const u32 pw_len = pws[gid].pw_len & 63;
 1401 
 1402   /**
 1403    * main
 1404    */
 1405 
 1406   m04410m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1407 }
 1408 
 1409 KERNEL_FQ void m04410_s04 (KERN_ATTR_BASIC ())
 1410 {
 1411   /**
 1412    * base
 1413    */
 1414 
 1415   const u64 lid = get_local_id (0);
 1416   const u64 gid = get_global_id (0);
 1417   const u64 lsz = get_local_size (0);
 1418 
 1419   /**
 1420    * bin2asc table
 1421    */
 1422 
 1423   LOCAL_VK u32 l_bin2asc[256];
 1424 
 1425   for (u32 i = lid; i < 256; i += lsz)
 1426   {
 1427     const u32 i0 = (i >> 0) & 15;
 1428     const u32 i1 = (i >> 4) & 15;
 1429 
 1430     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1431                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1432   }
 1433 
 1434   SYNC_THREADS ();
 1435 
 1436   if (gid >= GID_CNT) return;
 1437 
 1438   /**
 1439    * modifier
 1440    */
 1441 
 1442   u32 w0[4];
 1443 
 1444   w0[0] = pws[gid].i[ 0];
 1445   w0[1] = pws[gid].i[ 1];
 1446   w0[2] = pws[gid].i[ 2];
 1447   w0[3] = pws[gid].i[ 3];
 1448 
 1449   u32 w1[4];
 1450 
 1451   w1[0] = 0;
 1452   w1[1] = 0;
 1453   w1[2] = 0;
 1454   w1[3] = 0;
 1455 
 1456   u32 w2[4];
 1457 
 1458   w2[0] = 0;
 1459   w2[1] = 0;
 1460   w2[2] = 0;
 1461   w2[3] = 0;
 1462 
 1463   u32 w3[4];
 1464 
 1465   w3[0] = 0;
 1466   w3[1] = 0;
 1467   w3[2] = 0;
 1468   w3[3] = pws[gid].i[15];
 1469 
 1470   const u32 pw_len = pws[gid].pw_len & 63;
 1471 
 1472   /**
 1473    * main
 1474    */
 1475 
 1476   m04410s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1477 }
 1478 
 1479 KERNEL_FQ void m04410_s08 (KERN_ATTR_BASIC ())
 1480 {
 1481   /**
 1482    * base
 1483    */
 1484 
 1485   const u64 lid = get_local_id (0);
 1486   const u64 gid = get_global_id (0);
 1487   const u64 lsz = get_local_size (0);
 1488 
 1489   /**
 1490    * bin2asc table
 1491    */
 1492 
 1493   LOCAL_VK u32 l_bin2asc[256];
 1494 
 1495   for (u32 i = lid; i < 256; i += lsz)
 1496   {
 1497     const u32 i0 = (i >> 0) & 15;
 1498     const u32 i1 = (i >> 4) & 15;
 1499 
 1500     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1501                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1502   }
 1503 
 1504   SYNC_THREADS ();
 1505 
 1506   if (gid >= GID_CNT) return;
 1507 
 1508   /**
 1509    * modifier
 1510    */
 1511 
 1512   u32 w0[4];
 1513 
 1514   w0[0] = pws[gid].i[ 0];
 1515   w0[1] = pws[gid].i[ 1];
 1516   w0[2] = pws[gid].i[ 2];
 1517   w0[3] = pws[gid].i[ 3];
 1518 
 1519   u32 w1[4];
 1520 
 1521   w1[0] = pws[gid].i[ 4];
 1522   w1[1] = pws[gid].i[ 5];
 1523   w1[2] = pws[gid].i[ 6];
 1524   w1[3] = pws[gid].i[ 7];
 1525 
 1526   u32 w2[4];
 1527 
 1528   w2[0] = 0;
 1529   w2[1] = 0;
 1530   w2[2] = 0;
 1531   w2[3] = 0;
 1532 
 1533   u32 w3[4];
 1534 
 1535   w3[0] = 0;
 1536   w3[1] = 0;
 1537   w3[2] = 0;
 1538   w3[3] = pws[gid].i[15];
 1539 
 1540   const u32 pw_len = pws[gid].pw_len & 63;
 1541 
 1542   /**
 1543    * main
 1544    */
 1545 
 1546   m04410s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1547 }
 1548 
 1549 KERNEL_FQ void m04410_s16 (KERN_ATTR_BASIC ())
 1550 {
 1551   /**
 1552    * base
 1553    */
 1554 
 1555   const u64 lid = get_local_id (0);
 1556   const u64 gid = get_global_id (0);
 1557   const u64 lsz = get_local_size (0);
 1558 
 1559   /**
 1560    * bin2asc table
 1561    */
 1562 
 1563   LOCAL_VK u32 l_bin2asc[256];
 1564 
 1565   for (u32 i = lid; i < 256; i += lsz)
 1566   {
 1567     const u32 i0 = (i >> 0) & 15;
 1568     const u32 i1 = (i >> 4) & 15;
 1569 
 1570     l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
 1571                  | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
 1572   }
 1573 
 1574   SYNC_THREADS ();
 1575 
 1576   if (gid >= GID_CNT) return;
 1577 
 1578   /**
 1579    * modifier
 1580    */
 1581 
 1582   u32 w0[4];
 1583 
 1584   w0[0] = pws[gid].i[ 0];
 1585   w0[1] = pws[gid].i[ 1];
 1586   w0[2] = pws[gid].i[ 2];
 1587   w0[3] = pws[gid].i[ 3];
 1588 
 1589   u32 w1[4];
 1590 
 1591   w1[0] = pws[gid].i[ 4];
 1592   w1[1] = pws[gid].i[ 5];
 1593   w1[2] = pws[gid].i[ 6];
 1594   w1[3] = pws[gid].i[ 7];
 1595 
 1596   u32 w2[4];
 1597 
 1598   w2[0] = pws[gid].i[ 8];
 1599   w2[1] = pws[gid].i[ 9];
 1600   w2[2] = pws[gid].i[10];
 1601   w2[3] = pws[gid].i[11];
 1602 
 1603   u32 w3[4];
 1604 
 1605   w3[0] = pws[gid].i[12];
 1606   w3[1] = pws[gid].i[13];
 1607   w3[2] = pws[gid].i[14];
 1608   w3[3] = pws[gid].i[15];
 1609 
 1610   const u32 pw_len = pws[gid].pw_len & 63;
 1611 
 1612   /**
 1613    * main
 1614    */
 1615 
 1616   m04410s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, l_bin2asc);
 1617 }