-: Encryption ciphers are categorized as either
symmetric or asymmetric algorithms
and this is based on the type of key that they utilize
to secure the data.
When you're using a symmetric key encryption,
you're going to have a single key that's used to encrypt
and decrypt the data.
With asymmetric encryption, you're going to use
two different keys.
One key is used to encrypt the data
and the second key is used to decrypt it.
Now symmetric key algorithms are often called
private key encryption
and this is due to the fact that both the sender
and the receiver need to know the same shared secret.
This same privately held key.
Now is symmetric key, this is a fairly easy concept to
understand, I mean after all when you go home tonight
and you unlock your house,
you're using symmetric key encryption.
You're basically using the exact same key as your spouse
or your roommate will to open and shut the door.
Now, if you wanted me to be able to get into your house,
you would give me an exact same copy of the key that you
have and so we're all going to have the exact same private key.
The key to your house so we can get in or out as needed.
This is our shared secret key.
Now, do to the shared secret key, we can make sure that
there is confidentiality of the items inside your house.
Only the people who have this key are going to be able to
open the door and get inside.
But you can't assure non-repudiation.
And what that means is that if somebody is able to go in
your house like your spouse or your roommate or even me
and we go inside and we take your laptop
when you're not there, when you get home you're going to know
the laptop is gone but you don't know who did it.
It could be anyone who had a copy of that shared secret key,
your spouse, your roommate, me or even you.
Now, after all a lot of people have a copy of that house key
and so any of us could have gone in a taken your laptop.
Beyond the challenge of proving who used the key,
there's another challenge with symmetric algorithms
and that's the distribution of that shared secret key.
So if you wanted to encrypt emails
and send them to your five closest friends.
Each of you would have to have a set of shared secret keys
set up for each of you, so there would be five different
pairs of keys.
One for you and one for each of your five friends.
Now if everyone of those friends also wanted to be able to
share it with each other, we're going to have to have a lot
more keys, in fact, we're going to have 15 different sets of
keys required.
This means that every two people has their own
individual set of keys.
Now, for the same reasons that a peer-to-peer connection
between everybody becomes untenable, as you start getting
large numbers.
We start having the same problem with symmetric keys
because as you get larger numbers
and more users that need to share a secret,
you need to be able to distribute all of these shared
secret keys.
If you remember back to our wireless encryption lesson,
we talked about your wifi password was a shared secret key.
And if you decide to invite 50 friends over
and you gave them all your shared secret.
Now there's no confidentiality because so many people
know your shared secret key.
That's the big problem when you start dealing with
a symmetric key.
Now, we're going to spend some time in a separate lesson
covering all of the different symmetric key algorithm
specifically that you're going to need to know for the
security plus exam.
This includes things like DES, 3DES, IDEA, AES,
Blowfish, Twofish and the Rivest Ciphers, RC4, RC5 and RC6.
The second category that we have for encryption ciphers
is known as asymmetric algorithms.
Unlike symmetric algorithms, asymmetric algorithms do not
require a shared secret key.
For this reason, they're often referred to as
public key cryptography which we're going to
discuss in its own lesson.
Now with asymmetric algorithms, two separate keys are used.
One is used to encrypt the data
and another one is used to decrypt the data.
The most commonly used types of asymmetric algorithms
are the Diffie-Hellman algorithm, RSA and ECC.
Again, I'm going to save the details of each of those for
a separate lesson.
Now when we compare symmetric and asymmetric algorithms,
you might be wondering which one is better.
Well that's really a hard question to answer
because they both are used for different purposes
and have different benefits.
For example, symmetric algorithms are very popular
because they tend to be about 100 to 1000 times faster
than an asymmetric algorithm.
But asymmetric algorithms allows to overcome the
key distribution challenge that we face
with symmetric algorithms.
Often though like most things, implementations are
going to use a hybrid approach that combines both of these
to get you the best benefits.
To overcome the key distribution problem, for example,
most implementations are going to use an asymmetric
or public key encryption to encrypt and share a secret key
or private key and then use symmetric encryption to
secure the bulk of the data transfer
because both the sender and receiver now have this shared
secret and they're able to pass the information back
and forth appropriately and do it much faster than an
asymmetric algorithm could do alone.
Now in addition to classifying algorithms as symmetric
or asymmetric based on their key type.
We also categorize an algorithm as a stream
or a block cipher based on the mathematical algorithm
that they're using to do their encryption
and decryption.
Stream ciphers perform their computations
and encryption a single bite at a time.
Making it a bit by bit process, they utilize a key stream
generator to create a bit stream that is mixed with
the input plain text using a mathematical exclusive
XOR function and this creates the encrypted cipher text.
Because these stream ciphers can perform bit by bit
encryption, they are well suited for securing real-time
communication data streams like streaming audio
or streaming video.
Now, stream ciphers also tend to be symmetric algorithms
and they use the same key for encryption and decryption.
A block cipher on the other hand is able to break the
input into fixed length blocks of data before performing
the encryption.
For example, if you had a message that was one kilobyte
in size, we could break it into 16 blocks of 64 bites each.
Then each of those 16 blocks could be processed by the
cipher and output the other side the block of cipher text
that we're expecting.
If your message was less than 64 bites in size,
extra padding would be added to that data prior to it
going through the encryption
and this would give us the expected result from the cipher.
Block ciphers have several advantages over a stream cipher.
Such as, easier implementation to perform
and they're also less susceptible to security problems.
Block ciphers are also easily implemented through
software solutions where stream ciphers tend to be used
in hardware solutions.
In fact, most of the algorithms that we're going to talk about
in this course are block ciphers.
Things like DES, 3DES, AES and IDEA.