mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
move to 27400, fix unit test
This commit is contained in:
parent
0b19c4a688
commit
a43e239db8
@ -72,7 +72,7 @@ DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipa
|
||||
sha1_transform_vector (w0, w1, w2, w3, digest);
|
||||
}
|
||||
|
||||
KERNEL_FQ void m26700_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
KERNEL_FQ void m27400_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@ -144,7 +144,7 @@ KERNEL_FQ void m26700_init (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_
|
||||
}
|
||||
}
|
||||
|
||||
KERNEL_FQ void m26700_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
KERNEL_FQ void m27400_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
{
|
||||
const u64 gid = get_global_id (0);
|
||||
|
||||
@ -229,7 +229,7 @@ KERNEL_FQ void m26700_loop (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_
|
||||
}
|
||||
}
|
||||
|
||||
KERNEL_FQ void m26700_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
KERNEL_FQ void m27400_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, vmware_vmx_t))
|
||||
{
|
||||
/**
|
||||
* base
|
@ -18,7 +18,7 @@ static const u32 DGST_POS3 = 3;
|
||||
static const u32 DGST_SIZE = DGST_SIZE_4_4;
|
||||
static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE;
|
||||
static const char *HASH_NAME = "VMware VMX (PBKDF2-HMAC-SHA1 + AES-256-CBC)";
|
||||
static const u64 KERN_TYPE = 26700;
|
||||
static const u64 KERN_TYPE = 27400;
|
||||
static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
|
||||
| OPTI_TYPE_SLOW_HASH_SIMD_LOOP;
|
||||
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE
|
@ -57,20 +57,19 @@ sub module_generate_hash
|
||||
|
||||
my $hash = "";
|
||||
|
||||
my $data = 'type=key:cipher=';
|
||||
|
||||
my $encrypted = unpack ("H*", $cipher->encrypt ($data));
|
||||
|
||||
if (defined $ct_str)
|
||||
{
|
||||
my $ct_bin = pack ("H*", $ct_str);
|
||||
my $iv_bin = substr ($ct_bin, 0, 16);
|
||||
my $encrypted = substr ($ct_bin, 16);
|
||||
|
||||
$hash = sprintf ("\$vmx\$0\$%s\$%s\$%s%s", $iterations, unpack ("H*", $salt), unpack ("H*", $iv_bin), unpack ("H*", $encrypted));
|
||||
$hash = sprintf ("\$vmx\$0\$%s\$%s\$%s%s", $iterations, unpack ("H*", $salt), unpack ("H*", $iv_bin), substr ($encrypted, 0, 32));
|
||||
}
|
||||
else
|
||||
{
|
||||
my $data = 'type=key:cipher=';
|
||||
|
||||
my $encrypted = unpack ("H*", $cipher->encrypt ($data));
|
||||
|
||||
$hash = sprintf ("\$vmx\$0\$%s\$%s\$%s%s", $iterations, unpack ("H*", $salt), unpack ("H*", $iv), substr ($encrypted, 0, 32));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user