Part 10 - Crypto Definitions

Video Activity

This lesson covers crypto definitions and shows participants the formula and algorithms behind these definitions. Also covered are the elements of cryptography and what makes an algorithm as well as a key desirable.

Join over 3 million cybersecurity professionals advancing their career
Sign up with

Already have an account? Sign In »

1 hour 39 minutes
Video Description

This lesson covers crypto definitions and shows participants the formula and algorithms behind these definitions. Also covered are the elements of cryptography and what makes an algorithm as well as a key desirable.

Video Transcription
now, as I mentioned before, I try to teach cryptography like you have absolutely no experience with it. And I know many if you do, but I also know that there are a lot of you that have experience in other of the domains of C I s S P. And don't consider yourself cryptography experts by any stretch of the imagination. So I want to kind of, um,
take a few moments and just start from the bottom floor. And let's talk about just basic ideas
and make sure we're all on the same page when we use these terms. So I've got a very conceptual formula here. And the formula is that plain text plus something called an initialization vector plus an algorithm and an algorithm can also be called a cipher.
Cipher is the same thing as an algorithm and algorithm is the same thing is a cipher. There's never a reason I would say algorithm instead of cipher or vice versa
other than just to mix it up a little.
Okay. Ah, So an algorithm or cipher and then we also take a key, and all that together is going to give us a cipher text so I want to go through and I want to define these terms and make sure they make sense. Okay, So plain text
right off the bat, we understand what playing text is. It's unencrypted. Text could also be called clear text, but it's it's the message that we want to send its the text that were wanting to protect. Now the next thing is an initialization vector. And to give you an idea about an initialization vector,
what it does and what it is and why it's important. Um,
for those of you that have in p three players,
okay, and I'm actually gonna come to the next slide, you don't need to worry about the next slide just yet. So before the initialization vector to make sense of what this is and the kind of help understand if you take, um, for example, an MP three player and I know many of you do have MP three players and one of the things that we do
is we put the MP three player on shuffle or we randomize.
You know, I've got, like, 800 songs on my iPod, and every time I played, if I started the first track, I'd get bored. Not only ever hear the 1st 10 songs, so we shuffled. We ran the mines. But even if I have all these songs and I shuffle
for some reason, that same annoying song I don't even know why it's on my iPod in the first place seems to pop up more than others. And I'm not kidding about this. I actually down loaned my iPod to a friend of mine who was driving to Canada.
She downloaded the soundtrack to the Broadway musical
onto my iPod.
Now I'm driving down the road. I'm feeling kind of hip for somebody who's over 40 and let the stoplight at the Black Eyed Peas go out and kind of feeling it. And then all of a sudden the sun will come out. Tomorrow comes blasting through my radio speakers.
you know the question, then being I've got all of these songs, it's all random. Why would some songs come up more than others? Why does it seem like I don't have good, true random annexation? Well, I gotta tell you the truth, this isn't actually the algorithm or the mechanism that that MP three players use but this will just kind of give you an example.
So let's take some random numbers, okay? And I promise you these air random, they just
popped into my head and I jotted them down. So 7523494 truly random numbers just occurred to me.
Now, let's say with our iPod that we always started zero track and we add seven. Okay, so now we're on the seventh track, Then we add five. All right, We're on the 12th track. Minus two were at the 10th track. Plus three were on the 13th track plus 4 17
plus 9 26 track minus 4 22nd track. So we've got these random numbers and on performing random math. I just kind of threw those in there as well.
But the problem is, if we always started track zero, then we don't get randomness. But what if we started track 27 thence track 33 the next time and track 800 to the next and tracked 47? And if we modify our if we randomize the starting point,
then we had randomness to an already raining process,
and randomness is good when it comes to cryptography. So our golden hair let's randomize where we start. That makes our random process even more random,
randomly speaking.
So that's a good thing. If you've ever heard people talk about passwords and talk about salting passwords or using a seat, it's exactly the same idea is let's take this password
and combined some other random information with it to increase its complexity. Okay, we can talk about that more when we get to talking about hashing and passwords and what we do there. But ultimately,
the initialization vectors job is to add randomness at the start, and one other point there a, um, and a system computer can't just come up with a random number, you know, whereas you and I could go 17,433 a computer can't do that.
So instead,
what the initialization vector comes from is it's actually something called a pseudo random number,
and you will never guess what generates a pseudo random number.
Wait for it,
wait for it.
It's called a pseudo random number generator. Yes, yes, it is. And basically that idea of being a pseudo random number, it looks like it's random it quacks like it's random. It walks like it's random, but it's not random. So maybe it could be based on CPU clock cycles, internal temperature,
various variables coming from all sorts of different directions.
So essentially it feels very random. But it has to be based on something ultimately, and it's usually something very complex that wouldn't be able to be imitated or predicted.
Okay, so that's your initialization vector.
Next, let's talk about the algorithm.
Uh, and I mentioned to you all that I am from North Carolina.
I am the proud product of the North Carolina public's assistance 49th and Nation baby, who
in our state motto,
at least we're not South Carolina.
I spent 12 years in the North Carolina public school system, and what you see in front of you, these air, all the math functions I've worked. That's all the math I know in this entire world. I can take any number and add to I can take any number of subtract two.
I can multiply by to divide by two,
take the square root of a race to the power of two. But that's all the math. I know that's my algorithm.
So the algorithm, when we talk about an algorithm, it's the collection of all the math functions that can be performed.
Okay, so in this case, I only have six very basic Mac out math algorithms or math functions. Rather, that's not very desirable. So when we talk about an algorithm there several things that we want from it, Um and we'll talk about theres a 2nd 1 thing I want to mention.
So ultimately everything comes down into ones and zeroes, right? Ultimately, whatever it is, whatever images,
ah, a series of numbers. So
in certain algorithms, the series of ones and zeros air chunked into what we call blocks. This is a block algorithm, and the block might be 64 bits, and each block goes through Siri's of thes math functions. So
this block of data meant good function. One where this number is
eyes taken into is at two. In the function six, the square root is taken up, but ultimately, the block of data goes through series of math functions. How many math functions and in what order is determined by the cute.
Okay, so the algorithm is the collection of math. The KIIS the instruction on how to use the map.
So when we do talk about our algorithm there several things that are desirable. First of all, we want good, complex math.
Nothing about Kelly's algorithm is complex. It all. It doesn't matter how longer complex the key is. If my math is this week, it'll be broken like that. There are a lot of things that are significant in cryptography more than just the length of the key. So from our algorithm,
we want what's called confusion
and confusion means good strong math
for substitution because at each function there's a substitution made for what waas and then what is after the function has been applied, so confusion means complex substitution.
Okay, confusion. We often hear about diffusion as well. Confusion and diffusion diffusion means
plain text is interspersed with the cipher text, and that just adds to the complexity.
There's also something called an avalanche. I doubt that that would be testable, but the idea there is a change in one piece of plain text would result in multiple changes in cipher text, and that makes it more difficult if somebody's trying to break the algorithm and they're changing one letter at a time.
It's not clear where the change is effective in the cipher text because many places erupt.
That's called Avalanche. There's also something called permutations in another word for permutation rounds of boxing. Match has 12 rounds,
so there's a cipher called Dez that encryption standard. We don't use it much today, but it was huge in the eighties and early nineties. And what desde if wasn't chunk its status into 64 bit blocks, and it would put each block of data through a series of math functions than it would do it again
and again and again.
So essentially, what would happen is Dez would encrypt each block of data 16 times. There were 16 permutations now does got broken, and we went from desk to triple this. What triple does does is it triples deaths. So each 64 bit block now goes through
48 permutations, and you can just think about what effect that would have on the processing
triple. Dez is a dog when it comes to processor utilization,
all right, and then the last desirable quality quality of an algorithm. We would like the algorithm to be open and that comes to us from a gentleman named Kirk off. This is Kirk offs principle.
And Kirk office felt very close to the way I have it on screen.
Very close. Um, Kirk off said they're two pieces that are used for secrecy.
The algorithm in the keep
Kharkov says if you keep the key secret, the algorithm can be open. And not just can the algorithm be open. But the algorithm should be
Well, how many of you did not go to North Carolina public school systems?
Worse now, hairline.
I am. Imagine that's quite a few of you out there.
Okay, so maybe you know some better math than I do.
All right? Help me out. Help me make this more complex. The more people that can contribute to the algorithm, the more people that can help me build on it, help me break it down. But then put it back together. Stronger the better. And that's really the theory behind
the entire community that pushes for openness. Open algorithms, open source code open operating systems.
You know, the idea is, the more people looking at it, the better.
I'm gonna pause there just for a second, because um,
the I S C square
organization stands on the side of openness very firmly. As a matter of fact, you know, I've seen things that they put out that essentially say that proprietary, um, venders rely on what's called security through obscurity, meaning, If you can't see it, you can't break. You can't see my
house key
even though it's under the mat so you can't get in.
So they take a stance that open is betterthan closed.
I will tell you.
In my opinion,
well written code is well written code, whether it's open or closed.
So, you know, I kind of take a little bit of exception with that argument. There is some very good code out there that is close source. They don't rely on security through obscurity. They rely on good, well written code.
And, you know, if you followed the breach with open SSL, the fact that something is open does not guarantee peer reviews happening. Okay, so I'm not trying to go off on a tangent. But the point I want to make here is for the C. I S S P exam. We believe in Kirk offs principle. We support the principle of openness.
But there are many organizations and entities that don't. The government doesn't follow Kirk offs principle. They keep their algorithms
hidden and protected, so I don't think it's as clear as cut it. Clear cut is open is good closed as bad. But that's just something to chew on. Food for thought there all right. But ultimately, as we go back and just pop back here, we have the plain text.
We start with that initialization vector to add randomness. We have a Siri's of math functions and the instructions on how to use those math functions.
All of those together give us a cipher text. Okay, so hopefully that's a good introduction to some of the terms will pick up and get into some more concepts as we move forward.
Up Next

The art of writing or solving codes. Why do I need this certification? Our online lifestyle requires governments, the military, corporations, and consumers to properly protect their information from prying eyes.

Instructed By