MD4 is a message digest algorithm designed by Professor Ronald Rivest from MIT. This function creates small chunk of data as a hash value of any string that being computed. The size of hash is 128-bit. The internal of MD4 is consisted of 3 rounds of functions. Each function has 16 iterations. In total, MD4 has 48 steps to process data input into hash value.
MD4 is the predecessor of MD5, the hash function that still widely use for now on. MD4 has many weakness in terms of security. That was the reason why Professor Ronald Rivest proposed the next hash function which is MD5.
This post is merely to show how MD4 hash function was done on PIC18F4550. The way of implementation is basically easy and approximately near to MD5 implementation. I developed this code using MPLAB v8.0. The code has been tested against several test vector and works. The code is available under GNU Public License v3.0 with no charge and no warranty.
See those pictures below. I took them during simulation.
If you have question, don’t hesitate to leave some comments or contact me by email. I’ll try to answer your question regarding to this post.