|
|
|
@ -197,6 +197,7 @@ KERNEL_FQ void m19900_loop (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
/**
|
|
|
|
|
* base
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const u64 gid = get_global_id (0);
|
|
|
|
|
|
|
|
|
|
if ((gid * VECT_SIZE) >= gid_max) return;
|
|
|
|
@ -384,11 +385,12 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
|
|
|
|
|
aes256_set_encrypt_key (aes_ks, aes_key, s_te0, s_te1, s_te2, s_te3);
|
|
|
|
|
|
|
|
|
|
u32 key_bytes[8];
|
|
|
|
|
|
|
|
|
|
u32 out[4];
|
|
|
|
|
|
|
|
|
|
aes256_encrypt_cbc (aes_ks, aes_iv, nfolded, out, s_te0, s_te1, s_te2, s_te3, s_te4);
|
|
|
|
|
|
|
|
|
|
u32 key_bytes[8];
|
|
|
|
|
|
|
|
|
|
key_bytes[0] = hc_swap32_S (out[0]);
|
|
|
|
|
key_bytes[1] = hc_swap32_S (out[1]);
|
|
|
|
|
key_bytes[2] = hc_swap32_S (out[2]);
|
|
|
|
@ -499,6 +501,7 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
|
|
|
|
|
// New c_1, join c_n with result of the decrypted c_n-1
|
|
|
|
|
int last_block_iter;
|
|
|
|
|
|
|
|
|
|
for (last_block_iter = 4; last_block_iter < 8; last_block_iter++)
|
|
|
|
|
{
|
|
|
|
|
if (last_word_position > last_block_iter + 4)
|
|
|
|
@ -530,8 +533,8 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// c_2 aka c_n which is now equal to the old c_n-1
|
|
|
|
|
enc_blocks[8] = esalt_bufs[digests_offset].enc_timestamp[4];
|
|
|
|
|
enc_blocks[9] = esalt_bufs[digests_offset].enc_timestamp[5];
|
|
|
|
|
enc_blocks[ 8] = esalt_bufs[digests_offset].enc_timestamp[4];
|
|
|
|
|
enc_blocks[ 9] = esalt_bufs[digests_offset].enc_timestamp[5];
|
|
|
|
|
enc_blocks[10] = esalt_bufs[digests_offset].enc_timestamp[6];
|
|
|
|
|
enc_blocks[11] = esalt_bufs[digests_offset].enc_timestamp[7];
|
|
|
|
|
|
|
|
|
@ -541,7 +544,7 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
aes_iv[2] = 0;
|
|
|
|
|
aes_iv[3] = 0;
|
|
|
|
|
|
|
|
|
|
aes256_decrypt_cbc (aes_cts_decrypt_ks, enc_blocks, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4);
|
|
|
|
|
aes256_decrypt_cbc (aes_cts_decrypt_ks, enc_blocks + 0, decrypted_block, aes_iv, s_td0, s_td1, s_td2, s_td3, s_td4);
|
|
|
|
|
|
|
|
|
|
w0[0] = hc_swap32_S (decrypted_block[0]);
|
|
|
|
|
w0[1] = hc_swap32_S (decrypted_block[1]);
|
|
|
|
@ -640,16 +643,17 @@ KERNEL_FQ void m19900_comp (KERN_ATTR_TMPS_ESALT (krb5pa_18_tmp_t, krb5pa_18_t))
|
|
|
|
|
|
|
|
|
|
sha1_hmac_update_64 (&sha1_hmac_ctx, w0, w1, w2, w3, enc_timestamp_len);
|
|
|
|
|
|
|
|
|
|
sha1_hmac_final(&sha1_hmac_ctx);
|
|
|
|
|
sha1_hmac_final (&sha1_hmac_ctx);
|
|
|
|
|
|
|
|
|
|
// Compare checksum
|
|
|
|
|
if(sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0]
|
|
|
|
|
&& sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1]
|
|
|
|
|
&& sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2])
|
|
|
|
|
if ((sha1_hmac_ctx.opad.h[0] == esalt_bufs[digests_offset].checksum[0])
|
|
|
|
|
&& (sha1_hmac_ctx.opad.h[1] == esalt_bufs[digests_offset].checksum[1])
|
|
|
|
|
&& (sha1_hmac_ctx.opad.h[2] == esalt_bufs[digests_offset].checksum[2]))
|
|
|
|
|
{
|
|
|
|
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
|
|
|
|
{
|
|
|
|
|
#define il_pos 0
|
|
|
|
|
|
|
|
|
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|