Hi, Can anybody send me the code for SHA 3-512?. The code available here is not generating the correct hash code. I have compared the hash results with matlab code and some online websites but the output is not matching. I have tried the two ways provided by others in this Issue List but those suggestions not working. Kindly someone help to get correct hash code.
Thank you in advance.
The SHA3-512 works correctly if you follow the solution discussed in the other issue. When you compare with matlab result, there is one important thing you need to pay attention and accordingly adjust the code:
Memory layout of string in software vs. verilog are different. In software, "abcd", "a" is stored in low memory address. Instead when you assign a string to variable (as done in the provided testbench) in verilog, "abcd", "d" is stored in low memory address.
So, carefully review endianess of testbench, and compare it with software-generated result, and then you will find the solution.