CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC24 MD5 - any luck?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
koofelek



Joined: 20 Apr 2012
Posts: 9

View user's profile Send private message

PIC24 MD5 - any luck?
PostPosted: Sun Apr 22, 2012 7:46 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Apr 23, 2012 2:04 am     Reply with quote

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

View user's profile Send private message

MD5 code is working in recent PCD versions
PostPosted: Sat Apr 28, 2012 7:22 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group