Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how hard would it be to detect which single bit was flipped? As ryao noted, in JPEGs it's immediately obvious where the image was corrupted - by visual inspection. Similar for videos, you only need to inspect the data following a single I-frame. Even for bitmap/text files, you could just scan the entire file, try flipping one bit at a time, and compare the result with the checksum.

Unlike e.g. KDFs, checksums are built to be performant, so that verifying one is a relatively fast operation. The Blake family is about 8 cycles per byte[1], I guess a modern CPU could do [napkin math] some 500-1000 MB per second? Perhaps I'm off by an order of magnitude or two, but if the file in question is precious enough, maybe that's worth a shot?

[1]: https://en.wikipedia.org/wiki/BLAKE_(hash_function)



What if you had two bit flips?


That would be a terrible coincidence :,) however improbable, still possible.

Even proper high-end server-grade ECC ram guarantees "only" SECDED (single error correction, double error detection).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: