1
00:00:00.05 --> 00:00:02.07
- [Instructor] In order to
most effectively communicate

2
00:00:02.07 --> 00:00:05.06
throughout this course, we
need to start our journey

3
00:00:05.06 --> 00:00:10.04
by level setting on some basic
information and definitions.

4
00:00:10.04 --> 00:00:12.09
As such, let's start with understanding

5
00:00:12.09 --> 00:00:15.06
what cryptography is.

6
00:00:15.06 --> 00:00:18.02
Cryptography, as previously mentioned,

7
00:00:18.02 --> 00:00:20.05
is the study of secrets.

8
00:00:20.05 --> 00:00:22.04
Most of cryptography entails

9
00:00:22.04 --> 00:00:25.01
very advanced mathematical functions

10
00:00:25.01 --> 00:00:27.05
that are used to secure data.

11
00:00:27.05 --> 00:00:30.03
As such, it is important to discuss

12
00:00:30.03 --> 00:00:33.03
the first rule of
cryptography for developers,

13
00:00:33.03 --> 00:00:37.00
and that is to never roll your own crypto.

14
00:00:37.00 --> 00:00:39.02
Now I don't say this as an insult.

15
00:00:39.02 --> 00:00:41.06
You may be brilliant mathematician

16
00:00:41.06 --> 00:00:43.09
and cryptography specialist,

17
00:00:43.09 --> 00:00:46.02
but as a general rule of thumb,

18
00:00:46.02 --> 00:00:48.06
you should rely on libraries
that have been vetted

19
00:00:48.06 --> 00:00:51.08
and adequately tested and maintained.

20
00:00:51.08 --> 00:00:55.04
The sole purpose of these
algorithms is to hide data,

21
00:00:55.04 --> 00:00:59.03
sometimes in plain sight,
from a would-be attacker.

22
00:00:59.03 --> 00:01:04.00
As such, the two most common
algorithm classes used

23
00:01:04.00 --> 00:01:06.07
are encryption and hashing.

24
00:01:06.07 --> 00:01:11.00
We will go into these functions
in much more depth later.

25
00:01:11.00 --> 00:01:13.01
Let's talk about a few key terms

26
00:01:13.01 --> 00:01:15.07
you will need to know for this course.

27
00:01:15.07 --> 00:01:18.04
The first is cipher text.

28
00:01:18.04 --> 00:01:21.06
This is the output of
an encryption operation

29
00:01:21.06 --> 00:01:24.06
given a key and plain text.

30
00:01:24.06 --> 00:01:29.08
It is also the data that is
fed to a decryption function.

31
00:01:29.08 --> 00:01:33.02
The key is either a single piece of data

32
00:01:33.02 --> 00:01:35.08
or a correlated pair of data that,

33
00:01:35.08 --> 00:01:40.05
when input into an encryption
function with plain text,

34
00:01:40.05 --> 00:01:43.05
will yield the cipher text output.

35
00:01:43.05 --> 00:01:47.02
The key is the piece of
data that must be secured,

36
00:01:47.02 --> 00:01:51.06
as often the actual algorithm
is publicly available.

37
00:01:51.06 --> 00:01:55.07
The plain text is the data
that must be hidden from view

38
00:01:55.07 --> 00:01:59.04
through the use of a cryptographic
encryption operation.

39
00:01:59.04 --> 00:02:03.03
This is often considered
sensitive data in the real world

40
00:02:03.03 --> 00:02:07.00
that we don't want unauthorized
people from viewing.

41
00:02:07.00 --> 00:02:10.03
The final term we will discuss is salt.

42
00:02:10.03 --> 00:02:13.00
A salt is a random piece of data that,

43
00:02:13.00 --> 00:02:15.03
when added to a hashing function,

44
00:02:15.03 --> 00:02:18.09
provides even more entropy in the output,

45
00:02:18.09 --> 00:02:21.07
making certain attacks less likely.

46
00:02:21.07 --> 00:02:26.00
A good cryptographic hash
should always use a salt.

47
00:02:26.00 --> 00:02:28.06
There are similar values for encryption

48
00:02:28.06 --> 00:02:31.04
that we will discuss when we get there.

49
00:02:31.04 --> 00:02:33.08
Now let's discuss the definitions of a few

50
00:02:33.08 --> 00:02:37.05
of the main operations you
will encounter in this course.

51
00:02:37.05 --> 00:02:40.02
The first is digital signature.

52
00:02:40.02 --> 00:02:43.08
A digital signature is an
asymmetric key function

53
00:02:43.08 --> 00:02:46.09
that verifies the
authenticity of a message

54
00:02:46.09 --> 00:02:49.02
coming from a remote party.

55
00:02:49.02 --> 00:02:52.02
By signing the message
with the private key,

56
00:02:52.02 --> 00:02:54.06
using the public key
to decrypt the message

57
00:02:54.06 --> 00:02:58.05
confirms that the sender
is who they say they are.

58
00:02:58.05 --> 00:03:00.07
The next is encryption.

59
00:03:00.07 --> 00:03:04.08
Encryption in any form is
a way of taking plain text

60
00:03:04.08 --> 00:03:07.07
and converting it to a cipher text,

61
00:03:07.07 --> 00:03:11.08
which, with the correct pieces
of data, can be converted

62
00:03:11.08 --> 00:03:15.01
back into plain text at a later point.

63
00:03:15.01 --> 00:03:17.01
Encryption can be accomplished

64
00:03:17.01 --> 00:03:21.08
using a single shared key
or an asymmetric key pair.

65
00:03:21.08 --> 00:03:24.07
The final function we
will discuss is hashing,

66
00:03:24.07 --> 00:03:27.01
and by hashing we are
specifically referring

67
00:03:27.01 --> 00:03:29.07
to cryptographic hashing.

68
00:03:29.07 --> 00:03:33.08
Hashing allows you to map an
arbitrary-sized set of bytes

69
00:03:33.08 --> 00:03:39.06
into a finite-size of
relatively unique set of bytes.

70
00:03:39.06 --> 00:03:42.08
These three classes for
mathematical algorithms

71
00:03:42.08 --> 00:03:46.02
are where we will focus most
of our time in this course.

