concepts

checksums

The unix command, cksum, can be used to verify that a file's contents have been preserved:

    $ echo foo > /tmp/test.txt

    $ cksum /tmp/test.txt
    3915528286 4 /tmp/test.txt

    $ echo bar > /tmp/test.txt

    $ cksum /tmp/test.txt
    3848730072 4 /tmp/test.txt
	

See how the checksum is different after we modified the file's contents?

The idea of generating a fingerprint for a given string of bytes has been taken on by cryptographers. They have made ways of getting checksums that would be are hard to reproduce with different file contents, calling the methods "one-way hash functions". What does that mean to us?

It means that if integrit finds the one-way hash function checksum of a file using a secure hash function like SHA-1, then an attacker would have a really, really hard time replacing that file without us noticing.

The attacker would have to create, on average, two to the power of 159 different files and calculate their checksums before guessing a file that would give the same checksum as the one in our database. That would mean doing 730750818665451459101842416358141509827966271488 different guesses and tests. Most cryptographers agree that no one can do that many guesses and tests, not by a long shot.

SourceForge Logo


integrit homepage
integrit project page