## Overview#

Hash Function is a deterministic function that takes an arbitrary block of data, the Message and returns a fixed-size bit string, the Hash value, such that an accidental or intentional change to the data will almost certainly change the Hash.

Hash Function Message-Digest, or Fingerprint

In our contexts, the data to be encoded is called the Message, and the hash value is called the Hash.

A Cryptographic Hash Function is a Hash Function with some additional properties.

These Hash Functions may not be suitable Cryptographic Hash Function as they do not have Hash Function Security Properties.

Hash Functions do not require Cryptographic Keys for their basic operation. Hash functions generate a relatively small digest (hash value) from a (possibly) large input in a way that is fundamentally one-way (i.e., it is difficult to find an input that will produce a given output). Hash functions are used as building blocks for key management, for example:

- To provide source and integrity authentication services - the hash function is used with a key to generate a message authentication code
- To compress messages for Digital Signature generation and verification
- To derive keys in Key-Establishment algorithms
- To generate deterministic random numbers

### Why Hash Function?#

Given a message m, you could sign the message itself. Public Key operations of most Digital Signature Algorithms are fairly CPU expensive in computational terms. If a Hash Function is applied to the message first and then use Digital Signature to sign the Hash instead.### More Information#

There might be more information for this subject on one of the following:- Code_challenge_method
- Craig
- Cryptographic Algorithm
- Cryptographic Hash Function
- Cryptographic Primitive
- Derive the Master Secret
- Digital Signature
- Double Ratchet Algorithm
- FIPS 198-1
- GOST
- Hash
- Hash Function Security Properties
- Hashing
- Homomorphic Encryption
- How passwords are used in Windows
- Initialization Vector
- Key size
- MD4
- MGF1
- Mask Generation Function
- Message-Digest
- NCP Primary Authentication Protocol
- NIST.SP.800-107
- NTLMv2
- Off-the-Record Messaging
- One-Way Hash Function
- Padded
- Password Periodic Changes
- Password Validator
- Password-hash
- Preimage Resistance
- RFC 3874
- SHA-1 Deprecation
- Session Key
- Signature Generation
- TLS 1.3 Cipher Suites
- Tokenization