diff --git a/src/modules/argon2_common.c b/src/modules/argon2_common.c index 6885bc177..a7bcdc96a 100644 --- a/src/modules/argon2_common.c +++ b/src/modules/argon2_common.c @@ -61,20 +61,17 @@ const char *argon2_module_extra_tuningdb_block (MAYBE_UNUSED const hashconfig_t const u64 available_mem = MIN (device_param->device_available_mem, (device_param->device_maxmem_alloc * 4)) - (fixed_mem + spill_mem); + const u32 kernel_accel_max = (device_param->device_host_unified_memory == true) ? (available_mem / 2) / size_per_accel : available_mem / size_per_accel; + u32 kernel_accel_new = device_processors; if (kernel_accel_user) { - kernel_accel_new = kernel_accel_user; + kernel_accel_new = MIN (kernel_accel_max, kernel_accel_user); } else { - if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) && (device_param->device_host_unified_memory == false)) - { - kernel_accel_new = available_mem / size_per_accel; - - kernel_accel_new = MIN (kernel_accel_new, 1024); // 1024 = max supported - } + kernel_accel_new = kernel_accel_max; } char *new_device_name = hcstrdup (device_param->device_name); diff --git a/tools/apfs2hashcat.py b/tools/apfs2hashcat.py old mode 100644 new mode 100755 diff --git a/tools/bitlocker2hashcat.py b/tools/bitlocker2hashcat.py old mode 100644 new mode 100755 diff --git a/tools/keybag2hashcat.py b/tools/keybag2hashcat.py old mode 100644 new mode 100755 diff --git a/tools/metamask2hashcat.py b/tools/metamask2hashcat.py old mode 100644 new mode 100755 diff --git a/tools/shiro1-to-hashcat.py b/tools/shiro1-to-hashcat.py old mode 100644 new mode 100755 diff --git a/tools/test_modules/m08300.pm b/tools/test_modules/m08300.pm index 879949fde..573efa407 100644 --- a/tools/test_modules/m08300.pm +++ b/tools/test_modules/m08300.pm @@ -14,18 +14,19 @@ use Net::DNS::SEC; # we need to restrict the pure password length for the test module to 63 bytes, # because we can't have any string (including the pass) of over 63 bytes without "." -# sub module_constraints { [[1, 256], [-1, -1], [1, 55], [-1, -1], [-1, -1]] } -sub module_constraints { [[1, 63], [-1, -1], [1, 55], [-1, -1], [-1, -1]] } +sub module_constraints { [[1, 63], [1, 63], [1, 32], [1, 24], [1, 44]] } sub get_random_dnssec_salt { + my $domain = shift; + my $salt_buf = ""; $salt_buf .= "."; - $salt_buf .= random_lowercase_string (8); + $salt_buf .= $domain; - $salt_buf .= ".net"; + #$salt_buf .= ".net"; $salt_buf .= ":"; @@ -40,19 +41,9 @@ sub module_generate_hash my $salt = shift; my $iter = shift // 1; - if (length $salt == 0) - { - if (int (rand (10)) == 0) - { - $salt = ":"; - } - else - { - $salt = get_random_dnssec_salt (); - } - } + my $combined_salt = get_random_dnssec_salt ($salt); - my ($domain, $salt_hex) = split (":", $salt); + my ($domain, $salt_hex) = split (":", $combined_salt); my $hashalg = Net::DNS::SEC->digtype ("SHA1"); diff --git a/tools/test_modules/m25000.pm b/tools/test_modules/m25000.pm index c62110472..002a29a22 100644 --- a/tools/test_modules/m25000.pm +++ b/tools/test_modules/m25000.pm @@ -12,7 +12,7 @@ use Digest::MD5 qw (md5 md5_hex); use Digest::SHA qw (sha1 sha1_hex); use Digest::HMAC qw (hmac_hex); -sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash { diff --git a/tools/test_modules/m25100.pm b/tools/test_modules/m25100.pm index 8256ac277..895134cf0 100644 --- a/tools/test_modules/m25100.pm +++ b/tools/test_modules/m25100.pm @@ -11,7 +11,7 @@ use warnings; use Digest::MD5 qw (md5 md5_hex); use Digest::HMAC qw (hmac_hex); -sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash { diff --git a/tools/test_modules/m25200.pm b/tools/test_modules/m25200.pm index 9d14fbf36..c649aa72e 100644 --- a/tools/test_modules/m25200.pm +++ b/tools/test_modules/m25200.pm @@ -11,7 +11,7 @@ use warnings; use Digest::SHA qw (sha1 sha1_hex); use Digest::HMAC qw (hmac_hex); -sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash {