The world of computing didn't start with encryption being built into it.
We could easily say that computing started in the late 1940s.
So from the 1940s up until the late 1970s the idea of encrypting a mainframe computer just didn't make
any sense whatsoever.
Well over time we began discover you know with the Cold War and things like that that our computers
we didn't want people looking into him and figuring out the data or we were moving data from one computer
to another via phone lines or something.
And we didn't want people to see that information.
So we had to go about the process of encryption.
Now when you're encrypting in the I.T. world you have to develop algorithms.
Now these algorithms if you've been watching other episodes.
Number one they have to be known to everybody everybody understands the algorithm and they have to have
a key of different lengths and then that key has to be kept secret.
So the first generation of encryption that we still see these today used what were known as a symmetric
key algorithm symmetric key simply means that the person who encrypts it needs the key and then you
take that key and the person who decrypts it uses the same key.
It's the same key for encrypting and decrypting.
Now that may seem obvious to you but if you watch other episodes you'll see there's other ways to do
it anyway.
So what we're going to be talking about are symmetric in Krishan algorithms.
And what I want to stress is the idea of something called a block.
Now a symmetric block algorithm simply means that I don't care how much data you have it takes off a
chunk o data.
So if it's a huge word document it takes off X amount of bytes at the beginning and encrypts that sends
it off to the side then grabs another block encrypts that sends it off to the side and keeps going like
that until it's all the way done.
There's other ways to do it.
So the first type of popular symmetric block encryption ever created was known as the data encryption
standard or D.S. This was invented primarily by IBM but other people contributed as well and it developed
as the first open standard used heavily by the United States government and it's still in use today.
Now in other episodes we've seen Cesar Siver and vision and even a simple X or encryption.
Let me show you how hairy a typical encryption is done using D.S..
The first step of D.S. encryption is to grab a 64 bit chunk of plaintext from the data stream we wish
to encrypt.
We perform what's known as an initial permutation a very specific stirring of the data.
OK.
Let's go ahead now that we've done the initial permutation and set the data aside for a moment and let's
look at the key.
So here's our key.
Now the first thing we're going to do is drop the last eight bits off the key.
We split that key into two 28 bit chunks.
We then grab the first 24 bits from each half and put them together and we've created what's known as
a subkey which is 48 bits.
Cool right.
Now let's get back to our data.
We're going to perform what's known as a Feistel function.
It works kind of like this.
We're going to take the 64 bits and split it into two 32 bit halves.
We then set one of the halves aside and we're all going to work on this one right here.
So we're going to expand this half into a 48 bit chunk of data using an expansion function.
We're then going to apply an X or function of this using the subkey we've already generated.
Next we're going to use what are called X-boxes indeed X-boxes take in 64 bits and output for bits.
There are eight different boxes and each one gives a different forbit output.
So we apply the eight S-box to the data creating a 32 bit output and then we're going to do what we
call a final permutation.
We then put the two 32 bit chunks back together but backwards.
And that completes a single Feistel function.
That was fun.
So let's do it again.
We'll shift a few bits on the subkey we'll split the data set aside we go ahead and expand it.
We are the subkey.
We've applied this S-box is one more time we throw in a permutation we put the data back together get
the idea.
Great let's do it 14 more times Wow seems a little complicated right now.
Keep in mind that what you just looked at was a very very simplified overview of Des's itself.
It's actually a lot more complicated than that but that will at least get you to the idea that they
cool that we can go through this wildly complicated process and using the same key we can decrypt basically
reverse the process and and encrypt.
We can go either direction it's absolutely fascinating.
Now as wildly complicated as that was there were a couple of issues with Dell's.
Number one the big problem with Des's more than anything else was its short key now 56 bits.
Sounds like a wonky to you and me but in reality it's actually kind of short and it allowed it to become
exposed to certain types of attacks.
So by the early 1990s people were saying that we could hack Des's and now in the post 2010 2020 not
that far away Des's can be hacked in certain circumstances.
So even way back in the 90s they started to come up with alternatives to the alternatives you may see
one of them is called Blowfish.
And the other one is called Triple Des's.
Now the thing I want to stress to you is that what we're talking about symmetric block encryptions there
are three things we tend to talk about more anything else we talk about the key size how long the key
is we talk about the number of rounds how many rounds does it go through in its encryption process.
And then we also talk about the block size.
So let's go through Blowfish and trippled as compared to D.S..
OK so let's go ahead and put DSN we know D.S. is a block cipher.
Now it uses a 64 bit block size.
It runs 16 rounds with the key size of 56 bits.
That way I know we say 64 but we take at 8 bits for overhead so it's really 56 bits now.
Triple Des's was also a block encryption also with a 64 bit block size.
It also had 16 rounds.
But basically what it did is it repeated the days process three times so you had 3:56 bit key.
So in essence we had 168 that key Blowfish had a 64 bit block size.
It ran 16 rounds.
And the key size was variable.
It could be as low as 32 bits as high as 448 bits.
By the early 1990s it was obvious to the United States federal government that Des's was a very good
Blowfish wasn't under their control and triple Des's was really just kind of patched together.
And so the National Institute of Standards in the very late 1990s and continued into the early 2000s
started a big competition.
They called it a competition but it was really almost more of a like a like a conference like a big
get together because we'd have people from the private sector in the public sector and from academia
all submitting these new symmetric block encryptions which were going to replace all this stuff and
they kind of work together so they called it the competition but there was a lot of teamwork and we
started off with a few hundred submissions and they got a down to like 12 then they got it down to five.
And then from the top five they basically took a vote because all the top five were very very good.
And one particular algorithm called rainfall became the new what's now known as the Advanced Encryption
Standard in the early 2000s.
Now the Advanced Encryption Standard or alias.
Yes of course it's a symmetric block encryption.
But what's most important about it is that it is even though it's well over 10 years old in fact maybe
getting closer to 20 These days it is in essence still unhappy of.
Knock on wood on that.
And it is an incredibly powerful symmetric encryption.
Now I'm not even going to bother to try to show you the details of how ABS works on the inside.
So let's just put that on our chart so that we know the key sizes and we know the block sizes and we
know the number of rounds.
So yes obviously as a block algorithm it has a block size of 128 bits.
Now let's jump over to key size because you can have three different key sizes.
You can have 128 192 or 256 bit keys.
Basically the bigger the key the more secure you are.
And now going back to round's we would have either 10 12 or 14 rounds depending on whether you had 128
192 or 256 bit key sizes.
Now there is one exception to the world that sounds pretty much dominated by symmetric block ciphers.
There is another way to do it using what we call streaming ciphers.
So instead of taking a chunk encrypting that and sending off taking a chunk encrypted it and sending
it off you can do what's known as streaming in a streaming scenario.
What you'll do is you'll have as each bit comes out of your through a wire or something like that so
we use this in communication a lot.
It literally will encrypt one bit at a time randomly making it a 1 or 0.
Well it's not random it's called pseudo random but it will create it in such a way that it literally
encrypts one bit at a time.
So to make this easy for us there really is only one type of streaming symmetric encryption out there
and that's known as RC 4.
So let's throw him on the list too.
So RC 4 is a streaming type of encryption.
It really doesn't use block sizes it's one bit at a time.
And because it only gets to see that bit once there's only one round when you're using that stream and
kept encryption and the key size and this is often the case if you don't have a lot of rounds you often
want to use really big keys.
So the key size can be as small as 40 bits and can go up to 2048 bits.
You have gone through a lot of different types of symmetric encryptions here.
Now the thing about algorithms you need to understand is that at no time are you going to have to set
these things up.
Really we live in a world where we have these already programmed it and we're going to cover this and
other episodes.
But to give you one example we've probably all done wireless networks.
If you set up your wireless access point to use WPA encryption you're actually using RC for Whereas
if you set up for WPA too you're actually using abs encryption.
So it's not so terribly important to me that you know the real complete detail difference between say
Des's and triple Des's what is important is that you have a rough understanding of these types of encryptions
you need to understand that they are all symmetric they all share the same key.
And then also they can either be block most of them or block and with the exception of RC 4 can be streaming.
So you're gonna want to take a moment to memorize that type of stuff.
But the cool part is is that while we understand that we take advantage of systems that are pre-built
in.
So when we make choices at a higher level it's going to help determine the type of encryption that we're
going to use.