What is a cryptographic hash function? It is a mathematical algorithm that converts digital input, such as a message or file, into a fixed-length value called a hash or message digest. Secure designs make certain attacks computationally difficult even though anyone with the same input can calculate the same output. If you are searching for cryptographic hash function meaning, SHA-256 explained, hashing versus encryption, file checksum verification, hash collisions, digital signatures or secure password storage, the crucial point is that a digest is a compact mathematical fingerprint, not a reversible secret message.
Did you know that changing just one byte in a document will generally change the digest produced by a modern cryptographic hash function? That sensitivity helps detect accidental or malicious alterations. But a matching digest does not prove who supplied the document unless the expected digest came from a trustworthy source. And every finite-length hashing scheme inevitably has mathematical collisions because its possible inputs outnumber its possible outputs. Security depends on how hard relevant attacks are, not on pretending collisions cannot exist.
This complete guide explains hashing from first principles: bits and bytes, deterministic processing, output length, preimage and collision resistance, SHA-2 and SHA-3, verification workflows, keyed hashes, signatures, password handling and practical limitations. It includes checked numerical examples, a deliberately insecure toy function, mistakes to avoid and links to official NIST standards. The goal is to let students and general readers understand what a hash can establish, what it cannot establish and how sound computing systems use it responsibly.
The short answer: a fixed-size digest of digital input
A cryptographic hash function takes a digital message and produces a digest with a defined output length for the chosen algorithm. For example, SHA-256 produces 256 bits regardless of whether its permitted input is a short word or a much larger document. The same input under the same algorithm gives the same digest. If the input differs, the resulting digest is very likely different, although the mathematics cannot guarantee uniqueness over all possible inputs.
The function is designed to be efficient to compute but resistant to selected forms of manipulation or inversion. Unlike a secret cipher, it does not require a decryption key because its ordinary purpose is not to recover the input. That makes hashing useful for integrity checks and as a component in other cryptographic constructions. The words cryptographic and hash must be used together carefully: many fast ordinary computer hash functions are not intended to resist deliberate attacks.
Bits and bytes are the real inputs
Computers represent text, images, programs and other data as sequences of bits. Eight bits make one byte, which can represent a value between zero and 255. A character written on a screen is encoded into bytes according to a character encoding such as UTF-8. A hash function operates on this digital representation, not directly on what a human thinks a sentence means. Even a visually small change may change the bytes being processed.
For example, two documents that appear identical in a preview can differ because of line-ending formats, spaces, invisible characters or file metadata. If you compute a digest from the exact full file, those differences matter. This is why a hash mismatch does not always prove malicious tampering: a file may simply have been saved, converted or re-exported differently. Before drawing conclusions, identify precisely which bytes were supposed to remain unchanged.
A digest is not a summary of meaning
A word processor can summarise a document by extracting its main ideas, but a cryptographic hash does nothing of the kind. It generates a numerical output from the exact input bits. Two documents discussing the same subject can have unrelated digests. An added comma, a changed line ending or a replaced photograph changes the input, even when a reader considers the documents equivalent in meaning.
Conversely, two different messages can theoretically share a digest, called a collision. A good cryptographic construction makes finding such pairs prohibitively difficult under its security assumptions. It does not recognise that one document is ‘about science’ and another is ‘about art’. The phrase digital fingerprint is an analogy for identifying exact digital content, not a claim that the digest understands or describes its subject.
Determinism makes repeatable verification possible
A hash function is deterministic: given the same input and the same algorithm, it must produce the same output. This allows independent computers to calculate a digest and compare their results. If a publisher announces a trustworthy expected digest for a downloaded archive, a recipient can compute the digest of the received file and compare the values. Agreement supports the conclusion that the file matches the expected hashed bytes, subject to the security of the algorithm and the authenticity of the reference.
Determinism differs from randomness. A cryptographic digest may look random to a human, but it is fully determined by the input. A random password generator and a hash function perform different jobs. The design goal is to make the output difficult for attackers to predict or manipulate in specified ways without turning the algorithm itself into a secret. Publicly documented algorithms allow independent review, repeatability and interoperability.
Why fixed output length matters
A hash output is usually much shorter than a large file. If a ten-megabyte document is hashed with SHA-256, the digest is still 256 bits long. The fixed length makes it convenient to record and compare digests. Systems can use such digests as compact references to content without storing a second full copy solely for comparison. However, compactness does not mean the digest retains enough information to reconstruct the entire source file.
Mathematically, a function mapping a vast set of possible messages into a finite set of outputs must assign the same output to more than one possible input. This is the pigeonhole principle. The security promise is therefore about resistance to finding useful collisions, not perfect uniqueness. A hash function’s output size influences the scale of possible attacks, while algorithm design determines whether there are shortcuts beyond brute-force guessing.
A checked example: SHA-256 in hexadecimal
SHA-256 produces 256 output bits. Hexadecimal notation uses sixteen symbols, each representing four bits because sixteen equals two to the fourth power. Divide 256 by four and the result is 64. Therefore a standard SHA-256 digest displayed as lowercase or uppercase hexadecimal has 64 characters, excluding any label or punctuation added by the display program. The representation is longer than 32 because 32 counts bytes, not hexadecimal digits.
A 256-bit output has two to the power of 256 possible bit patterns, an unimaginably large number. Yet this does not mean a human password drawn from a short list suddenly gains 256 bits of unpredictability. The digest cannot create entropy that the input did not contain. An attacker may guess weak candidate passwords and hash them. Security analyses must distinguish output length, algorithm resistance and uncertainty about the original secret.
A deliberately insecure toy hash
Imagine a made-up function for uppercase English letters: convert each letter to its ASCII number, add the numbers and keep the last decimal digit. For the input AB, ASCII A is 65 and B is 66, so 65 plus 66 equals 131, giving a toy hash of 1. For BA, the same two values add to 131 and produce the same output. These different inputs collide immediately. The toy function is useful for learning arithmetic but completely unsuitable for security.
It also demonstrates why ordinary summing is not enough. A malicious person can rearrange characters without changing the sum, and there are only ten possible outputs. Real cryptographic hash functions mix information from input bits using carefully designed operations and multiple steps, making obvious shortcuts far harder. The lesson is not that all collisions are easy; it is that a small deterministic output and a badly designed transformation offer no meaningful resistance to manipulation.
Why small changes usually produce very different outputs
Modern cryptographic hash functions are designed so that changing an input bit tends to alter many output bits in ways that are difficult to predict. This behaviour is often discussed as an avalanche effect. It makes a forged file difficult to construct by simple trial-and-error adjustments, assuming the underlying design has been properly analysed. The property is statistical rather than a promise that every change must flip exactly half the bits.
The result can surprise students: a change from a period to a comma might give an apparently unrelated digest, whereas a much larger rewrite also produces a different digest. The two outputs do not show which edit was larger. A cryptographic hash is not an edit-distance meter, and digest similarity is not a measure of textual similarity. If you need to compare meanings or locate changed lines, use a different tool built for that purpose.
Preimage resistance: do not reverse the fingerprint
Preimage resistance means that given a target digest, it should be computationally infeasible to find an input that hashes to that digest, within the intended threat model and security strength. This is different from a mathematical proof that recovery is impossible. If the original input came from a tiny set of candidates, an attacker may still test those candidates directly and find the right one.
Suppose a user chooses a password from four popular words and the attacker knows the exact scheme. The attacker may hash each candidate until one matches, regardless of how impressive the digest length looks. That weakness comes from predictable input and insufficient password protection, not from reversing a mathematically strong function in a general sense. Security engineering therefore evaluates the entire workflow rather than assuming the adjective one-way solves all problems.
Second-preimage resistance: protect a particular message
Second-preimage resistance asks a different question: if an attacker is given a specific existing message, can they find another message with the same digest? Imagine a legitimate software file whose digest is publicly recorded. An adversary would like to supply a different file that passes the same digest check. A secure hash is designed to make this kind of targeted substitution extremely difficult.
This must be separated from the ordinary collision problem, which allows the attacker to choose both messages. The freedom to select both inputs can make the attack model different. In a real workflow, who controls the original file, the expected digest and the checking software affects the threat. A system may be safe against one kind of substitution yet fail because the trusted digest list was replaced. Definitions help locate where the security claim actually begins and ends.
Collision resistance: find any matching pair
Collision resistance concerns the difficulty of finding any two distinct inputs with the same digest. Because output lengths are finite, collisions must exist; the challenge is discovering one efficiently enough to exploit. For an idealised 256-bit hash, generic birthday-style collision search requires work on the order of two to the power of 128 evaluations, not two to the power of 256. That difference is a key reason output bit length and collision security strength are not identical.
This approximation assumes an ideal model and does not predict the exact resistance of a particular real algorithm. Cryptanalysis may find structural weaknesses that change the picture. Conversely, a well-reviewed algorithm can resist known attacks while remaining computationally practical. When comparing cryptographic functions, ask what security property an application requires and which algorithms remain recommended for it. A name or long-looking digest alone is not a security assessment.
Hashing is not encryption
Encryption transforms readable data into protected ciphertext using a key, with a corresponding authorised method to recover the plaintext. Hashing normally produces a compact digest without a decryption step. A password encrypted under an appropriate scheme might be recovered by someone with the key; a hash digest is not designed as an encoded copy of the password. These operations have different uses even though both involve mathematics and digital bits.
This distinction matters when websites or sales pitches claim that passwords are ‘encrypted with a one-way hash’. The phrase mixes two operations and can conceal weak storage choices. A proper password storage system uses a specialised password-hashing or key-derivation construction with suitable parameters and salts, not merely a fast digest of the password. Likewise, encrypting a file protects confidentiality, while hashing it can help check integrity. Many secure systems need both functions for different reasons.
Hashing is not ordinary error detection
A checksum such as a simple sum or cyclic redundancy check can detect many accidental transmission errors efficiently. It is not necessarily constructed to resist a deliberate adversary who can modify the data and recompute the check value. A cryptographic hash aims for security properties against manipulation, but it may require more computational work than a simple error-detection code. The appropriate mechanism depends on the threat.
Imagine a sensor transmitting measurements over a noisy link with no attacker. An error-detecting code may be sufficient to notice common corruption. Now imagine an attacker who can alter the transmitted reading and change the checksum alongside it. The receiver needs an authenticated integrity mechanism, not just another unkeyed digest. The difference between accidental error and adversarial modification determines whether a hash alone solves the actual problem.
SHA-2 and the familiar SHA-256 family
The SHA-2 family contains several algorithms with different digest lengths and internal structures. SHA-256 is particularly familiar in software verification and many cryptographic protocols. NIST’s Secure Hash Standard, FIPS 180-4, specifies approved algorithms in this family alongside the historical SHA-1 algorithm. The existence of a standard does not mean every member remains equally appropriate for every new security application.
A technical reader should distinguish a family name from an exact algorithm. SHA-256 and SHA-512 have different output lengths and computational details; truncated variants also exist. A website describing simply ‘SHA’ may not provide enough information for secure interoperability. When checking a digest, both parties must know precisely which algorithm and which bytes were used. Otherwise a mismatch may arise from using different functions rather than any change to the underlying file.
SHA-3 provides a different construction
NIST FIPS 202 specifies the SHA-3 family based on the Keccak construction. SHA3-256 also produces a 256-bit digest, but it is not the same function as SHA-256. Equal output length does not imply equal outputs or internal design. SHA-3 provides an alternative family with distinct structural foundations. The standard also describes extendable-output functions, which can produce outputs of selected lengths under their own requirements.
The purpose of understanding both families is not to create a contest over which name sounds newer. Different systems have standards, compatibility demands, hardware characteristics and security requirements. A trustworthy implementation chooses an appropriate standardised algorithm and uses it correctly. If a protocol requires SHA-256, substituting SHA3-256 will break compatibility even though the displayed digests share a 256-bit length. Exact identity matters in cryptography.
The older SHA-1 and MD5 problem
MD5 and SHA-1 appear in historical software, old databases and previously published checksums. Their collision resistance is unsuitable for many modern security applications because practical attacks have been demonstrated. A reader should not conclude that any digest labelled MD5 or SHA-1 provides the same assurance as a current strong hash. However, seeing an older function used solely as a legacy non-adversarial error indicator has a different threat profile from using it to secure digital signatures.
Security advice should match the real application. Migrating from a weak cryptographic use requires understanding formats, keys, compatibility and affected records. Blindly replacing an algorithm name inside a complex protocol may break existing functionality without solving the larger problem. For new designs, use current authoritative cryptographic guidance rather than adopting historical examples found in old tutorials. The principle is simple: standards and attack knowledge change, even when the underlying mathematics remains published.
How a file verification workflow works
Imagine downloading a large educational dataset from a publisher. The publisher provides an expected SHA-256 digest through a trusted source. You download the file, calculate its SHA-256 digest locally and compare the values exactly. If the values differ, the downloaded bytes do not match the expected bytes, assuming normal implementations. Possible reasons include corruption, incomplete downloads, file conversion or manipulation.
If the values match, confidence in byte-level integrity increases, but only if the reference digest itself was trustworthy. An attacker who controls both a fraudulent file and the webpage publishing its hash can provide a matching pair. The method does not independently prove the publisher’s identity. For stronger authenticity, a verified digital signature or a trusted distribution mechanism may be necessary. A complete workflow identifies the trust anchor, not just the comparison command.
Canonicalisation and the problem of equivalent files
Two files can contain information a human considers equivalent while differing in the exact bytes. A text file may use different newline conventions. A document editor may reorder internal metadata when saving. A system may normalise Unicode characters or alter image compression. A cryptographic hash reflects those byte differences. If an application intends to hash a standardised representation, it must define that representation clearly.
Careless canonicalisation can create serious problems. If two logically distinct messages are accidentally mapped into one form, a verification process may accept something it should reject. If harmless formatting differences are not normalised where the protocol expects them to be, legitimate messages may fail. The remedy is a documented, unambiguous serialisation process agreed on by sender and recipient. Cryptographic strength cannot compensate for confusion about the input’s meaning or boundaries.
Hashes in digital signatures
A digital signature scheme commonly computes a digest of a message and then performs signing operations using a private key under a defined cryptographic protocol. A verifier uses the appropriate public key and verification process to determine whether the signed content and its signature match. The hash helps bind the signature to the message efficiently, but security depends on the signature algorithm, key handling and protocol details as well as the digest.
It is important not to say that a hash by itself is a signature. Anyone can compute SHA-256 over an ordinary public document. That does not establish authorship or consent. A signature incorporates key-based evidence and verification rules. Trusting the public key may require a certificate, verified distribution or another identity-binding mechanism. The distinction between a fingerprint and an authenticated signature is one of the most valuable lessons in digital literacy.
Keyed hashes and message authentication codes
An ordinary hash is public: anyone possessing a message can calculate its digest. A message authentication code adds the use of a secret key so that only parties holding the key can create or verify the appropriate authentication value under the protocol. HMAC is an established construction using a cryptographic hash with keying rules. Its security properties are not reproduced by simply appending a password to a message in an improvised format.
Consider a system where two authorised servers share a secret key and exchange instructions. They may use a correctly implemented message authentication protocol to detect tampering and confirm that a message came from a holder of the shared key. A leaked key undermines that assurance. Cryptography thus depends on key lifecycle, authorised access and implementation quality. Knowing a hash algorithm’s mathematical name is only the beginning of secure system design.
Password hashing needs special treatment
People often choose passwords with far less unpredictability than random 256-bit strings. A fast general-purpose hash can allow attackers to test many guesses if a password database is stolen. Modern password storage therefore uses a purpose-built password hashing or key-derivation method designed to make guessing more expensive, together with appropriate unique salts and cost settings. The exact approved choices and parameters should follow current expert standards.
A salt is generally a per-password value used to prevent identical passwords from automatically producing identical stored representations and to impede some forms of precomputed attack. It is not a substitute for strong password policy or a secret key. A system may also use additional protections such as rate limiting and multi-factor authentication. Do not design password storage by copying one line of sample code without understanding the overall threat model and implementation guidance.
A hash does not create authenticity by magic
A public file can have a perfectly correct SHA-256 digest and still contain misleading, harmful or unauthorised information. The digest says something about the relationship between bytes and an expected value, not the truth of the content. A false medical claim and a true scientific paper each have a digest. The function also does not check whether the person producing the file had permission to publish it.
This distinction is useful for the site’s educational chatbox. If a cited webpage includes a hash, the digest can help establish that a stored copy has not changed relative to a trusted record. It cannot establish the scientific quality of the writing. Source evaluation, editorial responsibility, legal authority and evidence remain separate questions. Trustworthy digital systems combine integrity checks with provenance, authorisation and substantive review.
Hashes in content-addressed storage
Some storage systems identify objects by a digest derived from their contents rather than relying only on a location or a human-supplied filename. If the content changes, its address or identifier may change as well. This can support reproducible retrieval, caching and deduplication under appropriate assumptions. The system must still specify the algorithm, data format and whether metadata or encoding are included in the hashed bytes.
A content-addressed identifier is not automatically a guarantee that a source is reputable. The object may have been created by anyone. Likewise, an attacker controlling a reference list might substitute another valid digest to point to different content. Secure applications must authenticate the references and decide how to handle collisions or algorithm changes. The concept is useful for software delivery and scientific data archives because exact content becomes independently checkable.
Merkle trees and many-file integrity checks
A Merkle tree is a data structure that combines hashes in a hierarchy. Leaf nodes represent data blocks or objects, and parent nodes combine information derived from their children’s digests. The final root digest can commit to a large collection under a specific construction. This allows efficient proofs that a particular piece belongs to a recorded collection without transferring the entire dataset. The details of how nodes are encoded and ordered are essential.
Imagine four documents stored in a fixed order. A system can hash each file and then combine pairs of hashes to form higher nodes until one root remains. If a document changes, its leaf hash and the dependent parent values usually change. But the protocol must prevent ambiguous combinations: simply concatenating unlabelled text can create parsing problems. Merkle trees demonstrate how basic hashing supports larger verification systems while introducing new requirements for data structure and proof checking.
Blockchain uses hashes, but they do not solve everything
Blockchains often use cryptographic hash functions to link data, support commitments or participate in consensus mechanisms. A changed historical record can alter dependent digest values, which helps make tampering evident under the system’s assumptions. But hash linkage alone does not determine who is authorised to append records, how agreement is reached or whether inputs are truthful. Those require additional protocol and governance rules.
The phrase secured by hashing can sound absolute. Real security depends on the consensus model, network incentives, cryptographic keys, software defects and participants. A chain of inaccurate claims can remain internally consistent. Understanding a hash function helps readers evaluate technical claims without confusing tamper evidence with universal truth. It is a building block in a larger system, not an automatic substitute for institutional trust.
Integrity, confidentiality and availability are distinct
Security is often discussed in terms of confidentiality, integrity and availability. Confidentiality concerns preventing unauthorised disclosure. Integrity concerns detecting or preventing unauthorised alteration. Availability concerns whether authorised users can access a service or data when needed. A hash can contribute to integrity checks, but it does not encrypt sensitive text and does not keep a server online during an outage.
Consider a school records archive. Hashes may help show that a downloaded report matches an approved version. Encryption and access controls help protect personal information. Backups and resilient infrastructure help maintain availability. These controls complement one another. Using a checksum to claim a student database is confidential would be a category error, just as encrypting a corrupted file does not guarantee its contents are accurate or complete.
What a collision would mean in practice
A collision is a pair of different inputs producing the same digest. In an abstract demonstration, the two inputs might be meaningless strings. In a security attack, the adversary hopes to make two carefully chosen documents or objects appear equivalent to a verifier. Whether that is feasible depends on the algorithm and on how the protocol uses hashes. A vulnerable protocol may give an attacker greater control than a simple educational example suggests.
The lesson should not inspire panic about every SHA-256 output. The existence of mathematical collisions does not mean practical ones are readily found. Nor should a system ignore published attacks against older algorithms simply because its own data seem important. Evaluate known cryptanalysis, security strength and intended use. Security is an engineering judgment about attacks that can actually be mounted with relevant resources and access.
Threat modelling begins with the adversary
When designing an integrity check, ask who could change the file, expected digest, computation tool or transport route. If an attacker can edit a download page and its checksum, matching values do not establish authenticity. If the attacker can replace the program calculating the digest, even a robust standard algorithm may be undermined. If no adversary is in scope and only accidental transfer errors matter, a simpler error-detection mechanism may be sufficient.
This threat-model approach stops developers from choosing technology by brand recognition. A useful checklist identifies the protected asset, attacker’s control, trust anchor, lifetime of the data and consequences of failure. Then select appropriate cryptographic components and procedures. Different applications need different assurances; there is no single output length or function name that automatically resolves every integrity and identity problem.
Worked transfer: two downloads and one trusted record
Imagine a university distributing a reference dataset to students. An official signed notice records a specific SHA-256 digest for version 3. A student downloads a file labelled version 3 from a mirror and computes a different digest. The correct conclusion is that the received bytes do not match the officially recorded expected bytes. The student should not silently rename the file or assume the difference is harmless; they should check the source and version.
Now suppose the student’s digest matches a value displayed on the mirror but not the official record. The mirror’s matching pair is still not sufficient evidence that the file is the approved version. The task is to authenticate the reference, not merely to find any hash that agrees. If the official notice later corrects its own error through an authenticated channel, the accepted reference may change. This scenario separates algorithm correctness from the provenance of expected values.
How to read a SHA-256 label correctly
A published digest normally needs a clear algorithm name, exact hexadecimal or other encoding, and an unambiguous reference to the target file or object. If a webpage says simply hash without naming the function, the verifier may not know what to compute. A lowercase hexadecimal string and its uppercase equivalent can represent the same bit pattern, but a truncated digest differs from the full standard output and requires its own protocol interpretation.
Some documentation prefixes digests with an algorithm identifier or includes filenames alongside them. That packaging is useful, provided it cannot be ambiguously parsed. Students working with hashes should also record which file version they checked and the date of the authoritative reference. A good integrity process is reproducible: another person with the same bytes, algorithm and trusted expected value can repeat the test and understand the result.
Common mistakes and their repairs
The most common error is saying hashing encrypts data. Repair it by distinguishing one-way digest generation from keyed reversible encryption. Another error is saying a matching hash proves the author. Repair it by checking how the expected value was authenticated. A third error is treating collisions as mathematically impossible. Repair it by explaining finite outputs and computational resistance. A fourth is using a fast general-purpose hash alone for password storage; specialised schemes are needed.
Further mistakes include comparing hashes of different file formats, treating SHA-256 and SHA3-256 as interchangeable, and imagining that more hexadecimal digits measure document similarity. Each has a straightforward diagnostic question: what exact bytes were hashed, what exact algorithm was used, what assurance is being claimed and which adversary is considered? Asking those questions before writing code prevents many expensive misunderstandings.
A student’s independent practice exercise
A teacher asks three students to identify which statements are warranted. First: a SHA-256 digest displayed as hexadecimal has 64 digits. This follows from 256 bits divided by four bits per hex digit. Second: two files with equal SHA-256 digests must be the same because collisions do not exist. This statement is false; collision resistance is practical, not absolute uniqueness. Third: a matching locally calculated digest and an attacker-controlled webpage prove authenticity. This too is false because the expected digest has not been authenticated.
Extend the exercise by changing the threat. Suppose the reference digest arrives through a separately verified signed channel. That improves the authenticity of the comparison, though it still says nothing about the factual truth of the file. Suppose only accidental corruption is relevant; then a checksum may suffice depending on requirements. The correct answer evolves when assumptions change. This is the deeper purpose of technical education: transfer principles to a new problem rather than memorise one command.
Frequently asked questions
What is the purpose of SHA-256? It can produce a fixed-length digest useful in integrity checks and cryptographic constructions. Can a hash be reversed? Secure designs resist general preimage attacks, but predictable inputs such as weak passwords may be guessed. Is a hash a digital signature? No; signatures incorporate cryptographic keys and verification rules. Why can different inputs share a hash? The input space is larger than the finite output space. Are SHA-256 and SHA3-256 identical? No, they have distinct designs despite equal output length.
Can a hash show whether a document is true? No, only whether exact bytes match a particular reference under specified assumptions. Is a plain hash enough for a password database? No; use properly configured password-hashing schemes following expert guidance. Do blockchains make hashes unbreakable? No; system security depends on additional consensus, key and protocol mechanisms. Why learn this? Digital records, scientific reproducibility, software delivery and secure communication all depend on being precise about what a fingerprint can demonstrate.
Sources and further reading
The NIST FIPS 180-4 Secure Hash Standard specifies the SHA-2 family and related algorithms, while NIST FIPS 202 specifies the SHA-3 family and extendable-output functions. The NIST hash functions project provides guidance about approved algorithms and transitions. For password-related context, refer to NIST SP 800-132 and its revision notices. Review date: 25 October 2026. The toy ASCII example and university download scenario are explicitly invented teaching examples.
For connected concepts, read eduKate’s What is a Code? and What is a Record? if the exact links remain available, and the compiler guide for software production. A cryptographic hash is most useful when its narrow promise is understood clearly: it creates a reproducible digest of specified bytes, and well-designed protocols use that digest to support carefully defined security properties.
