How to implement and verify checksums on Linux