What math do I need to know for MD5?

738 Views Asked by At

This could fit into a lot of areas of SO but I feel like mathematics will know best.

What area of math is used for something like an MD5 or SHA algorithm?

Is there a mathematical equation/skeleton for something like it?

1

There are 1 best solutions below

2
On BEST ANSWER

While I do not know what you mean by "mathematical equation/skeleton," to understand how MD5 is implemented, all you need to know is high school algebra, bit vector algebra (e.g., if A and B are two size $n$ bit vectors, what A XOR B, A AND B, etc. mean), plus the ability to read a simple computer program. Look at the sample code in the English-language Wikipedia entry for MD5.

When people talk about these algorithms, they often use the language of fields, vector spaces, and the like, from undergraduate algebra. They also use elementary probability reasoning.

Where prerequisites get hairier is for algorithms that use primes, factoring, etc., or, worse yet, elliptic curves, but things like MD5 are relatively simple.