1
1

00:00:00,480  -->  00:00:02,640
<v Jason>Email message security.</v>
2

2

00:00:02,640  -->  00:00:04,440
Earlier we talked about MIME,
3

3

00:00:04,440  -->  00:00:06,330
but there's another extension that we can use
4

4

00:00:06,330  -->  00:00:07,980
known as S/MIME.
5

5

00:00:07,980  -->  00:00:11,790
S/MIME is the Secure/Multipurpose Internet Mail Extensions.
6

6

00:00:11,790  -->  00:00:12,690
And this is the ability
7

7

00:00:12,690  -->  00:00:14,760
for an email to have an encryption standard
8

8

00:00:14,760  -->  00:00:17,610
that adds digital signatures and public key cryptography
9

9

00:00:17,610  -->  00:00:19,980
to traditional MIME communications.
10

10

00:00:19,980  -->  00:00:21,090
Now for this to work,
11

11

00:00:21,090  -->  00:00:23,820
every user has to be issued a digital certificate
12

12

00:00:23,820  -->  00:00:25,740
containing his or her public key
13

13

00:00:25,740  -->  00:00:27,810
in order for them to use S/MIME.
14

14

00:00:27,810  -->  00:00:29,460
Now in addition to that public key,
15

15

00:00:29,460  -->  00:00:31,860
there's going to be a matching private key.
16

16

00:00:31,860  -->  00:00:35,250
Now, this private key has to be kept secret by the user.
17

17

00:00:35,250  -->  00:00:37,080
Nobody else in the world can ever know
18

18

00:00:37,080  -->  00:00:38,610
what their private key has,
19

19

00:00:38,610  -->  00:00:41,010
but that public key is one they should have
20

20

00:00:41,010  -->  00:00:42,930
and share with everybody else.
21

21

00:00:42,930  -->  00:00:44,820
Let's talk about how this works.
22

22

00:00:44,820  -->  00:00:47,970
Let's assume I want to send Mary some information.
23

23

00:00:47,970  -->  00:00:49,920
Well, if I wanted to do that using S/MIME,
24

24

00:00:49,920  -->  00:00:52,950
first, I would have to send Mary my digital certificate.
25

25

00:00:52,950  -->  00:00:56,550
That contains my public key and it validates my digital ID,
26

26

00:00:56,550  -->  00:00:59,040
my distinguished subject name and email address,
27

27

00:00:59,040  -->  00:01:02,850
and then I'm going to sign this message using my private key.
28

28

00:01:02,850  -->  00:01:05,400
After that, Mary is going to use the public key
29

29

00:01:05,400  -->  00:01:08,070
in the certificate to decode my signature
30

30

00:01:08,070  -->  00:01:10,170
and the signature of the CA,
31

31

00:01:10,170  -->  00:01:11,760
which is the authority who signs
32

32

00:01:11,760  -->  00:01:13,470
those public and private keys.
33

33

00:01:13,470  -->  00:01:15,930
And this is going to validate my digital certificate
34

34

00:01:15,930  -->  00:01:17,070
and the digital ID,
35

35

00:01:17,070  -->  00:01:20,190
and then she can decide if she's going to trust me or not.
36

36

00:01:20,190  -->  00:01:21,960
And in this case, she would because she saw
37

37

00:01:21,960  -->  00:01:24,390
that it was validated using the CA.
38

38

00:01:24,390  -->  00:01:25,980
Then we go into the third step,
39

39

00:01:25,980  -->  00:01:28,620
and Mary is going to respond with her digital certificate,
40

40

00:01:28,620  -->  00:01:30,120
which has her public key,
41

41

00:01:30,120  -->  00:01:33,000
and I am going to be able to follow the same process,
42

42

00:01:33,000  -->  00:01:35,460
and I'll be able to start deciding to trust Mary.
43

43

00:01:35,460  -->  00:01:36,480
So at this point,
44

44

00:01:36,480  -->  00:01:39,240
both Mary and I have each other's public key.
45

