Score:1

How were the initial values for the chaining variables in MD5 determined?

bq flag

The original description of the MD5 algorithm initializes the values of A, B, C, and D to the following:

word A: 01 23 45 67
word B: 89 ab cd ef
word C: fe dc ba 98
word D: 76 54 32 10

How were the values determined and does it matter how they were chosen?

Score:2
ru flag

These are obtained by counting up in base 16 and then counting down in base 16.

Specifically we break the 4x 32-bit words into 32 4-bit pieces and treat each piece of 4-bits as a hex digit (equally you can think of this as breaking each byte in half). We set these first 16 of these hex digits to be the numbers 0, 1 ,2,... f and the next 16 of them to be f, e ,d , c,..., 0.

Incremental counting is considered a natural enough operation that these are not "magic numbers", but rather a good example of "nothing up my sleeve" numbers.

fgrieu avatar
ng flag
Addition: the security argument of a [Merkle-Damgård](https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction) hash such as MD5 or SHA-256 requires the Initialization Value of the first round to be a public value chosen non-maliciously. Hence the use of [nothing up my sleeve numbers](https://en.wikipedia.org/wiki/Nothing-up-my-sleeve_number), which are arbitrary enough (contrary to all-zero), but pre-existing or regular (preventing malicious choice).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.