Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: Is there a string which MD5 Sum is all 0xffffffffffff?. Parent comment
Imagine a simple algorithm that should hash a string to a number 0-3, but due to an extra condition it actually cannot produce "3", pseudocode:
``` Sum = sumOfAsciiCodeOfString(input); Rest = Sum % 4; Return Rest === 3 ? 2 : Rest; ```
Or due to a bug (replace `% 4` with `% 3`).
Can we prove that md5 doesn't suffer from such issues and it actually can output ffffffffffff or deaddeaddeaddead ?
There are no comments on this comment yet.
Imagine a simple algorithm that should hash a string to a number 0-3, but due to an extra condition it actually cannot produce "3", pseudocode:
``` Sum = sumOfAsciiCodeOfString(input); Rest = Sum % 4; Return Rest === 3 ? 2 : Rest; ```
Or due to a bug (replace `% 4` with `% 3`).
Can we prove that md5 doesn't suffer from such issues and it actually can output ffffffffffff or deaddeaddeaddead ?