liveBook · Manning

Hash value

As explained in Fundamentals of Cybersecurity

A hash value is the fixed-length output produced by applying a hash function to input data.

A hash value, also called a digest, is the fixed-length output of a cryptographic hash function. The function can take data of any size, but it works one way: the original data cannot be recovered from the hash. Unlike encryption, hashing uses no key and does not keep data confidential. section 14.2.4

Checking a download

A website publishes a file’s SHA-256 hash. After downloading the file, you use a hashing tool to calculate its hash and compare the two values. A match helps confirm that the file was not changed or corrupted during transfer. section 14.2.4

Hash values also help protect stored passwords. A system stores a password’s digest rather than the plaintext password, then hashes a login attempt to check for a match. This does not make a weak password safe: someone with the stored digest can hash likely guesses and look for a match. Salting helps defend against precomputed rainbow-table attacks. section 12.3.3

USE
PUROPOSE
SCENARIO
Message
Verifying message integrity during transmission.
Alice sends a message to Bob with a hash. Bob calculates the hash of the received message to ensure it matches.
Files
Verifying file integrity, especially during transfers.
A software file is downloaded with its hash. The user checks the hash after download to ensure the file wasn’t altered.
Records
Ensuring integrity of records in databases or logs.
A database record (e.g., customer info) is hashed. If the record is changed, the new hash will not match the original.

Compare how the same hash-checking idea applies to messages in transit, downloaded files, and database or log records. section 14.2.4

A matching hash checks for changes, but hashing alone does not establish who sent a document. A digital signature combines its hash with asymmetric encryption so a recipient can check both the document’s integrity and the signature. section 14.2.4 section 14.2.5

How Fundamentals of Cybersecurity covers it

How deep it goes
Defines fixed-length, one-way digests and walks through comparisons, without developing hash-function internals.
Examples
Illustrates hashes with a SHA-256 file download, stored password digests, and checks of messages and records.
What it assumes
Introduces hash functions, digests, and one-way processing through direct definitions.
What you can do after
Apply it via a hashing tool to compare a downloaded file’s hash with the website’s published value.
How it connects
Connects hash values to password hashing, data integrity, encryption, and digital signatures.

Also explained in

Compare how 9 books explain hash value →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fundamentals of Cybersecurity. The section links point to the parts of the book it draws on.