Talk:MD5

Latest comment: 5 months ago by 2402:9D80:22E:5559:2819:687A:A144:B7CD in topic Pseudocode OK ?

Pseudocode OK ? edit

I tried to implement the pseudocode but I couldn't reproduce the results. (EDITED) Now I succeeded and share what might be ambiguous:

  • append "1" bit to messsage means that you actually append a byte 128 if the message was/is cut into bytes.
  • append the original length in bits mod 2^64: It means that the last (512 - 448) bit or 64 - 56 = 8 byte of the padded message are filled with that number, ((number of bytes in original text) MOD 2^61) * 8, padded to length of 8 byte, little endian.
    E.g., for "The quick (...) lazy dog" (length = 43 byte = 344 bit), this would be (88, 1, 0, 0, 0, 0, 0, 0) for 1*256 + 88 = 344.
    Thus, the padded message would be, written in bytes: [84 (='T'), 104(='h'), 101(='e'), ..., 100(='d'), 111, (='o'), 103(='g'), 128, 0 ... 0, 81, 1, 0, 0, 0, 0, 0, 0].
  • Ignore the instruction "Be wary of the below definition...". I assume it means "take into account", but how could we anyway anticipate at that point assignments that occur at a later moment?! Just ignore.
  • The "digest": a0 append ... append d0 // (output is in little endian):
    If, in the end, a0 = 1, b0 = 2, c0 = 3, d0 = 4, the output should be "01000000020000000300000004000000"!
  • Most of it all, the 16 32-bit words M[j] correspond each to 4 consecutive bytes of the message scrambled by reading the chunk in little endian!
    So for the above phrase, M[0] = ' '<<24 + 'e'<<16 + 'h'<<8 + 'T', M[1] = 'c'<<24 + 'i'<<16 + 'u'<<8 + 'q', etc. (Mnemonic: little endian is the most counter-intuitive and inconsistent convention you could think of. To make it worse, it is the opposite of what its name suggests! The 'litte' bit (LSB) is not at the end (as in "endian"), but at the beginning - speaking of the least significant byte. The least and most significant bits aren't on either side, but somewhere inside! Congrats on your choice, guys!)
Thanks if others can confirm any part of this interpretation.MFH:Talk 19:09, 2 October 2020 (UTC)Reply


I followed your comment up until this part
> 0 ... 0, 81, 1, 0, 0, 0, 0, 0, 0]
How did the 88, 1 become a 81, 1? 94.196.94.19 (talk) 22:19, 9 October 2022 (UTC)Reply
d41d8cd98f00b204e9800998ecf8427e 112.197.120.140 (talk) 18:44, 5 September 2023 (UTC)Reply
Ok 2402:9D80:22E:5559:2819:687A:A144:B7CD (talk) 21:11, 19 November 2023 (UTC)Reply

Weakness of MD5 demonstrated once again in a spectacular manner. edit

Hackers behind the highly stealthy, native Apple iOS malware "Triangulation" used forty MD5 hashes to identify various "p0wned" mailboxes held by them, but security researchers managed to crack most of the checksums and retrieved 36 full e-mail addresses, as seen here: https://securelist.com/triangulation-validators-modules/110847/ 77.234.84.8 (talk) 13:13, 25 October 2023 (UTC)Reply