WEBVTT

00:00.379 --> 00:03.400
>> We're going to continue
to build on this idea that

00:03.400 --> 00:06.344
>> if we take plain texts and
an initialization vector,

00:06.344 --> 00:08.325
>> and an algorithm, and a key,

00:08.325 --> 00:12.070
we will somehow magically
create ciphertext.

00:12.140 --> 00:13.980
We already talked about are

00:13.980 --> 00:15.989
>> what our
initialization vector is.

00:15.989 --> 00:18.525
>> It's going to add
randomness to the process.

00:18.525 --> 00:21.615
The next thing I want to
talk about is an algorithm.

00:21.615 --> 00:23.460
Now if you see this screen,

00:23.460 --> 00:26.265
you can see that we've got
a series of math functions.

00:26.265 --> 00:27.720
Base on my 12 years of

00:27.720 --> 00:29.470
North Carolina
Public School math.

00:29.470 --> 00:30.720
The functions you see,

00:30.720 --> 00:33.249
>> are the only math
functions I can perform.

00:33.249 --> 00:35.970
>> Now, I can take
any number and add 2,

00:35.970 --> 00:38.670
subtract 2, multiply
or divide by 2.

00:38.670 --> 00:40.675
I can raise the power of 2,

00:40.675 --> 00:43.280
take the square root
of 2, but that's it.

00:43.280 --> 00:45.155
I can't do any other math.

00:45.155 --> 00:47.350
This is my algorithm.

00:47.350 --> 00:49.520
An algorithm is just
the collection of

00:49.520 --> 00:52.145
math functions that
can be performed.

00:52.145 --> 00:54.020
We have to remember that

00:54.020 --> 00:55.759
>> no matter how
complex your message,

00:55.759 --> 00:57.650
>> your image, or your data is,

00:57.650 --> 00:59.600
it all comes down to numbers.

00:59.600 --> 01:02.330
It's just a series
of zeros and ones.

01:02.330 --> 01:04.640
Some algorithms will
take that data and

01:04.640 --> 01:07.000
chunk it into blocks
of certain sizes.

01:07.000 --> 01:10.480
Somebody chunk it
into 128-bit blocks.

01:10.480 --> 01:13.525
Each block goes through a
series of math functions.

01:13.525 --> 01:17.000
With each math function,
substitution happens.

01:17.000 --> 01:19.790
For example, when it
goes through function 3,

01:19.790 --> 01:21.335
it gets to multiplied by 2,

01:21.335 --> 01:22.610
and the result of that is

01:22.610 --> 01:25.430
substituted for what
you originally had.

01:25.430 --> 01:27.560
Each of these functions is where

01:27.560 --> 01:30.170
the actual substitution
of cryptography happens.

01:30.170 --> 01:32.360
For that reason, sometimes

01:32.360 --> 01:34.924
instead of refrained to
algorithms as functions,

01:34.924 --> 01:36.140
you'll hear them referred to as

01:36.140 --> 01:39.290
S boxes for substitution boxes.

01:39.290 --> 01:41.480
But this is where the
actual substitution

01:41.480 --> 01:44.120
happens in the algorithm.

01:44.120 --> 01:46.370
Now the problem is, I don't know

01:46.370 --> 01:47.420
how many functions we should

01:47.420 --> 01:49.715
use or the order we
should use them.

01:49.715 --> 01:52.415
That is where our friend,
the key comes in.

01:52.415 --> 01:54.485
A key is going to determine

01:54.485 --> 01:57.210
which functions are
used and in what order,

01:57.210 --> 02:00.230
and how many overall math
functions will be used.

02:00.230 --> 02:03.560
The key contains the
instructions on how to use math.

02:03.560 --> 02:06.905
An algorithm and a key
have to go together.

02:06.905 --> 02:10.775
Now, an initialization
vector is not mandatory,

02:10.775 --> 02:12.815
but it is very helpful.

02:12.815 --> 02:15.410
A lot of times when we
talk about how to encrypt,

02:15.410 --> 02:18.755
we do include the IV,
algorithm, and key.

02:18.755 --> 02:19.790
But honestly,

02:19.790 --> 02:21.604
>> if you only had the
algorithm and the key,

02:21.604 --> 02:23.734
>> you still have encryption.

02:23.734 --> 02:26.420
I will also say for
future discussions

02:26.420 --> 02:27.905
that when I say algorithm,

02:27.905 --> 02:29.840
I could also just say cipher.

02:29.840 --> 02:32.680
Those two words are
really interchangeable.

02:32.680 --> 02:35.585
Now, key is much more
frequently used term,

02:35.585 --> 02:39.015
but an alternative to a key
would be a cryptovariable.

02:39.015 --> 02:40.670
But I will probably never say

02:40.670 --> 02:43.440
that. I will always say key.