45

00:01:39,240  -->  00:01:42,390
Now, both Mary and I have each other's certificates
46

46

00:01:42,390  -->  00:01:44,310
in our trusted certificate stores,
47

47

00:01:44,310  -->  00:01:46,800
and this means we both have each other's public keys
48

48

00:01:46,800  -->  00:01:48,030
or a copy of them,
49

49

00:01:48,030  -->  00:01:50,790
so now we can start sending information securely.
50

50

00:01:50,790  -->  00:01:52,770
Let me show you how that's going to work.
51

51

00:01:52,770  -->  00:01:55,050
So now both Mary and I have
52

52

00:01:55,050  -->  00:01:56,940
each other's public key certificates
53

53

00:01:56,940  -->  00:01:59,400
inside of our trusted certificate stores.
54

54

00:01:59,400  -->  00:02:00,300
So at this point,
55

55

00:02:00,300  -->  00:02:03,240
if we start encrypting data with our private keys,
56

56

00:02:03,240  -->  00:02:06,330
the other one can decrypt it using our public keys
57

57

00:02:06,330  -->  00:02:08,250
because we've already done this trade.
58

58

00:02:08,250  -->  00:02:09,630
Let's take a look at how this looks
59

59

00:02:09,630  -->  00:02:11,970
when I want to send an email securely.
60

60

00:02:11,970  -->  00:02:14,250
Now, there's two different ways I can talk about security
61

61

00:02:14,250  -->  00:02:15,480
when I'm sending an email.
62

62

00:02:15,480  -->  00:02:17,880
One is integrity and non-repudiation
63

63

00:02:17,880  -->  00:02:19,770
and the other is confidentiality.
64

64

00:02:19,770  -->  00:02:21,660
Let's take them one at a time.
65

65

00:02:21,660  -->  00:02:24,840
First, we're going to talk about integrity and non-repudiation.
66

66

00:02:24,840  -->  00:02:27,180
Let's say I wanted to send a message to Mary,
67

67

00:02:27,180  -->  00:02:28,530
but Mary wants to make sure
68

68

00:02:28,530  -->  00:02:31,530
that only Jason could have sent this information.
69

69

00:02:31,530  -->  00:02:33,480
Well, to make sure that happens,
70

70

00:02:33,480  -->  00:02:36,300
what we are going to do is I'm going to take my message,
71

71

00:02:36,300  -->  00:02:38,820
and I am going to do a digital hash of it.
72

72

00:02:38,820  -->  00:02:40,080
I'm going to take that hash,
73

73

00:02:40,080  -->  00:02:42,570
and I'm going to encrypt it using my private key.
74

74

00:02:42,570  -->  00:02:44,190
And then I have this plaintext message
75

75

00:02:44,190  -->  00:02:46,560
and this encrypted ciphertext hash,
76

76

00:02:46,560  -->  00:02:49,080
and I send them both over to Mary.
77

77

00:02:49,080  -->  00:02:51,360
When Mary gets it, she's going to use that public key
78

78

00:02:51,360  -->  00:02:53,700
that she just got from me in our earlier exchange
79

79

00:02:53,700  -->  00:02:57,000
from her trusted key store to unlock my private key.
80

80

00:02:57,000  -->  00:02:59,040
Because remember, if you encrypt with private,
81

81

00:02:59,040  -->  00:03:00,750
you have to decrypt with public.
82

82

00:03:00,750  -->  00:03:03,150
You learned this back in your Security+ classes.
83

83

00:03:03,150  -->  00:03:06,120
At this point, we now have a plaintext of the message,
84

84

00:03:06,120  -->  00:03:07,590
which has always been plaintext,
85

85

00:03:07,590  -->  00:03:10,320
and we now have a plaintext of the hash.
86

86

00:03:10,320  -->  00:03:12,060
Mary's computer is going to run a hash
87

87

00:03:12,060  -->  00:03:14,160
against the message itself.
88

88

