Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I noticed that several hash algorithms, in this case MD5, defines some constants

ID: 653125 • Letter: I

Question

I noticed that several hash algorithms, in this case MD5, defines some constants.

MD5 defines 64 constant values (the shift count per round) which also gets expand (via sine) to a summand for a specific round. It is like a lookup table.

But I cannot see anything (no documentation, no implementation,...) that calls this table an substitution box (S-Box). But I saw some implementations that use a variable called "S" for this table. A hint?

So my question is: Is it valid to call this table an S-Box? Or is it only common to call this kind of table an S-Box when it's used into a real encryption/decryption?

Explanation / Answer

Not really; at least, not with the meaning we usually give to "S-box".

The "S" in "S-box" stands for Substitution; we take the data, and replace it with a value from the S-box (using the data as an index into the S-box). The classical (if not the original) example is the S-boxes within AES; at certain points within the cipher, we take each 8 bit value V from the block, and replace it with SBox[V].

We don't do anything like that in MD5; instead, the "S" constants stand for "Shift". They don't replace anything; instead, they modify how much shifting (rotating in more common parlance) we do per round.