diff --git a/OpenCL/m14511_a0-pure.cl b/OpenCL/m14511_a0-pure.cl index 11e2ea4df..52189158e 100644 --- a/OpenCL/m14511_a0-pure.cl +++ b/OpenCL/m14511_a0-pure.cl @@ -76,10 +76,6 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -121,7 +117,9 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; sha1_update_swap (&ctx, w, w_len); @@ -271,10 +269,6 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -316,7 +310,9 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; sha1_update_swap (&ctx, w, w_len); diff --git a/OpenCL/m14511_a1-pure.cl b/OpenCL/m14511_a1-pure.cl index 8abf47d99..33e337030 100644 --- a/OpenCL/m14511_a1-pure.cl +++ b/OpenCL/m14511_a1-pure.cl @@ -74,10 +74,6 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -94,7 +90,9 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } @@ -276,10 +274,6 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -296,7 +290,9 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14511_a3-pure.cl b/OpenCL/m14511_a3-pure.cl index baf8bcccf..3e0afc6cf 100644 --- a/OpenCL/m14511_a3-pure.cl +++ b/OpenCL/m14511_a3-pure.cl @@ -74,10 +74,6 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -101,12 +97,6 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); @@ -130,9 +120,11 @@ KERNEL_FQ void m14511_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap(&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap(&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); @@ -275,10 +267,6 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -302,17 +290,11 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); - sha1_update_swap(&ctx0, w, pw_len); + sha1_update_swap (&ctx0, w, pw_len); sha1_final (&ctx0); @@ -331,9 +313,11 @@ KERNEL_FQ void m14511_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap(&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap(&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); diff --git a/OpenCL/m14512_a0-pure.cl b/OpenCL/m14512_a0-pure.cl index c9fce0e80..8e42b89fb 100644 --- a/OpenCL/m14512_a0-pure.cl +++ b/OpenCL/m14512_a0-pure.cl @@ -40,10 +40,6 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -85,7 +81,9 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; sha1_update_swap (&ctx, w, w_len); @@ -198,10 +196,6 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -243,7 +237,10 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; + sha1_update_swap (&ctx, w, w_len); sha1_final (&ctx); diff --git a/OpenCL/m14512_a1-pure.cl b/OpenCL/m14512_a1-pure.cl index 503766809..161741e96 100644 --- a/OpenCL/m14512_a1-pure.cl +++ b/OpenCL/m14512_a1-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -58,7 +54,9 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } @@ -204,10 +202,6 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -224,7 +218,9 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14512_a3-pure.cl b/OpenCL/m14512_a3-pure.cl index 2cc2448bc..47193000b 100644 --- a/OpenCL/m14512_a3-pure.cl +++ b/OpenCL/m14512_a3-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -65,12 +61,6 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); @@ -94,9 +84,11 @@ KERNEL_FQ void m14512_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap (&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); @@ -203,10 +195,6 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -230,12 +218,6 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); @@ -259,9 +241,11 @@ KERNEL_FQ void m14512_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap (&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); diff --git a/OpenCL/m14513_a0-pure.cl b/OpenCL/m14513_a0-pure.cl index 28de69e7e..2e7c9919b 100644 --- a/OpenCL/m14513_a0-pure.cl +++ b/OpenCL/m14513_a0-pure.cl @@ -40,10 +40,6 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -85,7 +81,9 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; sha1_update_swap (&ctx, w, w_len); @@ -199,10 +197,6 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -244,7 +238,9 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; sha1_update_swap (&ctx, w, w_len); diff --git a/OpenCL/m14513_a1-pure.cl b/OpenCL/m14513_a1-pure.cl index 6a0181183..8bf808a3c 100644 --- a/OpenCL/m14513_a1-pure.cl +++ b/OpenCL/m14513_a1-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -58,7 +54,9 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } @@ -205,10 +203,6 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - sha1_ctx_t ctx0, ctx0_padding; sha1_init (&ctx0); @@ -225,7 +219,9 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - sha1_update_swap (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x41000000; + + ctx0_padding.len = 1; sha1_update_swap (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14513_a3-pure.cl b/OpenCL/m14513_a3-pure.cl index 45f00c9f5..0cb812e59 100644 --- a/OpenCL/m14513_a3-pure.cl +++ b/OpenCL/m14513_a3-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -65,12 +61,6 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); @@ -94,9 +84,11 @@ KERNEL_FQ void m14513_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap (&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); @@ -204,10 +196,6 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -231,12 +219,6 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - sha1_ctx_t ctx0; sha1_init (&ctx0); @@ -260,9 +242,11 @@ KERNEL_FQ void m14513_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) sha1_init (&ctx); - sha1_update_swap (&ctx, padding, 1); + ctx.w0[0] = 0x41000000; + + ctx.len = 1; - sha1_update_swap (&ctx, _w, _w_len); + sha1_update_swap (&ctx, w, pw_len); sha1_final (&ctx); diff --git a/OpenCL/m14541_a0-pure.cl b/OpenCL/m14541_a0-pure.cl index f7deec8fb..2ed23a0ba 100644 --- a/OpenCL/m14541_a0-pure.cl +++ b/OpenCL/m14541_a0-pure.cl @@ -76,10 +76,6 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -121,7 +117,9 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); @@ -271,10 +269,6 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -288,6 +282,7 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len); u32 w[64]; + u32 w_len = tmp.pw_len; for (u32 i = 0; i < 64; i++) w[i] = tmp.i[i]; @@ -315,7 +310,9 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); diff --git a/OpenCL/m14541_a1-pure.cl b/OpenCL/m14541_a1-pure.cl index 1fd92b779..f18137677 100644 --- a/OpenCL/m14541_a1-pure.cl +++ b/OpenCL/m14541_a1-pure.cl @@ -74,10 +74,6 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -94,7 +90,9 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } @@ -276,10 +274,6 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -296,7 +290,9 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14541_a3-pure.cl b/OpenCL/m14541_a3-pure.cl index b5c193e01..112b9d452 100644 --- a/OpenCL/m14541_a3-pure.cl +++ b/OpenCL/m14541_a3-pure.cl @@ -74,10 +74,6 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -101,12 +97,6 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -130,9 +120,11 @@ KERNEL_FQ void m14541_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); @@ -275,10 +267,6 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 aes_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -302,12 +290,6 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -331,9 +313,11 @@ KERNEL_FQ void m14541_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); diff --git a/OpenCL/m14542_a0-pure.cl b/OpenCL/m14542_a0-pure.cl index ee6a4bd4c..bd1038fb9 100644 --- a/OpenCL/m14542_a0-pure.cl +++ b/OpenCL/m14542_a0-pure.cl @@ -40,10 +40,6 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -85,7 +81,9 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); @@ -198,10 +196,6 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -243,7 +237,9 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); diff --git a/OpenCL/m14542_a1-pure.cl b/OpenCL/m14542_a1-pure.cl index 88f27946f..06ade940a 100644 --- a/OpenCL/m14542_a1-pure.cl +++ b/OpenCL/m14542_a1-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -58,7 +54,9 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } @@ -204,10 +202,6 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -224,7 +218,9 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14542_a3-pure.cl b/OpenCL/m14542_a3-pure.cl index 8d56c7e7c..5e37f44b1 100644 --- a/OpenCL/m14542_a3-pure.cl +++ b/OpenCL/m14542_a3-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -65,12 +61,6 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -94,9 +84,11 @@ KERNEL_FQ void m14542_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); @@ -203,10 +195,6 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 serpent_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -230,12 +218,6 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -259,9 +241,11 @@ KERNEL_FQ void m14542_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); diff --git a/OpenCL/m14543_a0-pure.cl b/OpenCL/m14543_a0-pure.cl index 70268b5f9..13b0910c8 100644 --- a/OpenCL/m14543_a0-pure.cl +++ b/OpenCL/m14543_a0-pure.cl @@ -40,10 +40,6 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -85,7 +81,9 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); @@ -199,10 +197,6 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) * base */ - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - COPY_PW (pws[gid]); /** @@ -244,7 +238,9 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; ripemd160_update (&ctx, w, w_len); @@ -260,6 +256,7 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_RULES_ESALT (cryptoapi_t)) } // key + u32 ukey[8] = { 0 }; ukey[0] = k0; diff --git a/OpenCL/m14543_a1-pure.cl b/OpenCL/m14543_a1-pure.cl index 86a6d0a27..3db0f2791 100644 --- a/OpenCL/m14543_a1-pure.cl +++ b/OpenCL/m14543_a1-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -58,7 +54,9 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } @@ -205,10 +203,6 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - ripemd160_ctx_t ctx0, ctx0_padding; ripemd160_init (&ctx0); @@ -225,7 +219,9 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_ESALT (cryptoapi_t)) ctx0_padding = ctx0; - ripemd160_update (&ctx0_padding, padding, 1); + ctx0_padding.w0[0] = 0x00000041; + + ctx0_padding.len = 1; ripemd160_update (&ctx0_padding, w, w_len); } diff --git a/OpenCL/m14543_a3-pure.cl b/OpenCL/m14543_a3-pure.cl index cf76fed06..e8f8977fa 100644 --- a/OpenCL/m14543_a3-pure.cl +++ b/OpenCL/m14543_a3-pure.cl @@ -38,10 +38,6 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -65,12 +61,6 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -94,9 +84,11 @@ KERNEL_FQ void m14543_mxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); @@ -204,10 +196,6 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) u32 twofish_key_len = esalt_bufs[DIGESTS_OFFSET].key_size; - u32 padding[64] = { 0 }; - - padding[0] = 0x00000041; - const u32 pw_len = pws[gid].pw_len; u32x w[64] = { 0 }; @@ -231,12 +219,6 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) w[0] = w0; - u32x _w[64]; - - u32 _w_len = pw_len; - - for (u32 i = 0; i < 64; i++) _w[i] = w[i]; - ripemd160_ctx_t ctx0; ripemd160_init (&ctx0); @@ -260,9 +242,11 @@ KERNEL_FQ void m14543_sxx (KERN_ATTR_VECTOR_ESALT (cryptoapi_t)) ripemd160_init (&ctx); - ripemd160_update (&ctx, padding, 1); + ctx.w0[0] = 0x00000041; + + ctx.len = 1; - ripemd160_update (&ctx, _w, _w_len); + ripemd160_update (&ctx, w, pw_len); ripemd160_final (&ctx); diff --git a/tools/cl_tests/hashcat_ripemd160_aes_128.img b/tools/cl_tests/hashcat_ripemd160_aes_128.img new file mode 100644 index 000000000..630c39aa3 Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_aes_128.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_aes_192.img b/tools/cl_tests/hashcat_ripemd160_aes_192.img new file mode 100644 index 000000000..ea6cdf5f3 Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_aes_192.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_aes_256.img b/tools/cl_tests/hashcat_ripemd160_aes_256.img new file mode 100644 index 000000000..67b21f64c Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_aes_256.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_serpent_128.img b/tools/cl_tests/hashcat_ripemd160_serpent_128.img new file mode 100644 index 000000000..2edccd33f Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_serpent_128.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_serpent_192.img b/tools/cl_tests/hashcat_ripemd160_serpent_192.img new file mode 100644 index 000000000..7ae6a59f6 Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_serpent_192.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_serpent_256.img b/tools/cl_tests/hashcat_ripemd160_serpent_256.img new file mode 100644 index 000000000..a213662f0 Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_serpent_256.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_twofish_128.img b/tools/cl_tests/hashcat_ripemd160_twofish_128.img new file mode 100644 index 000000000..c53e7edb9 Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_twofish_128.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_twofish_192.img b/tools/cl_tests/hashcat_ripemd160_twofish_192.img new file mode 100644 index 000000000..dcb9a32af Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_twofish_192.img differ diff --git a/tools/cl_tests/hashcat_ripemd160_twofish_256.img b/tools/cl_tests/hashcat_ripemd160_twofish_256.img new file mode 100644 index 000000000..f6d2f79fc Binary files /dev/null and b/tools/cl_tests/hashcat_ripemd160_twofish_256.img differ diff --git a/tools/cl_tests/hashcat_sha1_aes_128.img b/tools/cl_tests/hashcat_sha1_aes_128.img new file mode 100644 index 000000000..235382530 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_aes_128.img differ diff --git a/tools/cl_tests/hashcat_sha1_aes_192.img b/tools/cl_tests/hashcat_sha1_aes_192.img new file mode 100644 index 000000000..56f641450 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_aes_192.img differ diff --git a/tools/cl_tests/hashcat_sha1_aes_256.img b/tools/cl_tests/hashcat_sha1_aes_256.img new file mode 100644 index 000000000..be617077d Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_aes_256.img differ diff --git a/tools/cl_tests/hashcat_sha1_serpent_128.img b/tools/cl_tests/hashcat_sha1_serpent_128.img new file mode 100644 index 000000000..19b97f970 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_serpent_128.img differ diff --git a/tools/cl_tests/hashcat_sha1_serpent_192.img b/tools/cl_tests/hashcat_sha1_serpent_192.img new file mode 100644 index 000000000..fc6847863 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_serpent_192.img differ diff --git a/tools/cl_tests/hashcat_sha1_serpent_256.img b/tools/cl_tests/hashcat_sha1_serpent_256.img new file mode 100644 index 000000000..429f8ed98 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_serpent_256.img differ diff --git a/tools/cl_tests/hashcat_sha1_twofish_128.img b/tools/cl_tests/hashcat_sha1_twofish_128.img new file mode 100644 index 000000000..def845faa Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_twofish_128.img differ diff --git a/tools/cl_tests/hashcat_sha1_twofish_192.img b/tools/cl_tests/hashcat_sha1_twofish_192.img new file mode 100644 index 000000000..4432f84e1 Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_twofish_192.img differ diff --git a/tools/cl_tests/hashcat_sha1_twofish_256.img b/tools/cl_tests/hashcat_sha1_twofish_256.img new file mode 100644 index 000000000..08a58e6aa Binary files /dev/null and b/tools/cl_tests/hashcat_sha1_twofish_256.img differ diff --git a/tools/cl_tests/hashcat_sha256_aes_128.img b/tools/cl_tests/hashcat_sha256_aes_128.img new file mode 100644 index 000000000..1fcb45416 Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_aes_128.img differ diff --git a/tools/cl_tests/hashcat_sha256_aes_192.img b/tools/cl_tests/hashcat_sha256_aes_192.img new file mode 100644 index 000000000..3b7902bcc Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_aes_192.img differ diff --git a/tools/cl_tests/hashcat_sha256_aes_256.img b/tools/cl_tests/hashcat_sha256_aes_256.img new file mode 100644 index 000000000..aa380c6fd Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_aes_256.img differ diff --git a/tools/cl_tests/hashcat_sha256_serpent_128.img b/tools/cl_tests/hashcat_sha256_serpent_128.img new file mode 100644 index 000000000..9bae9196d Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_serpent_128.img differ diff --git a/tools/cl_tests/hashcat_sha256_serpent_192.img b/tools/cl_tests/hashcat_sha256_serpent_192.img new file mode 100644 index 000000000..78f5a2502 Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_serpent_192.img differ diff --git a/tools/cl_tests/hashcat_sha256_serpent_256.img b/tools/cl_tests/hashcat_sha256_serpent_256.img new file mode 100644 index 000000000..d4abea453 Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_serpent_256.img differ diff --git a/tools/cl_tests/hashcat_sha256_twofish_128.img b/tools/cl_tests/hashcat_sha256_twofish_128.img new file mode 100644 index 000000000..7130543a4 Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_twofish_128.img differ diff --git a/tools/cl_tests/hashcat_sha256_twofish_192.img b/tools/cl_tests/hashcat_sha256_twofish_192.img new file mode 100644 index 000000000..5ce441f19 Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_twofish_192.img differ diff --git a/tools/cl_tests/hashcat_sha256_twofish_256.img b/tools/cl_tests/hashcat_sha256_twofish_256.img new file mode 100644 index 000000000..b412e36bd Binary files /dev/null and b/tools/cl_tests/hashcat_sha256_twofish_256.img differ diff --git a/tools/cl_tests/hashcat_sha512_aes_128.img b/tools/cl_tests/hashcat_sha512_aes_128.img new file mode 100644 index 000000000..e0bf9f173 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_aes_128.img differ diff --git a/tools/cl_tests/hashcat_sha512_aes_192.img b/tools/cl_tests/hashcat_sha512_aes_192.img new file mode 100644 index 000000000..e11690113 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_aes_192.img differ diff --git a/tools/cl_tests/hashcat_sha512_aes_256.img b/tools/cl_tests/hashcat_sha512_aes_256.img new file mode 100644 index 000000000..2786b2648 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_aes_256.img differ diff --git a/tools/cl_tests/hashcat_sha512_serpent_128.img b/tools/cl_tests/hashcat_sha512_serpent_128.img new file mode 100644 index 000000000..0282f5ac3 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_serpent_128.img differ diff --git a/tools/cl_tests/hashcat_sha512_serpent_192.img b/tools/cl_tests/hashcat_sha512_serpent_192.img new file mode 100644 index 000000000..3af085f25 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_serpent_192.img differ diff --git a/tools/cl_tests/hashcat_sha512_serpent_256.img b/tools/cl_tests/hashcat_sha512_serpent_256.img new file mode 100644 index 000000000..97c2d1887 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_serpent_256.img differ diff --git a/tools/cl_tests/hashcat_sha512_twofish_128.img b/tools/cl_tests/hashcat_sha512_twofish_128.img new file mode 100644 index 000000000..022a4097a Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_twofish_128.img differ diff --git a/tools/cl_tests/hashcat_sha512_twofish_192.img b/tools/cl_tests/hashcat_sha512_twofish_192.img new file mode 100644 index 000000000..068d40378 Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_twofish_192.img differ diff --git a/tools/cl_tests/hashcat_sha512_twofish_256.img b/tools/cl_tests/hashcat_sha512_twofish_256.img new file mode 100644 index 000000000..1ed9a640f Binary files /dev/null and b/tools/cl_tests/hashcat_sha512_twofish_256.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_aes_128.img b/tools/cl_tests/hashcat_whirlpool_aes_128.img new file mode 100644 index 000000000..bfa9067af Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_aes_128.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_aes_192.img b/tools/cl_tests/hashcat_whirlpool_aes_192.img new file mode 100644 index 000000000..89fdd6039 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_aes_192.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_aes_256.img b/tools/cl_tests/hashcat_whirlpool_aes_256.img new file mode 100644 index 000000000..5c856a323 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_aes_256.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_serpent_128.img b/tools/cl_tests/hashcat_whirlpool_serpent_128.img new file mode 100644 index 000000000..0a107729e Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_serpent_128.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_serpent_192.img b/tools/cl_tests/hashcat_whirlpool_serpent_192.img new file mode 100644 index 000000000..2c862dee7 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_serpent_192.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_serpent_256.img b/tools/cl_tests/hashcat_whirlpool_serpent_256.img new file mode 100644 index 000000000..2e63be484 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_serpent_256.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_twofish_128.img b/tools/cl_tests/hashcat_whirlpool_twofish_128.img new file mode 100644 index 000000000..263a3fa56 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_twofish_128.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_twofish_192.img b/tools/cl_tests/hashcat_whirlpool_twofish_192.img new file mode 100644 index 000000000..4f9eeaa97 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_twofish_192.img differ diff --git a/tools/cl_tests/hashcat_whirlpool_twofish_256.img b/tools/cl_tests/hashcat_whirlpool_twofish_256.img new file mode 100644 index 000000000..1fa997d23 Binary files /dev/null and b/tools/cl_tests/hashcat_whirlpool_twofish_256.img differ diff --git a/tools/cryptoloop2hashcat.py b/tools/cryptoloop2hashcat.py index 79d8ad7fc..b6c51671d 100644 --- a/tools/cryptoloop2hashcat.py +++ b/tools/cryptoloop2hashcat.py @@ -98,5 +98,4 @@ else: f.close() -print('Hashcat mode: ' + str(hash_mode)) -print('Hash: $cryptoapi$' + str(kern_type) + '$' + str(key_size) + '$03000000000000000000000000000000$00000000000000000000000000000000$' + ct) +print('$cryptoapi$' + str(kern_type) + '$' + str(key_size) + '$03000000000000000000000000000000$00000000000000000000000000000000$' + ct) diff --git a/tools/test.sh b/tools/test.sh index 91e218514..8611c91c0 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -24,10 +24,13 @@ NOCHECK_ENCODING="16800 22000" # LUKS mode has test containers LUKS_MODE="14600" +# Cryptoloop mode which have test containers +CL_MODES="14511 14512 14513 14521 14522 14523 14531 14532 14533 14541 14542 14543 14551 14552 14553" + # missing hash types: 5200 HASH_TYPES=$(ls "${TDIR}"/test_modules/*.pm | sed -E 's/.*m0*([0-9]+).pm/\1/') -HASH_TYPES="${HASH_TYPES} ${TC_MODES} ${VC_MODES} ${LUKS_MODE}" +HASH_TYPES="${HASH_TYPES} ${TC_MODES} ${VC_MODES} ${LUKS_MODE} ${CL_MODES}" HASH_TYPES=$(echo -n "${HASH_TYPES}" | tr ' ' '\n' | sort -u -n | tr '\n' ' ') VECTOR_WIDTHS="1 2 4 8 16" @@ -156,24 +159,23 @@ function is_in_array() function init() { if [ "${PACKAGE}" -eq 1 ]; then - echo "[ ${OUTD} ] > Generate tests for hash type $hash_type." - else - echo "[ ${OUTD} ] > Init test for hash type $hash_type." - fi rm -rf "${OUTD}/${hash_type}.sh" "${OUTD}/${hash_type}_passwords.txt" "${OUTD}/${hash_type}_hashes.txt" - # Exclude TrueCrypt and VeraCrypt testing modes + # Exclude TrueCrypt, VeraCrypt and CryptoLoop testing modes if is_in_array "${hash_type}" ${TC_MODES}; then return 0 fi if is_in_array "${hash_type}" ${VC_MODES}; then return 0 fi + if is_in_array "${hash_type}" ${CL_MODES}; then + return 0 + fi if [ "${hash_type}" -eq ${LUKS_MODE} ]; then @@ -2375,6 +2377,176 @@ function attack_7() fi } +function cryptoloop_test() +{ + hashType=$1 + keySize=$2 + CMD="unset" + + mkdir -p ${OUTD}/cl_tests + + case $hashType in + + 14511) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha1_aes_${keySize}.img --hash sha1 --cipher aes --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha1_aes_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha1_aes_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14512) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha1_serpent_${keySize}.img --hash sha1 --cipher serpent --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha1_serpent_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha1_serpent_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14513) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha1_twofish_${keySize}.img --hash sha1 --cipher twofish --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha1_twofish_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha1_twofish_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14521) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha256_aes_${keySize}.img --hash sha256 --cipher aes --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha256_aes_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha256_aes_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14522) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha256_serpent_${keySize}.img --hash sha256 --cipher serpent --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha256_serpent_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha256_serpent_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14523) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha256_twofish_${keySize}.img --hash sha256 --cipher twofish --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha256_twofish_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha256_twofish_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14531) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha512_aes_${keySize}.img --hash sha512 --cipher aes --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha512_aes_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha512_aes_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14532) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha512_serpent_${keySize}.img --hash sha512 --cipher serpent --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha512_serpent_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha512_serpent_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14533) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_sha512_twofish_${keySize}.img --hash sha512 --cipher twofish --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_sha512_twofish_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_sha512_twofish_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14541) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_ripemd160_aes_${keySize}.img --hash ripemd160 --cipher aes --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_ripemd160_aes_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_ripemd160_aes_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14542) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_ripemd160_serpent_${keySize}.img --hash ripemd160 --cipher serpent --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_ripemd160_serpent_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_ripemd160_serpent_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14543) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_ripemd160_twofish_${keySize}.img --hash ripemd160 --cipher twofish --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_ripemd160_twofish_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_ripemd160_twofish_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14551) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_whirlpool_aes_${keySize}.img --hash whirlpool --cipher aes --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_whirlpool_aes_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_whirlpool_aes_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14552) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_whirlpool_serpent_${keySize}.img --hash whirlpool --cipher serpent --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_whirlpool_serpent_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_whirlpool_serpent_${keySize}.hash hashca?l" + ;; + esac + ;; + + 14553) + case $keySize in + 128|192|256) + ${TDIR}/cryptoloop2hashcat.py --source ${TDIR}/cl_tests/hashcat_whirlpool_twofish_${keySize}.img --hash whirlpool --cipher twofish --keysize ${keySize} > ${OUTD}/cl_tests/hashcat_whirlpool_twofish_${keySize}.hash + CMD="./${BIN} ${OPTS} -a 3 -m 14500 ${OUTD}/cl_tests/hashcat_whirlpool_twofish_${keySize}.hash hashca?l" + ;; + esac + ;; + esac + + if [ ${#CMD} -gt 5 ]; then + echo "> Testing hash type $hashType with attack mode 3, markov ${MARKOV}, single hash, Device-Type ${TYPE}, Kernel-Type ${KERNEL_TYPE}, Vector-Width ${VECTOR}, Key-Size ${keySize}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt" + + output=$(${CMD} 2>&1) + + ret=${?} + + echo "${output}" >> "${OUTD}/logfull.txt" + + cnt=1 + e_nf=0 + msg="OK" + + if [ ${ret} -ne 0 ]; then + e_nf=1 + msg="Error" + fi + + echo "[ ${OUTD} ] [ Type ${hash_type}, Attack 3, Mode single, Device-Type ${TYPE}, Kernel-Type ${KERNEL_TYPE}, Vector-Width ${VECTOR}, Key-Size ${keySize} ] > $msg : ${e_nf}/${cnt} not found" + + status ${ret} + fi +} + function truecrypt_test() { hashType=$1 @@ -3072,7 +3244,9 @@ if [ "${PACKAGE}" -eq 0 ] || [ -z "${PACKAGE_FOLDER}" ]; then if [ "${TMP_HT}" -ne ${LUKS_MODE} ]; then if ! is_in_array "${TMP_HT}" ${TC_MODES}; then if ! is_in_array "${TMP_HT}" ${VC_MODES}; then - perl tools/test.pl single "${TMP_HT}" >> "${OUTD}/all.sh" + if ! is_in_array "${TMP_HT}" ${CL_MODES}; then + perl tools/test.pl single "${TMP_HT}" >> "${OUTD}/all.sh" + fi fi fi fi @@ -3087,7 +3261,9 @@ if [ "${PACKAGE}" -eq 0 ] || [ -z "${PACKAGE_FOLDER}" ]; then # Exclude TrueCrypt and VeraCrypt testing modes if ! is_in_array "${TMP_HT}" ${TC_MODES}; then if ! is_in_array "${TMP_HT}" ${VC_MODES}; then - perl tools/test.pl single "${TMP_HT}" >> "${OUTD}/all.sh" + if ! is_in_array "${TMP_HT}" ${CL_MODES}; then + perl tools/test.pl single "${TMP_HT}" >> "${OUTD}/all.sh" + fi fi fi fi @@ -3197,7 +3373,6 @@ if [ "${PACKAGE}" -eq 0 ] || [ -z "${PACKAGE_FOLDER}" ]; then veracrypt_test 4 # camellia (alternative cascade) veracrypt_test 5 # kuznyechik veracrypt_test 6 # kuznyechik (alternative cascade) - elif is_in_array "${hash_type}" ${TC_MODES}; then # run truecrypt tests truecrypt_test "${hash_type}" 0 @@ -3213,20 +3388,27 @@ if [ "${PACKAGE}" -eq 0 ] || [ -z "${PACKAGE_FOLDER}" ]; then else - # run attack mode 0 (stdin) - if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 0 ]; then attack_0; fi + if is_in_array "${hash_type}" ${CL_MODES}; then + # run cryptoloop tests + cryptoloop_test "${hash_type}" 128 + cryptoloop_test "${hash_type}" 192 + cryptoloop_test "${hash_type}" 256 + else + # run attack mode 0 (stdin) + if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 0 ]; then attack_0; fi - # run attack mode 1 (combinator) - if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 1 ]; then attack_1; fi + # run attack mode 1 (combinator) + if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 1 ]; then attack_1; fi - # run attack mode 3 (bruteforce) - if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 3 ]; then attack_3; fi + # run attack mode 3 (bruteforce) + if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 3 ]; then attack_3; fi - # run attack mode 6 (dict+mask) - if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 6 ]; then attack_6; fi + # run attack mode 6 (dict+mask) + if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 6 ]; then attack_6; fi - # run attack mode 7 (mask+dict) - if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 7 ]; then attack_7; fi + # run attack mode 7 (mask+dict) + if [ ${ATTACK} -eq 65535 ] || [ ${ATTACK} -eq 7 ]; then attack_7; fi + fi fi fi @@ -3245,9 +3427,7 @@ fi # fix logfile if [ "${PACKAGE}" -eq 0 ]; then - cat -vet "${OUTD}/logfull.txt" | sed -e 's/\^M \^M//g' | sed -e 's/\$$//g' > "${OUTD}/test_report.log" - fi rm -rf "${OUTD}/logfull.txt" @@ -3261,11 +3441,13 @@ if [ "${PACKAGE}" -eq 1 ]; then copy_luks_dir=0 copy_tc_dir=0 copy_vc_dir=0 + copy_cl_dir=0 if [ "${HT}" -eq 65535 ]; then copy_luks_dir=1 copy_tc_dir=1 copy_vc_dir=1 + copy_cl_dir=1 else for TMP_HT in $(seq "${HT_MIN}" "${HT_MAX}"); do if [ "${TMP_HT}" -eq "${LUKS_MODE}" ]; then @@ -3274,6 +3456,8 @@ if [ "${PACKAGE}" -eq 1 ]; then copy_tc_dir=1 elif is_in_array "${TMP_HT}" ${VC_MODES}; then copy_vc_dir=1 + elif is_in_array "${TMP_HT}" ${CL_MODES}; then + copy_cl_dir=1 fi done fi @@ -3293,6 +3477,11 @@ if [ "${PACKAGE}" -eq 1 ]; then cp ${TDIR}/vc_tests/* "${OUTD}/vc_tests/" fi + if [ "${copy_cl_dir}" -eq 1 ]; then + mkdir "${OUTD}/cl_tests/" + cp ${TDIR}/cl_tests/* "${OUTD}/cl_tests/" + fi + # if we package from a given folder, we need to check if e.g. the files needed for multi mode are there if [ -n "${PACKAGE_FOLDER}" ]; then