From 5b97fe751403ee694cc3ed7ce6028c8d1169e1bb Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 18 Apr 2019 16:52:14 +0200 Subject: [PATCH] Workaround volatile for -m 2500 and -m 2501 for macosx --- OpenCL/m02500-pure.cl | 982 ++++++++++--------------------------- OpenCL/m02501-pure.cl | 982 ++++++++++--------------------------- src/modules/module_02500.c | 20 +- src/modules/module_02501.c | 20 +- 4 files changed, 526 insertions(+), 1478 deletions(-) diff --git a/OpenCL/m02500-pure.cl b/OpenCL/m02500-pure.cl index e106634b6..d7fd2b8f1 100644 --- a/OpenCL/m02500-pure.cl +++ b/OpenCL/m02500-pure.cl @@ -294,16 +294,17 @@ KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -346,253 +347,100 @@ KERNEL_FQ void m02500_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = hc_swap32_S (digest[0]); - t0[1] = hc_swap32_S (digest[1]); - t0[2] = hc_swap32_S (digest[2]); - t0[3] = hc_swap32_S (digest[3]); - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_hmac_ctx_t ctx2; - - md5_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - md5_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } + + sha1_hmac_ctx_t ctx1; + + sha1_hmac_init_64 (&ctx1, out0, out1, z, z); + + sha1_hmac_update (&ctx1, pke, 100); + + sha1_hmac_final (&ctx1); + + ctx1.opad.h[0] = hc_swap32_S (ctx1.opad.h[0]); + ctx1.opad.h[1] = hc_swap32_S (ctx1.opad.h[1]); + ctx1.opad.h[2] = hc_swap32_S (ctx1.opad.h[2]); + ctx1.opad.h[3] = hc_swap32_S (ctx1.opad.h[3]); + + md5_hmac_ctx_t ctx2; + + md5_hmac_init_64 (&ctx2, ctx1.opad.h, z, z, z); + + md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); + + md5_hmac_final (&ctx2); + + /** + * final compare + */ + + if ((ctx2.opad.h[0] == wpa_eapol->keymic[0]) + && (ctx2.opad.h[1] == wpa_eapol->keymic[1]) + && (ctx2.opad.h[2] == wpa_eapol->keymic[2]) + && (ctx2.opad.h[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = hc_swap32_S (digest[0]); - t0[1] = hc_swap32_S (digest[1]); - t0[2] = hc_swap32_S (digest[2]); - t0[3] = hc_swap32_S (digest[3]); - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_hmac_ctx_t ctx2; - - md5_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - md5_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -604,16 +452,17 @@ KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -656,253 +505,95 @@ KERNEL_FQ void m02500_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = digest[0]; - t0[1] = digest[1]; - t0[2] = digest[2]; - t0[3] = digest[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_hmac_ctx_t ctx2; - - sha1_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - sha1_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } + + sha1_hmac_ctx_t ctx1; + + sha1_hmac_init_64 (&ctx1, out0, out1, z, z); + + sha1_hmac_update (&ctx1, pke, 100); + + sha1_hmac_final (&ctx1); + + sha1_hmac_ctx_t ctx2; + + sha1_hmac_init_64 (&ctx2, ctx1.opad.h, z, z, z); + + sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); + + sha1_hmac_final (&ctx2); + + /** + * final compare + */ + + if ((ctx2.opad.h[0] == wpa_eapol->keymic[0]) + && (ctx2.opad.h[1] == wpa_eapol->keymic[1]) + && (ctx2.opad.h[2] == wpa_eapol->keymic[2]) + && (ctx2.opad.h[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = digest[0]; - t0[1] = digest[1]; - t0[2] = digest[2]; - t0[3] = digest[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_hmac_ctx_t ctx2; - - sha1_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - sha1_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -950,16 +641,17 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -1002,315 +694,165 @@ KERNEL_FQ void m02500_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_eapol_t) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha256_hmac_ctx_t ctx1; - - sha256_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha256_hmac_update (&ctx1, pke, 102); - - sha256_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = hc_swap32_S (ctx1.opad.h[0]); - digest[1] = hc_swap32_S (ctx1.opad.h[1]); - digest[2] = hc_swap32_S (ctx1.opad.h[2]); - digest[3] = hc_swap32_S (ctx1.opad.h[3]); - - // AES CMAC - - u32 ks[44]; - - aes128_set_encrypt_key (ks, digest, s_te0, s_te1, s_te2, s_te3); - - u32 m[4]; - - m[0] = 0; - m[1] = 0; - m[2] = 0; - m[3] = 0; - - u32 iv[4]; - - iv[0] = 0; - iv[1] = 0; - iv[2] = 0; - iv[3] = 0; - - int eapol_left; - int eapol_idx; - - for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) - { - m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; - - aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); - } - - m[0] = wpa_eapol->eapol[eapol_idx + 0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3]; - - u32 k[4]; - - k[0] = 0; - k[1] = 0; - k[2] = 0; - k[3] = 0; - - aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); - - make_kn (k); - - if (eapol_left < 16) - { - make_kn (k); - } - - m[0] ^= k[0]; - m[1] ^= k[1]; - m[2] ^= k[2]; - m[3] ^= k[3]; - - m[0] ^= iv[0]; - m[1] ^= iv[1]; - m[2] ^= iv[2]; - m[3] ^= iv[3]; - - aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + sha256_hmac_ctx_t ctx1; - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; + sha256_hmac_init_64 (&ctx1, out0, out1, z, z); - u32 keymic[4]; + sha256_hmac_update (&ctx1, pke, 102); - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; + sha256_hmac_final (&ctx1); - sha256_hmac_ctx_t ctx1; + ctx1.opad.h[0] = hc_swap32_S (ctx1.opad.h[0]); + ctx1.opad.h[1] = hc_swap32_S (ctx1.opad.h[1]); + ctx1.opad.h[2] = hc_swap32_S (ctx1.opad.h[2]); + ctx1.opad.h[3] = hc_swap32_S (ctx1.opad.h[3]); - sha256_hmac_init_64 (&ctx1, w0, w1, w2, w3); + // AES CMAC - sha256_hmac_update (&ctx1, pke, 102); + u32 ks[44]; - sha256_hmac_final (&ctx1); + aes128_set_encrypt_key (ks, ctx1.opad.h, s_te0, s_te1, s_te2, s_te3); - u32 digest[4]; + u32 m[4]; - digest[0] = hc_swap32_S (ctx1.opad.h[0]); - digest[1] = hc_swap32_S (ctx1.opad.h[1]); - digest[2] = hc_swap32_S (ctx1.opad.h[2]); - digest[3] = hc_swap32_S (ctx1.opad.h[3]); + m[0] = 0; + m[1] = 0; + m[2] = 0; + m[3] = 0; - // AES CMAC + u32 iv[4]; - u32 ks[44]; + iv[0] = 0; + iv[1] = 0; + iv[2] = 0; + iv[3] = 0; - aes128_set_encrypt_key (ks, digest, s_te0, s_te1, s_te2, s_te3); + int eapol_left; + int eapol_idx; - u32 m[4]; + for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) + { + m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; + m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; + m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; + m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; - m[0] = 0; - m[1] = 0; - m[2] = 0; - m[3] = 0; + aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); + } - u32 iv[4]; + m[0] = wpa_eapol->eapol[eapol_idx + 0]; + m[1] = wpa_eapol->eapol[eapol_idx + 1]; + m[2] = wpa_eapol->eapol[eapol_idx + 2]; + m[3] = wpa_eapol->eapol[eapol_idx + 3]; - iv[0] = 0; - iv[1] = 0; - iv[2] = 0; - iv[3] = 0; + u32 k[4]; - int eapol_left; - int eapol_idx; + k[0] = 0; + k[1] = 0; + k[2] = 0; + k[3] = 0; - for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) - { - m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; + aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); - aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); - } - - m[0] = wpa_eapol->eapol[eapol_idx + 0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3]; - - u32 k[4]; - - k[0] = 0; - k[1] = 0; - k[2] = 0; - k[3] = 0; - - aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); + make_kn (k); + if (eapol_left < 16) + { make_kn (k); + } - if (eapol_left < 16) + m[0] ^= k[0]; + m[1] ^= k[1]; + m[2] ^= k[2]; + m[3] ^= k[3]; + + m[0] ^= iv[0]; + m[1] ^= iv[1]; + m[2] ^= iv[2]; + m[3] ^= iv[3]; + + u32 keymic[4]; + + keymic[0] = 0; + keymic[1] = 0; + keymic[2] = 0; + keymic[3] = 0; + + aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); + + /** + * final compare + */ + + if ((keymic[0] == wpa_eapol->keymic[0]) + && (keymic[1] == wpa_eapol->keymic[1]) + && (keymic[2] == wpa_eapol->keymic[2]) + && (keymic[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - make_kn (k); - } - - m[0] ^= k[0]; - m[1] ^= k[1]; - m[2] ^= k[2]; - m[3] ^= k[3]; - - m[0] ^= iv[0]; - m[1] ^= iv[1]; - m[2] ^= iv[2]; - m[3] ^= iv[3]; - - aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } diff --git a/OpenCL/m02501-pure.cl b/OpenCL/m02501-pure.cl index 8259b455f..db7520dd4 100644 --- a/OpenCL/m02501-pure.cl +++ b/OpenCL/m02501-pure.cl @@ -164,16 +164,17 @@ KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -216,253 +217,100 @@ KERNEL_FQ void m02501_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = hc_swap32_S (digest[0]); - t0[1] = hc_swap32_S (digest[1]); - t0[2] = hc_swap32_S (digest[2]); - t0[3] = hc_swap32_S (digest[3]); - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_hmac_ctx_t ctx2; - - md5_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - md5_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } + + sha1_hmac_ctx_t ctx1; + + sha1_hmac_init_64 (&ctx1, out0, out1, z, z); + + sha1_hmac_update (&ctx1, pke, 100); + + sha1_hmac_final (&ctx1); + + ctx1.opad.h[0] = hc_swap32_S (ctx1.opad.h[0]); + ctx1.opad.h[1] = hc_swap32_S (ctx1.opad.h[1]); + ctx1.opad.h[2] = hc_swap32_S (ctx1.opad.h[2]); + ctx1.opad.h[3] = hc_swap32_S (ctx1.opad.h[3]); + + md5_hmac_ctx_t ctx2; + + md5_hmac_init_64 (&ctx2, ctx1.opad.h, z, z, z); + + md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); + + md5_hmac_final (&ctx2); + + /** + * final compare + */ + + if ((ctx2.opad.h[0] == wpa_eapol->keymic[0]) + && (ctx2.opad.h[1] == wpa_eapol->keymic[1]) + && (ctx2.opad.h[2] == wpa_eapol->keymic[2]) + && (ctx2.opad.h[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = hc_swap32_S (digest[0]); - t0[1] = hc_swap32_S (digest[1]); - t0[2] = hc_swap32_S (digest[2]); - t0[3] = hc_swap32_S (digest[3]); - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_hmac_ctx_t ctx2; - - md5_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - md5_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - md5_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -474,16 +322,17 @@ KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -526,253 +375,95 @@ KERNEL_FQ void m02501_aux2 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = digest[0]; - t0[1] = digest[1]; - t0[2] = digest[2]; - t0[3] = digest[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_hmac_ctx_t ctx2; - - sha1_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - sha1_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } + + sha1_hmac_ctx_t ctx1; + + sha1_hmac_init_64 (&ctx1, out0, out1, z, z); + + sha1_hmac_update (&ctx1, pke, 100); + + sha1_hmac_final (&ctx1); + + sha1_hmac_ctx_t ctx2; + + sha1_hmac_init_64 (&ctx2, ctx1.opad.h, z, z, z); + + sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); + + sha1_hmac_final (&ctx2); + + /** + * final compare + */ + + if ((ctx2.opad.h[0] == wpa_eapol->keymic[0]) + && (ctx2.opad.h[1] == wpa_eapol->keymic[1]) + && (ctx2.opad.h[2] == wpa_eapol->keymic[2]) + && (ctx2.opad.h[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha1_hmac_ctx_t ctx1; - - sha1_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha1_hmac_update (&ctx1, pke, 100); - - sha1_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = ctx1.opad.h[0]; - digest[1] = ctx1.opad.h[1]; - digest[2] = ctx1.opad.h[2]; - digest[3] = ctx1.opad.h[3]; - - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - - t0[0] = digest[0]; - t0[1] = digest[1]; - t0[2] = digest[2]; - t0[3] = digest[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_hmac_ctx_t ctx2; - - sha1_hmac_init_64 (&ctx2, t0, t1, t2, t3); - - sha1_hmac_update_global (&ctx2, wpa_eapol->eapol, wpa_eapol->eapol_len); - - sha1_hmac_final (&ctx2); - - keymic[0] = ctx2.opad.h[0]; - keymic[1] = ctx2.opad.h[1]; - keymic[2] = ctx2.opad.h[2]; - keymic[3] = ctx2.opad.h[3]; - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } @@ -820,16 +511,17 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) if (gid >= gid_max) return; - u32 out[8]; + u32 out0[4]; + u32 out1[4]; - out[0] = tmps[gid].out[0]; - out[1] = tmps[gid].out[1]; - out[2] = tmps[gid].out[2]; - out[3] = tmps[gid].out[3]; - out[4] = tmps[gid].out[4]; - out[5] = tmps[gid].out[5]; - out[6] = tmps[gid].out[6]; - out[7] = tmps[gid].out[7]; + out0[0] = tmps[gid].out[0]; + out0[1] = tmps[gid].out[1]; + out0[2] = tmps[gid].out[2]; + out0[3] = tmps[gid].out[3]; + out1[0] = tmps[gid].out[4]; + out1[1] = tmps[gid].out[5]; + out1[2] = tmps[gid].out[6]; + out1[3] = tmps[gid].out[7]; const u32 digest_pos = loop_pos; @@ -872,315 +564,165 @@ KERNEL_FQ void m02501_aux3 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_eapol_t)) pke[30] = wpa_eapol->pke[30]; pke[31] = wpa_eapol->pke[31]; + u32 z[4]; + + z[0] = 0; + z[1] = 0; + z[2] = 0; + z[3] = 0; + u32 to; + u32 m0; + u32 m1; + if (wpa_eapol->nonce_compare < 0) { + m0 = pke[15] & ~0x000000ff; + m1 = pke[16] & ~0xffffff00; + to = pke[15] << 24 | pke[16] >> 8; } else { + m0 = pke[23] & ~0x000000ff; + m1 = pke[24] & ~0xffffff00; + to = pke[23] << 24 | pke[24] >> 8; } const u32 nonce_error_corrections = wpa_eapol->nonce_error_corrections; - if (wpa_eapol->detected_le == 1) + for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) - { - u32 t = to; + u32 t = to; + if (wpa_eapol->detected_le == 1) + { t -= nonce_error_corrections / 2; t += nonce_error_correction; - - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } - - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; - - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; - - u32 keymic[4]; - - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; - - sha256_hmac_ctx_t ctx1; - - sha256_hmac_init_64 (&ctx1, w0, w1, w2, w3); - - sha256_hmac_update (&ctx1, pke, 102); - - sha256_hmac_final (&ctx1); - - u32 digest[4]; - - digest[0] = hc_swap32_S (ctx1.opad.h[0]); - digest[1] = hc_swap32_S (ctx1.opad.h[1]); - digest[2] = hc_swap32_S (ctx1.opad.h[2]); - digest[3] = hc_swap32_S (ctx1.opad.h[3]); - - // AES CMAC - - u32 ks[44]; - - aes128_set_encrypt_key (ks, digest, s_te0, s_te1, s_te2, s_te3); - - u32 m[4]; - - m[0] = 0; - m[1] = 0; - m[2] = 0; - m[3] = 0; - - u32 iv[4]; - - iv[0] = 0; - iv[1] = 0; - iv[2] = 0; - iv[3] = 0; - - int eapol_left; - int eapol_idx; - - for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) - { - m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; - - aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); - } - - m[0] = wpa_eapol->eapol[eapol_idx + 0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3]; - - u32 k[4]; - - k[0] = 0; - k[1] = 0; - k[2] = 0; - k[3] = 0; - - aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); - - make_kn (k); - - if (eapol_left < 16) - { - make_kn (k); - } - - m[0] ^= k[0]; - m[1] ^= k[1]; - m[2] ^= k[2]; - m[3] ^= k[3]; - - m[0] ^= iv[0]; - m[1] ^= iv[1]; - m[2] ^= iv[2]; - m[3] ^= iv[3]; - - aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } - } } - } - - if (wpa_eapol->detected_be == 1) - { - for (u32 nonce_error_correction = 0; nonce_error_correction <= nonce_error_corrections; nonce_error_correction++) + else if (wpa_eapol->detected_be == 1) { - u32 t = to; - t = hc_swap32_S (t); t -= nonce_error_corrections / 2; t += nonce_error_correction; t = hc_swap32_S (t); + } - if (wpa_eapol->nonce_compare < 0) - { - pke[15] = (pke[15] & ~0x000000ff) | (t >> 24); - pke[16] = (pke[16] & ~0xffffff00) | (t << 8); - } - else - { - pke[23] = (pke[23] & ~0x000000ff) | (t >> 24); - pke[24] = (pke[24] & ~0xffffff00) | (t << 8); - } + if (wpa_eapol->nonce_compare < 0) + { + pke[15] = m0 | (t >> 24); + pke[16] = m1 | (t << 8); + } + else + { + pke[23] = m0 | (t >> 24); + pke[24] = m1 | (t << 8); + } - u32 w0[4]; - u32 w1[4]; - u32 w2[4]; - u32 w3[4]; + sha256_hmac_ctx_t ctx1; - w0[0] = out[0]; - w0[1] = out[1]; - w0[2] = out[2]; - w0[3] = out[3]; - w1[0] = out[4]; - w1[1] = out[5]; - w1[2] = out[6]; - w1[3] = out[7]; - w2[0] = 0; - w2[1] = 0; - w2[2] = 0; - w2[3] = 0; - w3[0] = 0; - w3[1] = 0; - w3[2] = 0; - w3[3] = 0; + sha256_hmac_init_64 (&ctx1, out0, out1, z, z); - u32 keymic[4]; + sha256_hmac_update (&ctx1, pke, 102); - keymic[0] = 0; - keymic[1] = 0; - keymic[2] = 0; - keymic[3] = 0; + sha256_hmac_final (&ctx1); - sha256_hmac_ctx_t ctx1; + ctx1.opad.h[0] = hc_swap32_S (ctx1.opad.h[0]); + ctx1.opad.h[1] = hc_swap32_S (ctx1.opad.h[1]); + ctx1.opad.h[2] = hc_swap32_S (ctx1.opad.h[2]); + ctx1.opad.h[3] = hc_swap32_S (ctx1.opad.h[3]); - sha256_hmac_init_64 (&ctx1, w0, w1, w2, w3); + // AES CMAC - sha256_hmac_update (&ctx1, pke, 102); + u32 ks[44]; - sha256_hmac_final (&ctx1); + aes128_set_encrypt_key (ks, ctx1.opad.h, s_te0, s_te1, s_te2, s_te3); - u32 digest[4]; + u32 m[4]; - digest[0] = hc_swap32_S (ctx1.opad.h[0]); - digest[1] = hc_swap32_S (ctx1.opad.h[1]); - digest[2] = hc_swap32_S (ctx1.opad.h[2]); - digest[3] = hc_swap32_S (ctx1.opad.h[3]); + m[0] = 0; + m[1] = 0; + m[2] = 0; + m[3] = 0; - // AES CMAC + u32 iv[4]; - u32 ks[44]; + iv[0] = 0; + iv[1] = 0; + iv[2] = 0; + iv[3] = 0; - aes128_set_encrypt_key (ks, digest, s_te0, s_te1, s_te2, s_te3); + int eapol_left; + int eapol_idx; - u32 m[4]; + for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) + { + m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; + m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; + m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; + m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; - m[0] = 0; - m[1] = 0; - m[2] = 0; - m[3] = 0; + aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); + } - u32 iv[4]; + m[0] = wpa_eapol->eapol[eapol_idx + 0]; + m[1] = wpa_eapol->eapol[eapol_idx + 1]; + m[2] = wpa_eapol->eapol[eapol_idx + 2]; + m[3] = wpa_eapol->eapol[eapol_idx + 3]; - iv[0] = 0; - iv[1] = 0; - iv[2] = 0; - iv[3] = 0; + u32 k[4]; - int eapol_left; - int eapol_idx; + k[0] = 0; + k[1] = 0; + k[2] = 0; + k[3] = 0; - for (eapol_left = wpa_eapol->eapol_len, eapol_idx = 0; eapol_left > 16; eapol_left -= 16, eapol_idx += 4) - { - m[0] = wpa_eapol->eapol[eapol_idx + 0] ^ iv[0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1] ^ iv[1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2] ^ iv[2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3] ^ iv[3]; + aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); - aes128_encrypt (ks, m, iv, s_te0, s_te1, s_te2, s_te3, s_te4); - } - - m[0] = wpa_eapol->eapol[eapol_idx + 0]; - m[1] = wpa_eapol->eapol[eapol_idx + 1]; - m[2] = wpa_eapol->eapol[eapol_idx + 2]; - m[3] = wpa_eapol->eapol[eapol_idx + 3]; - - u32 k[4]; - - k[0] = 0; - k[1] = 0; - k[2] = 0; - k[3] = 0; - - aes128_encrypt (ks, k, k, s_te0, s_te1, s_te2, s_te3, s_te4); + make_kn (k); + if (eapol_left < 16) + { make_kn (k); + } - if (eapol_left < 16) + m[0] ^= k[0]; + m[1] ^= k[1]; + m[2] ^= k[2]; + m[3] ^= k[3]; + + m[0] ^= iv[0]; + m[1] ^= iv[1]; + m[2] ^= iv[2]; + m[3] ^= iv[3]; + + u32 keymic[4]; + + keymic[0] = 0; + keymic[1] = 0; + keymic[2] = 0; + keymic[3] = 0; + + aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); + + /** + * final compare + */ + + if ((keymic[0] == wpa_eapol->keymic[0]) + && (keymic[1] == wpa_eapol->keymic[1]) + && (keymic[2] == wpa_eapol->keymic[2]) + && (keymic[3] == wpa_eapol->keymic[3])) + { + if (atomic_inc (&hashes_shown[digest_cur]) == 0) { - make_kn (k); - } - - m[0] ^= k[0]; - m[1] ^= k[1]; - m[2] ^= k[2]; - m[3] ^= k[3]; - - m[0] ^= iv[0]; - m[1] ^= iv[1]; - m[2] ^= iv[2]; - m[3] ^= iv[3]; - - aes128_encrypt (ks, m, keymic, s_te0, s_te1, s_te2, s_te3, s_te4); - - /** - * final compare - */ - - if ((keymic[0] == wpa_eapol->keymic[0]) - && (keymic[1] == wpa_eapol->keymic[1]) - && (keymic[2] == wpa_eapol->keymic[2]) - && (keymic[3] == wpa_eapol->keymic[3])) - { - if (atomic_inc (&hashes_shown[digest_cur]) == 0) - { - mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); - } + mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0); } } } diff --git a/src/modules/module_02500.c b/src/modules/module_02500.c index 5b66c8708..b449c58da 100644 --- a/src/modules/module_02500.c +++ b/src/modules/module_02500.c @@ -587,24 +587,6 @@ bool module_potfile_custom_check (MAYBE_UNUSED const hashconfig_t *hashconfig, M return r; } -char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - char *jit_build_options = NULL; - - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - if (device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) - { - if (device_param->device_type & CL_DEVICE_TYPE_GPU) - { - hc_asprintf (&jit_build_options, "-D MAYBE_VOLATILE=volatile"); - } - } - } - - return jit_build_options; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -945,7 +927,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_hook23 = MODULE_DEFAULT; module_ctx->module_hook_salt_size = MODULE_DEFAULT; module_ctx->module_hook_size = MODULE_DEFAULT; - module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_build_options = MODULE_DEFAULT; module_ctx->module_jit_cache_disable = MODULE_DEFAULT; module_ctx->module_kernel_accel_max = MODULE_DEFAULT; module_ctx->module_kernel_accel_min = MODULE_DEFAULT; diff --git a/src/modules/module_02501.c b/src/modules/module_02501.c index fe830cbd6..83ac34e68 100644 --- a/src/modules/module_02501.c +++ b/src/modules/module_02501.c @@ -584,24 +584,6 @@ int module_hash_encode_status (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB return line_len; } -char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - char *jit_build_options = NULL; - - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - if (device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) - { - if (device_param->device_type & CL_DEVICE_TYPE_GPU) - { - hc_asprintf (&jit_build_options, "-D MAYBE_VOLATILE=volatile"); - } - } - } - - return jit_build_options; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -942,7 +924,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_hook23 = MODULE_DEFAULT; module_ctx->module_hook_salt_size = MODULE_DEFAULT; module_ctx->module_hook_size = MODULE_DEFAULT; - module_ctx->module_jit_build_options = module_jit_build_options; + module_ctx->module_jit_build_options = MODULE_DEFAULT; module_ctx->module_jit_cache_disable = MODULE_DEFAULT; module_ctx->module_kernel_accel_max = MODULE_DEFAULT; module_ctx->module_kernel_accel_min = MODULE_DEFAULT;