Contact Us Today 01642 716680

Cryptographic Hash Function

Definition: A cryptographic hash function is an algorithm designed to produce a fixed-size hash value from variable input data. It is a mathematical process used in computer security to encrypt information.

The role of cryptographic hash functions in cyber security is critical, as they ensure data integrity, authenticate information, and securely store passwords. A good hash function has several properties: it produces a unique output for each unique input (collision-resistant); it is infeasible to generate the original input from its hash output (pre-image resistant); and a small change to the input will produce a significantly different hash (avalanche effect).

Key Characteristics:

  • Deterministic: The same input will always result in the same hash output.
  • Fixed Output Length: Regardless of the size of the input data, the output hash is always of a fixed size.
  • Efficiency: Hash functions compute the hash value at a high speed.
  • Pre-image Resistant: It is computationally infeasible to reverse-engineer the original input from its hash value.
  • Collision Resistant: It is infeasibly hard to find two different inputs that produce the same output hash.
  • Avalanche Effect: A minor change to the input should change the hash value dramatically.

Examples:

  • Real-World Example: When a user logs into a secure platform, the password they entered is hashed and compared with the stored hash of the actual password. If the hashes match, access is granted.
  • Hypothetical Scenario: A document is digitally signed by computing its hash and then encrypting the hash with a private key. When verifying the signature, the document’s hash is recomputed and compared with the decrypted signature hash. If they match, the document’s integrity is confirmed.

Related Terms:

  • SHA-256: A widely used cryptographic hash function that produces a 256-bit hash value.
  • MD5: An older hash function that produces a 128-bit hash, now considered insecure due to vulnerabilities.
  • Collision: The event where two different inputs produce the same hash output, which hash functions are designed to avoid.

What is the OWASP Top 10: Download our flash cards to find out.

Inside you will find a description of the most common web vulnerabilities.

Contact us

Get a free, no obligation quote from one of our expert staff.