- Encryption has been part
of signals intelligence for quite some time.
Caesar cipher,
Vigenère cipher, ROT-13, et cetera.
If there's 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 results to find a match.
Let's take a look at how hashing works.
We first start with cleartext like pearson.
We send it through a hash function,
in this case, we're 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 cleartext that we input.
Now this string can be used
in different ways to verify the integrity
of cleartext that was provided.
For instance,
if a cleartext 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 cleartext
just like we did in the previous slides.
Of course, we're not gonna use MD5
because today
we have better algorithms for hashing,
like SHA-256.
So what I'm gonna show you here is
how to do this from the colleague command line.
What you would do is type echo,
then type in your cleartext
and simply pipe it over to the SHA-256 sum command.
And we can see here,
it spits out a long set of characters.
That's our hash of the cleartext word pearson.
If we run it again, we see it's the same hash.
This is the way that a hashing algorithm works.
It should always be the same unless it was modified.
So if we were to say,
add a one to pearson, 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.