• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Browsers
    • Gaming
    • Hardware
    • Internet
    • iPhone
    • Linux
    • macOS
    • Office
    • Reviews
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About

One-Way Hash Function

October 16, 2019 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

  • What is a Cryptographic Hash?
    What is a Cryptographic Hash?
  • How to Generate a Hash in Notepad++
    How to Generate a Hash in Notepad++
  • 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

  • How to Fix Explorer.exe: Class Not Registered Error in Windows 11
  • How to Fix Explorer.exe Doesn’t Load at Startup Issue
  • How to Enable/Disable Efficiency Mode in Windows 11
  • How to Create and Edit a Playlist on YouTube Music
  • Microsoft Edge Collections: What It is and How to Use It
  • YouTube Premium: How to Disable/Enable Background Playback
  • How to Update Apps on iPad (iPadOS 16.3.1)
  • How to Fix Outlook Rules Are Not Supported for This Account

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 2023 Guiding Tech Media · All Rights Reserved · Privacy