24. Hashing

Hashing takes an input of almost any size and returns a fixed-length result called the hash value A hash function is the algorithm used to perform this transformation.
With cryptographically strong hash algorithms, hashing is a common method of ensuring message integrity (making sure the message has not been changed).

Hashes are used in computing and security to create a message digest by applying a hash function to the plaintext body of a message.

Hash

Properties of a Cryptographic Hash Function

A cryptographic hash function must be:

Uses of Hash Functions

Cryptographic hash functions are used in information security for:

They can also be used for fingerprinting (uniquely identifying files), finding duplicate data, and as checksums to detect accidental data corruption.

Hashing structure

Basic Hashing Process

A simple hashing function works like this: variable data input + hashing algorithm = fixed bit size data output (the digest) The originator hashes the message to create a digest and sends the digest along with the message.
The receiver hashes the received message using the same algorithm and compares that digest with the sender’s digest.

CHF

Key Points

Even a very small change in the input message creates a completely different hash value. The digest size does not vary with the size of the message, so a person cannot tell the size of the message from the digest.


discord :