-: Welcome to this section on cryptography.
What is cryptography?
Well cryptography is the practice
and study of writing
and solving codes in order to hide
the true meaning of the information.
Now most commonly,
we're going to use cryptography
as a form of encryption.
Encryption is the process
of converting ordinary information
known as plaintext,
into an unintelligible format
known as ciphertext.
So if I take some plain words
and I encrypt them into some gobbledygook.
Nobody else can read it unless they have the key
and they can turn it back into that plaintext.
That's the concept of encryption.
Now encryption is used to provide us data at rest,
data in transit
and data in use protection
and this is the three areas
that we've talked about previously,
that we want to make sure
we're securing our information.
By using encryption,
we can do that.
Now what exactly is data at rest?
Well it's inactive data that is archived,
such as data that's resident
on a hard drive.
So in data is just sitting there in a file,
that is known as data at rest.
Now when we start moving that data around,
that becomes known as data in transit.
That's data that's crossing the network
or data that's residing inside the computers memory,
the random access memory,
the RAM,
as it's waiting to be processed.
Now if data is in use,
that means that data
is currently undergoing constant change,
so there's data inside your processor
and calculations are being done.
That's data in use.
Encryption can be used in all three of these places
and so it's important
to understand how you're going to use it.
Now let me go back
and explain how encryption works a little bit.
Let's say I have something
like you see here on the screen.
This is gobbledygook.
You have no idea what it means, right?
Do you know what this message is?
Well I don't the way it's written
but if I told you that I used a ROT13 cipher,
then that might tell you
that you could figure out how to get back
to the original plaintext.
What a ROT13 cipher is,
it stands for rotate 13 spots.
So if I start with something like the letter C
and I count 13 letters to the right,
that gets me to P.
If I go with R,
13 letters to the right goes around past Z,
A, B, C, D, E
and it gets me to E.
So I know have P and E is C and R.
Do you know what this says yet?
Well let me help you.
Instead of me making you do all the math
and figuring it out on your own,
I'm going to show it to you.
It stands for cryptography is fun.
Now that you know what that key is,
that 13 places,
it makes it really easy for you to figure out
how to convert things forward and back.
That's the idea with encryption.
It's not the fact that we have some algorithm
that's very complicated.
It's knowing the key.
If I told you everything was a rotation,
you can figure it out if you know what the key is
and the key here is 13 numbers.
Now our encryption is going to be much more complicated
than that in a computer
but that's the same basic principle
and I wanted you to understand how it works.
Now that ROT13 that I talked about,
that rotation,
that's known as an algorithm.
It's the cipher we're going to use
and a cipher is simply an algorithm
which performs the encryption or decryption function.
In my example,
when you added 13 you encrypted,
when you subtracted 13 spots you decrypted
and that's the way we're going to use it
in a ROT13 cipher.
We're going to use much more complicated ciphers than that
when we get into the ciphers
and we'll talk about all of the different algorithms,
both symmetric and asymmetric,
block and stream.
We'll talk about all of that in this section of the course.
Now when we talk about these algorithms,
this is a mathematical function.
Something gets input,
some things get changed
and out the other side comes some value.
So when I input the C
and it went through my ROT13 cipher,
it came out the other side as a P
because it moved 13 spots to the right.
That's the idea.
All an algorithm is,
is a mathematical formula
that tells you how we're going to encrypt
or decrypt something.
Now as we move through this
we have to think about what gives us
the security inside our cryptography
and our encryption.
What is really the strength here?
Is it that ROT13 that I told you?
Well it wasn't the ROT part.
The ROT was the algorithm.
It was the 13 which was the key
because all encryption strength comes
from the key not the algorithm.
In fact almost all of the algorithms
we're going to talk about,
in probably all of the algorithms we're going to talk about,
have undergone public review,
meaning the people who have designed them
have opened up their code and said
here is how we've done it.
If you can do that,
you have a good encryption algorithm
because it's not the algorithm that's secure.
It's the key that makes it secure
and we're going to talk about that over and over again,
throughout this section as well.
When we talk about a key,
this is that essential piece of information
that determines the output of a cipher.
Going back to my ROT13 example,
what was the key?
It was the 13.
It was telling you to move 13 places to the right
or decrypting by going 13 places to the left.
Now that's the whole idea here
and so it's really important you understand
that the key is the security.
The key is the key to security inside encryption.
So let's get started with this section
and we're going to have a lot of fun
talking about all of the different ways
to secure your data.