Jump to content

MD5 algorithm as basic as possible?

So, I'm a bit curious as to how one were to manually calculate an MD5 hash but searching around the internet I found nothing but complex examples and implementations.

Would it be possible for someone to explain in detail the actual mathematics of how the hash is generated at the most basic level?

 

I'm not intending to use it for any coding project, but just for the sake of fun. At the very most I'd try and calculate the checksums of simple phrases and whatnot as a fun project in my free time.

 

A step-by-step of what an MD5 generator does would be greatly appreciated if it's not too complexly described.

If I were to use the example phrase "Pie" (without the quotes), the MD5 generator gave me the checksum "996589a1a7e9604b0dbd63858a59b247". How would one, step-by-step, calculate this manually with just pen and paper (or a notepad document)? Could it be compared to the steps of solving a mathematical equation?

------------------------ Liquidfox R3 ------------------------

Fractal Design Meshify 2 Compact – Corsair AX860i – Asus ROG Crosshair VIII Dark Hero – AMD Ryzen 7 5900X – Nvidia GTX1070 Founders

 

Link to comment
https://linustechtips.com/topic/68703-md5-algorithm-as-basic-as-possible/
Share on other sites

Link to post
Share on other sites

Have you checked Wikipedia's article on it?

I can't claim to understand every single last thing since I haven't looked at it in enough

detail, but all the info you'd need is in there, in, as you say, the most basic level. I

especially recommend the bit where the algorithm is implemented in pseudocode.

As for pen and paper, it's not impossible, but you're going to be busy for a long time

doing that. But yes, in essence it is simply an algorithm you could work through like any

other mathematical problem if you felt so inclined, the question is simply how long it

would take you.

EDIT:

I'm neither a mathematician nor a cryptographer, so I don't consider myself an authoritative

source on these matters. The above conclusions are primarily based on my experiences in

using hash algorithms in practice and what I've read about them in various places. Just as

a side note.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to post
Share on other sites

Have you checked Wikipedia's article on it?

I can't claim to understand every single last thing since I haven't looked at it in enough

detail, but all the info you'd need is in there, in, as you say, the most basic level. I

especially recommend the bit where the algorithm is implemented in pseudocode.

As for pen and paper, it's not impossible, but you're going to be busy for a long time

doing that. But yes, in essence it is simply an algorithm you could work through like any

other mathematical problem if you felt so inclined, the question is simply how long it

would take you.

Wiki article was too complex for me really.

I know it'll take time, hence I'd call it a project to work on in my free time. But I'd like to have it explained in a way so I can understand so I know how to actually do it!

------------------------ Liquidfox R3 ------------------------

Fractal Design Meshify 2 Compact – Corsair AX860i – Asus ROG Crosshair VIII Dark Hero – AMD Ryzen 7 5900X – Nvidia GTX1070 Founders

 

Link to post
Share on other sites

Wiki article was too complex for me really.

I know it'll take time, hence I'd call it a project to work on in my free time. But I'd like to have it explained in a way so I can understand so I know how to actually do it!

 

I read through the wiki Algorithm section and pseudo code and I think I understand the MD5.  So is there anywhere in particular that you don't understand (for the pseudo code).  I can help with explaining parts of it (the Wiki pseudo code fairly easy to read, so I need help to know where you are getting stuck on...whether it is on the math, or some little bit of the specs)

0b10111010 10101101 11110000 00001101

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×