6 ms·
An ideal hash function would have perfect avalanching; that is, changing one bit of the input would result in a 50% chance of each of the output bits being flip
by komaromy 11y ago
An ideal hash function would have perfect avalanching; that is, changing one bit of the input would result in a 50% chance of each of the output bits being flipped. While modern cryptographic hash functions have at least really good avalanching, definitely enough to resist a genetic search, I'm not sure that it's perfect. Home-brewed crap like what Petya was using is unlikely to be very good at it at all.
- Houshalter 11y agoThe first random number generator I learned about was super simple. Middle squares. You take a number, multiply it by itself, and take the middle bits. Because of the way the binary multiplication algorithm works, the bits are pretty thoroughly scrambled and not correlated to the input. I'm not sure if there aren't clever ways to undo it, but at least it would resist such a simple method like that.
- j2kun 11y agoSounds like Blum-Blum-Shub https://en.wikipedia.org/wiki/Blum_Blum_Shub https://en.wikipedia.org/wiki/Blum_Blum_Shub