OpenCores
Issue List
Hash not work correctly as SHA3-512 #3
Open NULL opened this issue about 5 years ago
NULL commented about 5 years ago

This implementation is correctly work Keccak-512 hash function.

If you want to update it to SHA3-512, you need to fix values in padder1.v component as:

case (byte_num) 0: out = 64'h0600000000000000; 1: out = {in63:56, 56'h06000000000000}; 2: out = {in63:48, 48'h060000000000}; 3: out = {in63:40, 40'h0600000000}; 4: out = {in63:32, 32'h06000000}; 5: out = {in63:24, 24'h060000}; 6: out = {in63:16, 16'h0600}; 7: out = {in63:8, 8'h06}; endcase

WHY?

NULL commented over 4 years ago

Thank you!

Marty

zeese5 commented about 3 years ago

Thank you. Similarly, for the low throughput version,

padder1.v is modified as follows, to get sha3-512 results.

always @ (*)
  case (byte_num)
    0: out = 32'h6000000;
    1: out = {in[31:24], 24'h060000};
    2: out = {in[31:16], 16'h0600};
    3: out = {in[31:8],   8'h06};
  endcase
NULL commented about 3 years ago

Though after changing the values the hash result is getting incorrect..Can anybody help..

NULL commented almost 3 years ago

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.

NULL commented over 2 years ago

Hi..In the high throughput core two rounds are calculated at a time. I have tried to generate or calculate 3 rounds at a time which results in wrong hash result. Can anybody help me in this regard.

I have the made changes in the rconst2in1 module by generating 3 round constants at a time. In the round2in1 module I have fed the output ggx to the 3 rd stage to calculate 3rd round..

Please help me in this regard which will be very helpful to me..

Thank you.


Assignee
No one
Labels
Bug