Hashing and Hash Cracking Explained Simply! (2021) | MD5, SHA1, and SHA256

preview_player
Показать описание
In this video we're going to talk about hashing in the context of information security. I'm going to explain these concepts in a simple, easy-to-understand way that is relatable to real-life scenarios. Then, once we have a good understanding of what a hash is, I'm going to cover differences between some of the most well known hashing algorithms, such as MD5, SHA1, and SHA256.

🙇‍♂️ - Patreon - 🙇‍♂️

⌨️ - Coding - ⌨️

⭐️ - Social Media - ⭐️

🎥 - Equipment - 🎥

📄 - Sample Resumes - 📄

So getting into what Hashing actually is…
Looking at the formal wikipedia definition of what hash functions, it's easy to get lost really quickly. This is why I came up with our OWN, easy to understand analogy that we can use to better understand the more rigorous definition.

So a hashing function is basically just a magical blender
That can blend ANY amount of ANY ingredients
That will create a milkshake of the SAME SIZE, EVERY TIME.
Most important: Once the ingredients have been blended into a shake
Each milkshake is unique, unless the ingredients are exactly the same.

To try to solidify the idea of creating a hash of "ANY size of ANY data", we can look at our magical blender example here.

Say we decided to add some more ingredients to our strawberry milkshake, such as 5 elephants perhaps. We can do that, remember. Our Magic blender can take ANY ingredients of ANY size, just like hashing functions can take any data of any size.
We blend this up, and we're still going to get a 16.0 oz milkshake, it's just going to look different and have different properties.
Also acknowledge the fact that it's not possible to take this drink and bring the elephants back to life and re-create the strawberries

Say we want to create another slightly different milkshake.
This time we add a few cactus and the endeavor space shuttle. Remember, any ingredients of any size, any data of any size.
We blend this up, and we are left with another 16.0oz milkshake, this time it is slightly translucent green and has a hint of cactus and rocket fuel.
Again, think about it. There is no way to take this special drink and reconstruct the endeavor space shuttle and cacti.

Algorithms
So basically, there is a whole bunch of different hashing algorithms that you can use for computing hashes.
That is, there's a bunch of different blenders you can use for making milkshakes.
There are a lot of differences between these algorithms, however some of the main, most obvious differences are, the size of the hash the output (the size of the milkshake they make),
and the speed at which they can compute the hash (the speed at which they blend the milkshake).
As a general rule of the thumb, the larger the hash that is output, the longer it takes to compute the hash.
In our blender analogy, the larger the milkshake that is being produced, the longer the blender takes to blend up the ingredients.

Get-FileHash is a great powershell command used to get the hash of a file on your PC

0:00 Intro
0:37 Blender Analogy
1:55 Emphasis on output size remains the same
2:48 Example solidified with PowerShell
5:00 Example show different file sizes produce the same size hash
6:15 Differences between different hash types (MD5, SHA1, SHA256)
7:15 Hash Collisions
8:04 Handing and storing passwords with hashing
9:40 Cracking hashes/passwords
11:45 Outro

DISCLAIMER: This video description has some affiliate links and I may receive a small commission. I only share stuff that I use and believe in. Thanks so much for your support 🥺
Рекомендации по теме
Комментарии
Автор

I have literally done hours of videos and reading on hashes and have almost been in tears trying to understand this. Thanks to your vid, it finally clicked. Thank you.

nadjaleslie
Автор

Thanks so much! I really appreciate you putting this in everyday terms rather than just throwing a bunch of complex terms or functions on the screen. I usually get pretty overwhelmed when it gets too complex-sounding, so this really did help me a lot. Keep it up!

colehowe
Автор

Fucking brilliant. Refreshing to see someone explaining things suuuper basically and yet not making false or oversimplifying claims. It is just well explained - perhaps the way it should be introduced.

EquationHub
Автор

Great content! So few views compares to the quality of the video! Keeps up the great work man!

shangwang
Автор

finally the only video that helps me to understand! thank you

myguyen
Автор

You should be a Professor. It is better than any Professor I take in University

hoangtruong
Автор

I wish you'd teach a whole Security+ course. Your teaching style matches my learning style to a T!

suburbanninja
Автор

Amazing anlogy for sha1 being a blender. I now understand why hash values can't be reversed, yet cracked.

agiliteaV
Автор

thank you for explaining so well. I've spent DAYS AND WEEKS trying to understand but no one ever uses easier terms so I've been frustrated and lost.

Do you have any videos to explain how we can generate hashes for every file we have? I am trying to understand how to check the integrity for files because I need to move all of my things from an old HDD to a new SSD and it's been super difficult to comprehend and learn 😭

kellycappuchino
Автор

Studying for my security+ exam and md5 was referenced and I wanted to know what it was. Thank you for providing this video. Btw your voice is super relaxing lol

notahacker
Автор

great video to explain hashing! Thanks

TheCocoaShow-cqtx
Автор

hats off !!..amazed by ur teaching skills!

chandrakanthkancharapu
Автор

Hands down the best explanation of Hash....
Do you have a whole series for the Security+?

YenieD
Автор

Sir you are great! I really get this super quick thanks to your explanation. Thank you!

matiasvalenzuela
Автор

Thank you sir. Ive learned alot by watching your video

AMF
Автор

that what makes rainbow tables so scary haha just pre hashing a list of common and uncommon passwords people can use to compare!

xkitrose
Автор

Handsome and helping me with my grad school homework. I think I'm in love.

JohnSmith-eqbw
Автор

Sir is it possible to decode SHA 1 encoded data..??

unknown
Автор

Thanks for the lesson. You have a gift with teaching!! New subscriber and looking towards checking out your channel.

donnieb
Автор

I looked up hashing as it relates to mapping independent values to one another, and knowing some things about hashing as it relates to security (helped by your video), it seems like the hashing algorithms used in security come from the programming side but are beefier and more serious. In development, collisions are (mostly) acceptable and are accounted for with chaining and linked data, but in security, collisions are unacceptable. Can you go over what the differences are between these two styles of hashing (as it relates to programming vs security), and how we got to where we are to day with both of them?

thewatcher