What Is Hashing Used For? (2024)

What is the purpose of hashing?

The main purpose of hashing is to verify the integrity of a piece of data.

Since the hash generated is UNIQUE to the input data, it acts as a unique “fingerprint” of the input data.

This makes a hash useful for verifying the integrity of data sent through insecure communication channels like the internet. Data integrity just means that the data has not been altered in an unapproved way.

The hash value of received data can be compared to the hash value of data before it was sent to determine whether the data was altered.

If I post both the message and the hash value I generated from it, you can generate a hash value from the message that you received and compare the hash values.

Using a very simple example, let’s say we’re about to meet up for lunch, and right before I head out the door, I remember our last time together…

What Is Hashing Used For? (1)

While your personality was really nice, your smell was not nice at all. 😬

So I want to send you a message, “Please wear deodorant.

But before I send this, I run it through a hash function (SHA-256). The hash is:

33ebb528eab107766343d0ac591952bb68ee959d45b7a8b399628e662f3bc1ef

I send you this hash first.*

THEN I send you the actual text message.

Once you receive my message, you think, “WTF? Did he really just say that to me? Or was the message intercepted during transit and the original message was altered?”

What Is Hashing Used For? (2)

So you run the message through the same hash function.

33ebb528eab107766343d0ac591952bb68ee959d45b7a8b399628e662f3bc1ef

You then compare your hash versus the hash that came before the text message.

If both hash values are the same, then this proves that:

  1. The message was sent correctly.
  2. That your armpits really do stink!
  3. The message has not been deliberately altered by someone between me sending it to you and you receiving it.

Of course, in the real world, it is our computers that do all this for us.

And hopefully, you keep your armpits smelling fresh. 😅

*Technically, before I send you the hash, it should be protected in some way, but I wanted to keep the example simple. How the hash stays protected during transit will be covered in a later lesson.

Real-World Example of Hashing: Online Passwords

This might surprise you, but you probably encounter hashing in your daily life….whenever you log in to check your email. 📧

What Is Hashing Used For? (3)

When you create an email address and password, your email provider likely does not save your actual password.

Instead, your email provider runs the password through a hash function and saves the hash of your password.

Every time you attempt to log in to your email account, your email provider hashes the password YOU enter and compares this hash to the hash it has saved.

Only when the two hashes match are you authorized to access your email.

Let’s see why they do NOT save your actual password…

What Is Hashing Used For? (4)

If actual passwords are stored, and hackers get into their system, they can steal them. This is definitely not good for users who use the same password for multiple websites!

A solution is to hash the password…

What Is Hashing Used For? (5)

By hashing a password, the company protects user information. Even if a hacker breaks into the system, they won’t have access to actual passwords, just the hashes.

Remember, hashes are irreversible so it’s impossible for the hacker to figure out what the actual password is just by looking at the hash. Hashing ensures that the data is stored in a scrambled state, so it’s harder to steal.
What Is Hashing Used For? (6)

Whenever you log in, your email provider doesn’t store the plain text password, all they need is the hash.

When you enter your password, it is run through the hash function.

The output is matched against the hash that is saved in the database.

If the hash values are the same, the password is correct.

The wrong password entered would produce a different hash than the one saved. The hashes would NOT match, so your login attempt would FAIL.

So as you can see, a hash function garbles data and makes it unreadable. Even if a hacker gains access to your email provider’s server, the details stored can’t be unscrambled.

What Is Hashing Used For? (2024)

FAQs

What Is Hashing Used For? ›

Hashing is commonly used to ensure data integrity. By generating a hash value for an amount of data, such as a file or message, a user can later compare it with the hash value of the received data to verify if any changes or corruption occurred during transmission.

What is hashing mostly used for? ›

Hashing is a function used to map data to a fixed-length value. Businesses use hashing in authentication systems and to validate different types of data, such as files and documents. Understanding what hashing is and how it's used is important because it can help to prevent data breaches and protect stored information.

