SHA512_HMAC - 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: SHA512_HMAC (/thread-9690.html) |
SHA512_HMAC - ruro - 12-05-2020 Good day ! I am attempting to write a module where I derive a key from 2048 SHA512_HMAC iterations, however I cannot seem to get the hash correct after the initial hash. This is what I am trying Code: sha512_hmac_ctx_t ctx0; As I mentioned, the initial hash at ctx0 is correct, however just after one iteration in the loop, the hash is wrong. I know the hash is wrong because I have a working implementation in Golang. The same issue I have with normal sha512 as well, where I can get the first hash as expected, but then it just works unexpectedly. Would appreciate any help Thanks ! RE: SHA512_HMAC - ruro - 12-06-2020 Found the issue seems like byte order is different for the output my quick'n'dirty solution was to convert to uchar array after every iteration Code: for (int i=0; i<8; i++) { would still be interested to know if am mis-using the API, and if there are better fixes. |