Without wasting any much time, let us get started with the next important concept in cryptography that
is Hachim.
You must have heard about this dumb harshing, which is very common if you want to check something.
So whenever you're going to download a software, you might see a line over there saying that, please
check the hash here.
So what exactly is harshing?
Harshing is transforming the normal text, the normal message, our data into a Jibberish one.
So it sounds funny, right?
Why we should transfer transform something which is understandable into something which is not completely
understandable, but it's it's abrupt text.
So why we should do that?
Well, hashing is a mathematical function which converts a numerical input value into another compressed
numerical value of the same length.
For example, if you enter my name is X, Y, Z, the output will be some gibberish data.
And but if you enter, my name is ABC again, the output will be different.
So no two hash values can be seen.
So then when we pass the input to the hash function, the output is known as the message digest.
Basically it digests the input and then gives us the output of the origin message, which is known as
a message digest.
So MI five, that is message digest, fifth version or secure hash algorithm.
SHC one is two and three are three different hashing algorithms which are used now.
Hashing algorithm is again our M.D., which is res integrated message digest function basically.
So let us consider we have a document here and you want to transfer that document to Alice over the
Internet, but it has some confidential data.
OK, it has some confidential data and you don't want to transfer the original document as it is.
So what you do is you give the original document into hash algorithm and together you get a hash document.
So this is the working of a hash function.
So when it comes to hashing, what you have to remember is these are the most common hashing algorithms.
And all of this as this as a tool is widely used because it has more rounds, it has more keys to it,
which prevents the data integrity.
So when you when do you have to use a hash?
OK, let's consider you are downloading a new program from Microsoft.
And Microsoft has said that the hash value is A, B, C, D and E, so if you download the software,
make sure that you hash this software and check if the values are seen.
So if both the hash values are the same, then you have downloaded the original software.
Let me tell you one thing that even a single character in the file changes, the entire hash value is
going to change.
This point is very important.
So in order to maintain the integrity of data, you check the hash value.
Another scenario can be, let's say Alice has said hello to Bob.
Hello, I am Alice and I want to meet you at three p.m. and Bob receives a message.
It's Hashd.
And if you change the message to Hello, I am Alice, I want to meet you at three thirty.
The hash value of both the messages will be different.
So in that way, hashing is used in digital signature Ghadames.
You must have heard of the word digital signatures.
So in the next lecture we will have one fun activity that will be calculating different hashes and will
see how changing one character can change the entire hash value.
All right, stay tuned.
Keep moving forward.