Hello and welcome to this fundamentals of cryptography, courts and the previous video, we started
out with a very high level introduction to symmetric key encryption, talking about block cyphers,
stream ciphers, et cetera.
In this video, we're going to dive a little bit deeper and talk about some of the internal details
of some of the more common symmetric encryption algorithms and use today.
And so let's take a look at this overview.
We're going to start out by talking about the advanced encryption standard A-S, which is probably the
most famous and widely used, symmetric key encryption algorithm that is a block cipher.
After that, we'll talk briefly about the security of A-S, always important with cryptography, knowing
whether the algorithm that you're using actually is secure against exploitation or maybe leaking crucial
information about your sensitive data being secured by the algorithm after A-S.
We're going to dive into reverse cipher for our C4, which is probably the most famous stream cipher
in use today.
Talk about what it is.
Some of its history and then dive in to its security and discuss why you have to be careful when using
our C4 in your application.
However, if it's used properly, perfectly secure and legitimate for use.
And so the advanced encryption standard and the process that created it is one of the best examples
of following KURK offices law that avoiding security, the obscurity.
And remember, that law says that everything about encryption algorithm should be assumed to be publicly
known.
With the exception of the secret key.
And so the advanced encryption standard was designed to replace the data encryption standard, which
was aging out at the time.
And so DHS was the official encryption standard of the U.S. government.
And it was perfectly fine, except for the fact that the key length was too short as computers got more
and more efficient, had additional processing power and were faster, it was possible to perform a
brute force search over the entire Des's key space, making it very easy to retrieve the encrypted message.
Does it still use sometimes today in the form of triple devs where you perform three different rounds
of Des's with different secret keys to deal with this key space issue?
However, since Dez wasn't designed for that, it's not efficient.
And there are better alternatives.
And one of these is A-s.
And so A-s was actually selected as the result of a worldwide public contest.
The National Institute of Standards and Technology, which is the government institution responsible
for standards and technology, put out a call for proposals for a new encryption standard.
And they received 15 different applications.
And so these applicants then were published widely and every cryptographer in the world pretty much
spent time looking at the applicants, arguing over which ones were better or worse and trying to break
them.
And there were a couple of different conferences over this, a multi-year period where all the cryptographers
get together, talk and collaborate.
And some of the algorithms were broken even before the first conference occurred.
And so in the end, one of the algorithms which eventually was named a yes, was selected.
And A-s has three different versions.
A yes, one twenty eight, one ninety two and two fifty six, each of which use a 128 bit block size
but have different numbers of rounds of encryption.
And so the image on the right here shows a visual representation of a single round of the A-S algorithm.
And so you start out at the top, you have the previous state, you go through these sub bytes operation,
which is Look-Up Table implementing.
Galois Field Mathematics, that lookup table sub bytes is also called an S box, and actually the one
used in A-s isn't the one from the original proposal.
The reason why is during the A-S contest, the NSA had a before it would approve the selection of a
yes.
Said you're not allowed to use this as box.
You have to use this other one, which made a lot of people suspicious.
For a while they were wondering, did the NSA deliberately break A-s?
It turns out that the NSA simply knew about a crypto analytic technique called differential cryptanalysis
for breaking a cipher.
And the original s box was vulnerable to this technique.
So they built a new one that wasn't vulnerable.
And this was a mystery until several years later when differential cryptanalysis was discovered in the
public sector as well.
And people look back and they're like, oh, that's why they changed it.
And so after sub bite's, you do shift rows.
Notice that these are bit shifts, as we talked about in an earlier video.
Go through that a mixed columns is another operation.
And then finally add round key, which involves X or operations with B round key, which is derived
from the encryption key one for each round.
And so that Dair derived round key is the reason why shorter on key A-S variants like 128 only have
ten rounds of encryption, while longer one like 256 has 14.
You can get more key material out of a longer key.
And so definitely don't need to understand all the internals of a yes.
But it's interesting to see here how it works at a high level and see some of those mathematical operations
we talked about in earlier videos showing up in an algorithm that probably most or all of us use on
a daily basis, whether we know it or not.
And so now let's talk about the security of a yes.
So A-s is over 20 years old now.
And throughout those 20 years, there probably hasn't been a month or maybe not even a week that's gone
by where at least someone in the world hasn't been analyzing it, trying to find a way to break it.
And the best real world attacks against a U.S. have minimal impacts on its security.
And when I say real world here, I mean that there are attacks against shorter variations of A.D.s,
maybe using a fraction of the full number of rounds.
There've been ideas for attacking, say, for round a yes or six around a yes, but nothing that really
uses all 10 to 14 rounds of the algorithm.
And so the best known attack is about four times faster than a brute force key guessing attack.
And so it requires a two to the one twenty six point two to one ninety point two or two to two fifty
four point five operations for each of the algorithms and also many, many terabytes of stored data
to perform.
And for reference, they're about two to one hundred and eighty six atoms in the Knowns current solar
system that we live in.
And that's atoms pretty small.
And so for the larger algorithms, it would you would need to run as many operations or really more
operations than there are atoms in the solar system to perform a brute force attack using the best known
attack against a yes.
And so right now, nothing can break A.D.s.
We just simply do not have the computational resources necessary to accomplish that.
And so now let's switch gears a little bit and talk about Rivette Cipher for RC four.
So Ron Reversed is fairly famous cryptographer.
He's created a number of cryptographic algorithms.
One hint for this is the fact that this is the fourth reversed cipher.
Not one or two.
And so he's created several algorithms when it was created.
RC four was a trade secret of RSA Security, which is a company that her best helped to found.
And it's important to know with trade secrets that there's no actual protection of anything.
That's a trade secret.
By law, they're supposed to protect yourself.
Unlike a copyright or trademark, however, the details of the cipher were publicly leaked in 1994.
And so it's possible to use R C for today.
However, the actual phrase are C4 or Rivette Cipher four is copyrighted or trademarked by RSA security,
meaning that technically you can't use that phrase.
And so often it's called ask for for a legit R.
C for.
And so how are C works.
It's a stream cipher is it generates a key stream from a 40 to 2048 bit secret key.
And what that means is you can choose the number of bits of the secret key based off of your application,
which is useful because the longer the key, the harder it is to brute force.
But also the less efficient the algorithm is.
And so you can balance that need for security versus need for usability.
And as a stream site for that, the plain text is X sored with that key stream during the encryption
algorithm.
And at the other end, since this recipient has that same secret key, they can generate that same key
stream using the RC four algorithm.
And so then they can xor that cipher text that they've received with the key stream they generate and
receive the original plaintext.
Remember when we talked about XOR operations, if you X or two of the same thing together, it's always
zero.
And if you X or anything with zero, you get back what you put in.
So the fact that the cipher text X soared with the key is the plain text X soared with the key X sored
with the key means that you end up with just the plain text.
And so from a security perspective, RC four isn't perfect.
It contains a few different information leaks.
One of the issues is that the first few bits of the output are correlated with the secret key, meaning
that those first few bits of output, if you know the plain text and can use it to determine the key
stream.
Those first few bits of the key stream could make it easier to guess the secret key use to generate
it.
And so that's a problem, but not an insurmountable one.
You can use our C for as long as you discard the first several bits of the key stream.
And so sometimes you might see our C4 referred to as RC four, followed by a number, another number.
And that number is just the number of bits that are discarded before they begin using the key stream
for encryption.
And so another issue with our for arose from its use as part of tea, alas, transport level security,
which is used for encrypting data on the Internet.
The difference to an age TTP and its TTP s is that use of tearless and so into last RC four was used
for encrypting passwords.
However, a crypt analytic attack against the algorithm demonstrated that the complexity of a brute
force attack against our C4 was as low as two to the twenty six for encrypted passwords.
And while two of the twenty six is a big number, it's way too small to be secure against modern computers.
And so the use of our C4 in that fashion and t less has been discontinued.
So it's certainly a usable algorithm still, but it needs to be used with care and in certain applications
what was previously used.
It's no longer considered usable.
And so, just as a quick recap in this video, we talked about two of the more famous symmetric key
algorithms, the advanced encryption standard, or A-s and Rivette cipher for our C4 and the security
associated with each of them.
And the remaining two videos in this section on symmetric key encryption.
We're going to talk about some of the applications of symmetric key encryption in the real world.
Thank you.