What is the purpose of hash? ›

The main purpose of hashing is to verify the integrity of a piece of data. Since the hash generated is UNIQUE to the input data, it acts as a unique “fingerprint” of the input data. This makes a hash useful for verifying the integrity of data sent through insecure communication channels like the internet.

What is the hashing technique used for? ›

Hashing is a data security technique used to convert data values into alternate, unique identifiers called hashes for quick and secure access. Hashing can be used for data security because the one-way process prevents access to or tampering with the source data.

What is hashing used for in cyber security? ›

Hashing is a one-way mathematical function that turns data into a string of nondescript text that cannot be reversed or decoded. In the context of cybersecurity, hashing is a way to keep sensitive information and data — including passwords, messages, and documents — secure.

What is a real life example of hashing? ›

There are many practical examples of hash tables used in every-day life. A popular example is in username-password databases. Every time someone signs up on a website using a username and password, that information must be stored somewhere for later retrieval.

What is the main purpose of file hashing? ›

Data Integrity Verification: File hashing is used to verify the integrity of data during transmission or storage. By calculating the hash value of a file before and after transmission or storage, you can compare the two hash values to check if the file has been modified or corrupted.

What is the goal of hashing? ›

In addition to enabling rapid data retrieval, hashing helps encrypt and decrypt digital signatures used to authenticate message senders and receivers.

What can a hash tell you? ›

A hash value is a numeric value of a fixed length that uniquely identifies data. Hash values represent large amounts of data as much smaller numeric values, so they are used with digital signatures.

What is the advantage of hashing? ›

The following are the advantages of Hashing:

Hashing verifies the file's integrity once it is transferred from one place to another in a file backup program. Users can compare the hash value of both files to ensure that transferred files are not corrupted.

When should files be hashed? ›

Hashing is also used to verify the integrity of a file after it has been transferred from one place to another, typically in a file backup program like SyncBack. To ensure the transferred file is not corrupted, a user can compare the hash value of both files.

Can hashing be reversed? ›

Hashing is a one-way process where data is transformed into a fixed length alphanumeric string. This string is known as a hash or message digest. A hash cannot be reversed back to the original data because it is a one-way operation.

What is hashing in slang? ›

to muddle or mess up: We thought we knew our parts, but when the play began we hashed the whole thing.

What is the difference between encryption and hashing? ›

Encryption is a reversible process, but hashing is not. Hashing is way more secure in comparison to encryption. The main purpose of hashing is to check the integrity of data. Whereas the main purpose of encryption is to secure the data by converting it to an unreadable format.

Is hashing used for authentication? ›

Hashing is a powerful tool for password authentication, but it is not a silver bullet. It cannot prevent users from choosing weak passwords, nor does it protect passwords from being exposed or stolen if the database or server is compromised.

How to check if a hash value is malicious or not? ›

You can use a tool like md5sum or sha1sum to compute the hash value of a file. Then, you can compare the hash value with a known database of malicious or benign files, such as VirusTotal or the National Software Reference Library.

What is the most popular hashing function? ›

The MD5 algorithm, defined in RFC 1321, is probably the most well-known and widely used hash function. It is the fastest of all the . NET hashing algorithms, but it uses a smaller 128-bit hash value, making it the most vulnerable to attack over the long term.

What are hash values used for? ›

Hash values represent large amounts of data as much smaller numeric values, so they are used with digital signatures. You can sign a hash value more efficiently than signing the larger value. Hash values are also useful for verifying the integrity of data sent through insecure channels.

Is hashing used for search? ›

One of the most common approaches is to use a hash function to transform one or more characteristics of the searched-for item into a value that is used to index into an indexed hash table. Hash-based searching has better average-case performance than the other search algorithms described in this chapter.

Top Articles
Credit muling definition: Understanding the Basics of Credit Muling - FasterCapital
Ra (Egyptian God)
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 5921

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.