• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About Technipages

One-Way Hash Function

By Mel Hawthorne

A one-way hash function is a mathematical function that generates a fingerprint of the input, but there is no way to get back to the original input. If the input is the same then the hash is always the same, if it changes at all, even by one character the output hash is completely different. A hash can be used to verify that input A is identical to input B but cannot be used to get the input back from the output like with another mathematical function, encryption.

Technipages Explains One-Way Hash Function

The output of a one-way hash is always the same length no matter how long the input is. For example, the output for the hashing algorithm md5 is always 32 characters if represented in hexadecimal, this is true if the input is one character long or the length of the entire works of Shakespeare.

A hash is ideal for verifying that two things are identical, this has two main uses. “Integrity verification” is used to verify that a file that has been downloaded is identical to the one on the server by comparing a known hash of the server file to a hash of the downloaded file.
Hashing algorithms are also used in databases to verify that the hash of the submitted password matches the stored hash. This also means that if a hacker gains unauthorised access to the database they do not get passwords themselves but rather their hashes which cannot be used to log in directly.

The length of the output of a hashing algorithm set limits on how many possible outputs there are and as such describes its strength against hash “collision attacks”. Collision attacks are where two different inputs generate the same output. It is pretty difficult to find two random inputs that generate the same output, it is significantly more difficult to find a collision for a single specific hash output.

Common Uses of One-Way Hash Function

  • There are two types of one way hashing algorithms, fast and slow, fast is used for file verification and slow for password hashing.
  • The input of a one-way hashing algorithm cannot be determined by analysing the output or running it through another function.
  • When a hacker has a list of password hashes from a stolen database they work out what one-way hashing algorithm was used and then guess as many possible passwords as they can, when they have an output that matches an entry in the database they know that the input is the user’s password.

Common Misuses of One-Way Hash Function

  • A one-way hashing algorithm is a type of encryption and can be used to securely store data for retrieval at a later date with the use of a password and another function.

You Might Also Like

  • How to Generate a Hash in Notepad++
    How to Generate a Hash in Notepad++
  • How to Use the Unique Function in Google Sheets
    How to Use the Unique Function in Google Sheets
  • Fix: Function Driver Was Not Specified for This Device Instance
    Fix: Function Driver Was Not Specified for This Device…
  • How Does Burp Suite’s Intercept Function Work?
    How Does Burp Suite’s Intercept Function Work?

Primary Sidebar

Recent Posts

  • What Is an Internal Speaker?
  • Google Keep: How to Share Your Notes with Someone
  • Google Docs: How to Use Find and Replace
  • Google Docs: How to Use Page Breaks
  • How to Use Pageless Format in Google Docs
  • Google Sheets: How to Easily Merge Cells
  • What is Overvolting?
  • What Is Denial of Service?

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • Hash
  • Function

© Copyright 2022 Technipages · All Rights Reserved · Privacy