hashcat Forum
Works with OpenCL but not CUDA - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Developer (https://hashcat.net/forum/forum-39.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-40.html)
+--- Thread: Works with OpenCL but not CUDA (/thread-8590.html)

Works with OpenCL but not CUDA - ecos - 08-24-2019

Guys, I have a custom hash module that works happily with the OpenCL API, but fails miserably with the CUDA API. Specifically, the CL compilation is ok, but the self-test fails (and indeed, it fails to recover any hashes). Other formats work fine, so it is not a driver problem.

I know what I have to do, but before I start debugging, I was wondering if there is an easy way out - tips of where to start looking, common problems you know of that might make it easier Smile

Running on v5.1.0-1397-g7f4df9e


RE: Works with OpenCL but not CUDA - philsmd - 08-24-2019

unfortunately, it could be anything here.

maybe even your OpenCL kernel is not perfectly correct and it is only a matter of which vector size etc is being used to fail or succeed.

Without seeing the code it's very difficult to say.

It would also make sense to write a test modules tools/test_modules/*.pm to test all attack modes, vector widths, single vs multi hash etc...

There are some functions like make_u32x () vs the cast to it with: (u32x) x , that we had to introduce when starting to support CUDA (again). so it might be something very easy to fix and cases like this would explain that it only happens with CUDA.
please also always make sure to either "make clean" or remove the kernels/ (and maybe even the $HOME/.nv directory) to get rid of cached kernels etc. otherwise you are testing the old code instead of the changed kernel code.

RE: Works with OpenCL but not CUDA - ecos - 08-26-2019

Thanks Phil, I'll start digging. The algo is RACF KDFAES and I'll provide the code for hashcat once it works on both OpenCL and CUDA ... as to avoid the embarrassing moments ...