filmov
tv
Hashing and Hash Cracking Explained Simply! (2021) | MD5, SHA1, and SHA256
Показать описание
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 🥺
🙇♂️ - 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 🥺
Комментарии