Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Test vectors for ripemd160 hashing algorithm

Status
Not open for further replies.

seeker_123

Member level 2
Joined
Apr 8, 2013
Messages
53
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Bangalore
Activity points
1,731
Hi,
I am trying to test Ripemd160 hashing algorithm.
I have checked my results with online test vectors and ripemd hash generators.

But my outputs are not matching :sad: . So I am trying to debug it:fight:

So if I can have test vectors which gives output for each round then that will be helpful.


thanks and regards
 

Why not just get the source code for it and generate your own vectors for each round?

Searching for "Ripemd160 code" results in a number of examples, ie. Dr.Dobb's has a ANSI C implementation.
 

Why not just get the source code for it and generate your own vectors for each round?

Searching for "Ripemd160 code" results in a number of examples, ie. Dr.Dobb's has a ANSI C implementation.

thanks ads-ee

I tried using Dr.Dobb's c implementation which is given at https://homes.esat.kuleuven.be/~bosselae/ripemd160.html

But I am not sure that implementation is correct. Because i tried giving some inputs for c code. But final hash results are not matching with expected standard results. Like i have given "a" as input but for which c code giving hash value as 508a6ccc545b32641fe7311048defe7cf599ada3. but the expected ripemd hash value for "a" is 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe. so is that c implementation is correct?????
 

I suggest contacting the author of the model - he would have better knowledge of it's implementation.
 

Be wary of MSB and LSB being swapped. One of the great headaches of vhdl!

Also you talk about character (ascii "a") or (hex "a") as an input...which is it. Have you tried your model with both?
 

I suggest contacting the author of the model - he would have better knowledge of it's implementation.

Ok. I will do that sir. thank you

- - - Updated - - -

Be wary of MSB and LSB being swapped. One of the great headaches of vhdl!

yes I am taking care of that. But currently I am trying to get round wise output for which I am using c implementation of ripemd 160 which I have mentioned earlier.

Also you talk about character (ascii "a") or (hex "a") as an input...which is it. Have you tried your model with both?

I am directly giving message through file which has message as it is in character form "a". I think that is expected one.

please correct me if I am wrong.
 

Just a thought, perhaps your issue is due to end of line interpretation differences?

- - - Updated - - -

The code from the url you posted is different, than the code on the DrDobb's , but they are both Version 1.0, but with different dates?
 

Just a thought, perhaps your issue is due to end of line interpretation differences?

- - - Updated - - -

The code from the url you posted is different, than the code on the DrDobb's , but they are both Version 1.0, but with different dates?

I am taking care of end of line also precisely.

Yes there is bit change from both sources. I tried with codes from dr Dobbs website. But results are same.
is there anything special to take care about while running these codes? (like 32 bit or 64 bit os version) Because its hard to believe that these codes are incorrect.


Also while running code we can enable internal test suite to run where the same character "a" as message is there. For that also results are same which are incorrect.

Please guide me if I am going wrong.

Thanks
 
Last edited:

Just a thought, perhaps your issue is due to end of line interpretation differences?

- - - Updated - - -

The code from the url you posted is different, than the code on the DrDobb's , but they are both Version 1.0, but with different dates?

Hello ads see
Those codes are working fine with me now. Needed few changes before running on my machine like declaration of dword has to be changed from unsigned long to unsigned int. and they are giving exact answers as expected.

I think now I can modify these codes for each round outputs.

Thanks again to all
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top