1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-25 09:28:20 +00:00

Updated algorithm used to automatically select an ideal --scrypt-tmto value for NV

This commit is contained in:
jsteube 2015-12-23 11:24:41 +01:00
parent 3ab31807d4
commit 19c77034a6

View File

@ -12960,8 +12960,23 @@ int main (int argc, char **argv)
if ((hash_mode == 8900) || (hash_mode == 9300))
{
#define SHADER_PER_MP 8
#define WAVEFRONTS 64
uint m = 0;
if (vendor_id == VENDOR_ID_NV)
{
#define NV_SHADER_PER_MP 32
#define NV_WARPS 32
m = NV_SHADER_PER_MP * NV_WARPS;
}
else if (vendor_id == VENDOR_ID_AMD)
{
#define AMD_SHADER_PER_MP 8
#define AMD_WAVEFRONTS 64
m = AMD_SHADER_PER_MP * AMD_WAVEFRONTS;
}
uint tmto_start = 2;
uint tmto_stop = 1024;
@ -12980,14 +12995,15 @@ int main (int argc, char **argv)
size_scryptV /= tmto;
size_scryptV *= gpu_processors * WAVEFRONTS * SHADER_PER_MP;
size_scryptV *= gpu_processors * m;
if (size_scryptV > (device_param->gpu_maxmem_alloc / 2)) continue;
// if (size_scryptV > (device_param->gpu_maxmem_alloc / 2)) continue;
if (size_scryptV > device_param->gpu_maxmem_alloc) continue;
for (uint salts_pos = 0; salts_pos < data.salts_cnt; salts_pos++)
{
data.salts_buf[salts_pos].scrypt_tmto = tmto;
data.salts_buf[salts_pos].scrypt_phy = gpu_processors * WAVEFRONTS * SHADER_PER_MP;
data.salts_buf[salts_pos].scrypt_phy = gpu_processors * m;
}
break;