Protecting data integrity
Hash algorithms are deterministic, unstable cryptographic functions that produce a short value, or a hash, given a set of data. Unstable means that a small change in the input produces a very large change in the output. This makes it very difficult to reverse the calculation; such that given a hash, it is very difficult to find a dataset that generates that same hash. Doing so is called finding a collision. SHA is a set of well-known hash algorithms.
Hashes can be used to create signatures or maintain the integrity of a data item, such as a file. Since the hash is small, it's easy to transmit and store. Computing the hash multiple times gives the same value, unless something has been changed in the file. The hash, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access