• by daveguy on 5/14/2025, 4:25:03 PM

    SFTP protocol includes checksum hashing on each packet sent. So corruption from the network is very unlikely (as it is also encrypted).

    On the write to disk side, you are probably best off using ZFS or btrfs as the filesystem. These contain the option for similar integrity checks / error correction on write.

    What is your threat model? Are you concerned about adversarial changes to the data or just prevention of corruption? Either way an adversary would have to be deep in your system or mitm to get around the transfer protocol protections. And the transfer protocols used by SFTP should handle random network corruption.

  • by PaulHoule on 5/14/2025, 4:12:41 PM

    It could be expensive for the OS to update a secure hash for a file every time you write() to it.