Since I had a software method I wanted to test, I have created this as a simple windows utility, the "all-zero hash calculator" (am sure I should have thought of a snappier name…) which will provide the "known result" for any specified length of bytes, and included acceleration tables so that the result can be calculated in less than a second for any length up to 2TB. I have made this freely available
here. Any feedback welcome as usual, and hope some people find it useful. Phil.
Neat little program, thanks.
I stumbled upon another answer. I don't know if it is the method my teacher referenced, but linux/unix has a 'sum' program that works as well. I haven't tested it on a drive, but in a newly created zero filled file, it returns zero.
Neat little program, thanks.
Glad you liked it, thanks for the comment.
I stumbled upon another answer. I don't know if it is the method my teacher referenced, but linux/unix has a 'sum' program that works as well. I haven't tested it on a drive, but in a newly created zero filled file, it returns zero.
My understanding is that unix 'sum' is a essentially a 16-bit checksum with slightly non-standard calculation method; As you say, all-zero input data will generate a zero result. Though this suffers from the same weaknesses as other CRCs (no implicit proof of data length processed, non-guarantee of zero data, easily mathematically manipulatable, too short) it could be used as a simple initial check.
Phil.