MD5 implementation for microcontroller

If you are looking for a C implementation, the Microchip TCP/IP stack has an implementation of MD5 in the Hashes.c file.


Here's the MD5 implementation from the EtherNut (AVR based)


I would stick with a known reputable implementation of MD5, and stay away from libraries you find from 3rd-party vendors. The original RFC 1321 which described MD5 has a sample C implementation.

Reminder: the known weaknesses for MD5 are collision attacks, and not preimage attacks, so it is suitable for some cryptographic applications but not others. If you don't know the difference you shouldn't be using it, but don't discard it altogether. See http://www.vpnc.org/hash.html.