00:03:14,160  -->  00:03:17,070
She's then going to compare that hash to the one I sent.
89

89

00:03:17,070  -->  00:03:19,890
If those two match, that means this message
90

90

00:03:19,890  -->  00:03:23,250
has not changed during transit, and we have integrity
91

91

00:03:23,250  -->  00:03:25,410
because the hash that I sent her
92

92

00:03:25,410  -->  00:03:28,860
matches the hash that she calculated based on that message.
93

93

00:03:28,860  -->  00:03:31,140
Now, how do we get non-repudiation?
94

94

00:03:31,140  -->  00:03:34,320
Well, what did I use to sign that hash?
95

95

00:03:34,320  -->  00:03:35,940
I used my private key.
96

96

00:03:35,940  -->  00:03:37,440
Who is the only person in the world
97

97

00:03:37,440  -->  00:03:39,030
who has that private key?
98

98

00:03:39,030  -->  00:03:41,730
Me, and therefore, you have non-repudiation
99

99

00:03:41,730  -->  00:03:44,010
because only Jason could have sent this message.
100

100

00:03:44,010  -->  00:03:47,070
Because Jason, me, used his private key
101

101

00:03:47,070  -->  00:03:48,450
to encrypt that hash.
102

102

00:03:48,450  -->  00:03:50,580
That's why using a digital signature,
103

103

00:03:50,580  -->  00:03:53,910
which is an encrypted hash of the digital message
104

104

00:03:53,910  -->  00:03:55,890
and being sent over to the other person,
105

105

00:03:55,890  -->  00:03:58,710
gives you integrity and non-repudiation.
106

106

00:03:58,710  -->  00:04:00,150
But that doesn't stop anyone
107

107

00:04:00,150  -->  00:04:01,530
from actually reading this message,
108

108

00:04:01,530  -->  00:04:03,060
so there's no confidentiality
109

109

00:04:03,060  -->  00:04:06,840
because that email I sent was unencrypted or decrypted
110

110

00:04:06,840  -->  00:04:09,330
the entire time and sent in plaintext.
111

111

00:04:09,330  -->  00:04:12,600
So we need to do something else to give you confidentiality.
112

112

00:04:12,600  -->  00:04:14,970
And that brings us to our second part of this.
113

113

00:04:14,970  -->  00:04:16,740
When we're dealing with confidentiality,
114

114

00:04:16,740  -->  00:04:19,020
let's say I want to send that same message,
115

115

00:04:19,020  -->  00:04:20,580
I'm going to do both of these at the same time,
116

116

00:04:20,580  -->  00:04:22,530
but we're taking the confidentiality part.
117

117

00:04:22,530  -->  00:04:25,410
Now, I'm going to use Mary's public key.
118

118

00:04:25,410  -->  00:04:28,470
I'm going to take my message at the top, my email,
119

119

00:04:28,470  -->  00:04:29,730
and I'm going to encrypt it.
120

120

00:04:29,730  -->  00:04:31,470
Now, I take that encrypted email
121

121

00:04:31,470  -->  00:04:33,150
that's encrypted with Mary's public key,
122

122

00:04:33,150  -->  00:04:35,640
which means even I can't read it at this point,
123

123

00:04:35,640  -->  00:04:37,410
and I'm going to send it over to Mary.
124

124

00:04:37,410  -->  00:04:38,310
When she gets it,
125

125

00:04:38,310  -->  00:04:41,130
she's going to unlock that using her private key.
126

126

00:04:41,130  -->  00:04:43,170
Now, the great thing about this is the only person
127

127

00:04:43,170  -->  00:04:46,200
in the whole world who has that private key is Mary,
128

128

00:04:46,200  -->  00:04:49,170
so she's going to be the one who's able to read that message.
129

129

00:04:49,170  -->  00:04:51,210
Even if they could grab it in transmission,
130

130

00:04:51,210  -->  00:04:53,670
it's going to be encrypted and they won't be able to read it.
131

131

