- Encryption has been part of signals intelligence
for quite some time.
Caesar cipher, vigenere cipher, ROT13 et cetera.
If there is a secret you want protected, encrypt it.
One way hashing is not encryption
but it is used to protect passwords.
While not reversible,
hashing algorithms were designed to be computed quickly.
So you can compute many hashes from a dynamic source
like a Word list or permutations, brute force
and compare the result to find a match.
Lets take a look at how hashing works.
We first start with clear text like "pearson".
We send it through a hash function.
In this case we are using MD5.
As the hash function applies a one way hashing algorithm,
the output of the function is a string of characters
that is unique to that specific clear text that we input.
Now this string can be used in different ways
to verify the integrity of clear text that was provided.
For instance, if a clear text email
is sent through a hash function by the sender
and the hash was provided to the recipient,
they can use it to verify that the email
was not changed in transit.
So in this demo,
I want to just show you a really quick and easy way
to generate a hash of clear text.
Just like we did in the previous slides.
Of course we are not gonna use MD5
because today we have better algorithms
for hashing like SHA256.
So what I am gonna show here is
how to do this from a Kali commandline.
What you will do is type "echo"
then type in your clear text
and simply pipe it over
to the SHA256SUM command.
And we can see here
it spits out a long set of characters
that are hash of the clear text word "pearson".
If we run it again, we see its the same hash.
This is the way that hashing algorithm works.
It should always be the same unless it was modified.
So if we were to,
say, add a "1" to "pearson",
and run it through again, the hash should change.
As you can imagine, this is how hashing can be used
for things like email integrity validation.