View previous topic :: View next topic |
Author |
Message |
koofelek
Joined: 20 Apr 2012 Posts: 9
|
PIC24 MD5 - any luck? |
Posted: Sun Apr 22, 2012 7:46 pm |
|
|
Has anybody been lucky with getting MD5 code (from RFC) to work on PIC24 and PCD (v. 4.126d)? I've tried the RFC code but even for empty text the output is incorrect. I've also tried writing the wikipedia code and still nothing. I've also created a simple padded message of
80 00 00 ... (as if there was nothing but a padded bit) and tried putting it through all the rounds but no joy. Is PCD compiler still buggy? |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Apr 23, 2012 2:04 am |
|
|
I guess my comment from Aug 2010 still applies:
Quote: | One rule of thumb: Complex expressions, particularly involving int32 and pointers have still a high likelyhood to reveal PCD bugs. I'm willing to confirm that PCD is through, when it finally compiles the original RFC 1321 MD5 code without errors. |
http://www.ccsinfo.com/forum/viewtopic.php?t=43302
The RFC MD5 code is still in my collection of pending PCD bugs. I checked it the latest with PCD V4.118. But I would be seriously surprized if it's completely fixed with recent PCD versions.
I was nevertheless able to run MD5 with a previous PCD version (V4.08x) by unraveling some complex expressions. Unfortunately the fix was broken in a later PCD versions, that intended to remove some bugs and introduced others.
http://www.ccsinfo.com/forum/viewtopic.php?t=36359
Initially, there was a plan to use MD5 in a PIC24 application, but it wasn't implemented. So the urgent need to run MD5 with PCD vanished. But I'm convinced that it's basically possible to find a workaround for the MD5 code in recent PCD versions, with a certain risk of later failure.
Best regards,
Frank |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
MD5 code is working in recent PCD versions |
Posted: Sat Apr 28, 2012 7:22 am |
|
|
Hello,
as a short update, it seems like the RFC MD5 code is now working with PCD. The test bench gives correct hashes for the example strings.
Also my pending bugs list is melting down.
According to my previous comment PCD is getting ready. Very good!
Regards,
Frank |
|
|
|