OpenCL printf final digest value is wrong
#1
Hey guys, thanks for clicking my question. I the last days i started to dive into the hashcat source code. Currently i am looking a the m01400_a3-optimized.cl kernel. I wanted to debug it a bit by printing the final digest value that is calculated. However, the value that i print is not matching the final hash. The digest values are stored in u32x type, i tried multiple ways to format the value but it never seems to fit the hash.

Am i missing a step? Or how could i print the final hash before exiting the kernel? I would be verry thankful if you could help me out, i will attach a screenshot to show what i mean. My output starts at FINAL - Werte. I changed the kernel m01400_a3-optimized.cl at Line 291.

[Image: W0XUGp4.png]
Reply
#2
i found the solution to this. The optimized kernel stops at the second last step of sha256. The final step is to add the initial values of the start of the message shedule. If you add the contant value SHA256M_A to a (SHA256M_A + a) you will get the right value.
Reply