Hi!
I heard someone was working with implementing Fletcher checksums in
softraid.
Do you know any updates on this?
Fletcher checksums are how OpenBSD would guarantee that the data you
read from disk actually has integrity. What makes Fletcher checksums
different from traditional checksumming e.g. CRC is that CRC only
guarantees that a sector/block of data read has integrity within itself,
while Fletcher also guarantees that the data read actually belongs in
the place on the disk that it was read from.
The latter is of particular importance when having sensitive information
on disks that have sector mapping implemented in them (
https://en.wikipedia.org/wiki/Flash_memory_controller#Flash_Translation_Layer_.28FTL.29_and_Mapping
), like all SSD:s (and even magnet disks??) have, which can break down.
Also a disk could write to the wrong place because of firmware bugs or
because it's getting worn out. The possible ways an SSD can break down
are endless.
For this reason, with ordinary filesystems, fread() could give you just
about any data from anywhere on the disk, while a Fletcher-based disk
would give you a read error immediately on failure, so you're prompted
to use backups, instead of going into processing broken information,
which could have unlimitedly bad consequences (crash programs,
compromise information, etc.).
So it's really like a night and day difference.
https://en.wikipedia.org/wiki/Fletcher%27s_checksum
Thanks!
Tinker