OpenCores
Issue List
Clarity of code #1
Closed binupandian opened this issue over 9 years ago
binupandian commented over 9 years ago

I was simulating using TB to check for the functionality and the given inputs and the hash value(I put the inputs through online md5 generating sites) doesn't seem to match. Some comments on the test bench would be of help.

JohnLeitch commented over 9 years ago

Hi,

Apologies for the confusion; when I get time, I'll document the test bench. In the meantime, I'll explain the likely causes of your problems here. First, the message input via must be padded. Md5Core will not perform any padding. Second, after completing its 4 rounds, Md5Core returns the raw A, B, C, and D. If you want to get the actual MD5, add 0x67452301, 0xefcdab89, 0x98badcfe, and 0x10325476 respectively. This was an optimization that reduces the amount of work necessary to invert single chunk digests.

At a later date, I will document and update the code as necessary.

John

JohnLeitch was assigned over 9 years ago
binupandian commented over 9 years ago

Hi,

Thanks for the reply. I sorted the issue out. I think I was a bit hasty in concluding there was an issue without going through the source code properly.

Regards, Binupandian S.

JohnLeitch closed this over 7 years ago

Assignee
JohnLeitch
Labels
Request