00:04:53,670  -->  00:04:56,220
Now, could they read some part of this message?
132

132

00:04:56,220  -->  00:04:58,470
Yes, they could read the digital hash
133

133

00:04:58,470  -->  00:04:59,910
that I digitally signed.
134

134

00:04:59,910  -->  00:05:00,743
Why?
135

135

00:05:00,743  -->  00:05:02,610
Because I encrypted it with my private key,
136

136

00:05:02,610  -->  00:05:04,470
going back to our last section here.
137

137

00:05:04,470  -->  00:05:06,360
And when I encrypted something with my private key,
138

138

00:05:06,360  -->  00:05:09,270
like that digital hash, anyone in the world can read it.
139

139

00:05:09,270  -->  00:05:11,790
But they can't read the message associated,
140

140

00:05:11,790  -->  00:05:13,410
only the hash value.
141

141

00:05:13,410  -->  00:05:15,120
And that's why we put these two things together
142

142

00:05:15,120  -->  00:05:18,750
by using the integrity and non-repudiation of the hash
143

143

00:05:18,750  -->  00:05:21,990
with the confidentiality of using Mary's public key
144

144

00:05:21,990  -->  00:05:23,160
for the message.
145

145

00:05:23,160  -->  00:05:24,750
By using both of these together,
146

146

00:05:24,750  -->  00:05:26,700
this is going to give you the digital signature of the email
147

147

00:05:26,700  -->  00:05:28,380
for encryption and non-repudiation
148

148

00:05:28,380  -->  00:05:30,450
and the digital encryption of the message
149

149

00:05:30,450  -->  00:05:31,890
using Mary's public key.
150

150

00:05:31,890  -->  00:05:34,860
Now, the email client is going to be able to determine for you
151

151

00:05:34,860  -->  00:05:37,050
if your digital signature is valid,
152

152

00:05:37,050  -->  00:05:39,600
and it will display an icon for you when it does that.
153

153

00:05:39,600  -->  00:05:40,980
As I said in my explanation,
154

154

00:05:40,980  -->  00:05:43,230
when Mary got that first message from me,
155

155

00:05:43,230  -->  00:05:46,590
her machine takes that message, it runs it through the hash,
156

156

00:05:46,590  -->  00:05:48,450
and compares it against the hash that I sent,
157

157

00:05:48,450  -->  00:05:49,800
digitally signed.
158

158

00:05:49,800  -->  00:05:51,930
When it does that, if they match,
159

159

00:05:51,930  -->  00:05:53,940
you're going to see something that looks like this.
160

160

00:05:53,940  -->  00:05:54,773
In this case,
161

161

00:05:54,773  -->  00:05:57,480
you could see it says "Signed by" the person who signed it
162

162

00:05:57,480  -->  00:05:59,820
and it has that little ribbon off to the right side.
163

163

00:05:59,820  -->  00:06:01,920
This means that was a valid signature
164

164

00:06:01,920  -->  00:06:03,360
and everything was good.
165

165

00:06:03,360  -->  00:06:06,210
Now, if Mary's machine went through and checked that
166

166

00:06:06,210  -->  00:06:07,890
and it didn't have a hash that matched
167

167

00:06:07,890  -->  00:06:08,940
the one that was sent,
168

168

00:06:08,940  -->  00:06:10,890
then she's going to see something like this.
169

169

00:06:10,890  -->  00:06:12,840
It's going to be an email with a red X.
170

170

00:06:12,840  -->  00:06:15,210
This is going to tell you that that message was not sent
171

171

00:06:15,210  -->  00:06:16,830
with a digital certificate.
172

172

00:06:16,830  -->  00:06:18,090
And that's the difference here.
173

173

00:06:18,090  -->  00:06:20,370
When you see that little ribbon, you know that that message
174

174

00:06:20,370  -->  00:06:22,170
was digitally signed by that person.
175

175

00:06:22,170  -->  00:06:25,103
When you see something looks like this, it means you don't.
