1
1

00:00:00,270  -->  00:00:02,100
<v Jason>Secure Processing.</v>
2

2

00:00:02,100  -->  00:00:05,010
In this lesson, we're going to talk about secure processing
3

3

00:00:05,010  -->  00:00:07,740
and a couple of key concepts associated with it.
4

4

00:00:07,740  -->  00:00:09,660
Now, when we talk about secure processing,
5

5

00:00:09,660  -->  00:00:12,330
this is a mechanism for ensuring the confidentiality,
6

6

00:00:12,330  -->  00:00:15,690
integrity, and availability of software code and data
7

7

00:00:15,690  -->  00:00:17,820
as it's executed in volatile memory,
8

8

00:00:17,820  -->  00:00:19,830
because after all, we're going to take data
9

9

00:00:19,830  -->  00:00:21,810
off of our hard drive or off of our network,
10

10

00:00:21,810  -->  00:00:23,430
and we're going to put it into RAM,
11

11

00:00:23,430  -->  00:00:25,470
and then from RAM into our processor.
12

12

00:00:25,470  -->  00:00:28,020
And all of that time going from RAM to the processor
13

13

00:00:28,020  -->  00:00:30,390
or while it's stored in RAM has the potential
14

14

00:00:30,390  -->  00:00:32,670
for it to be modified or for it to be stolen
15

15

00:00:32,670  -->  00:00:34,350
or for it to be not available.
16

16

00:00:34,350  -->  00:00:35,940
And so by doing secure processing,
17

17

00:00:35,940  -->  00:00:38,550
we want to harden that area of this process.
18

18

00:00:38,550  -->  00:00:41,100
Now, there are lots of ways to do secure processing,
19

19

00:00:41,100  -->  00:00:43,590
but we're going to focus on five of them in this lesson.
20

20

00:00:43,590  -->  00:00:46,110
We're going to talk about processor security extensions,
21

21

00:00:46,110  -->  00:00:49,080
Trusted Execution, Secure Enclaves,
22

22

00:00:49,080  -->  00:00:51,870
atomic execution, and bus encryption.
23

23

00:00:51,870  -->  00:00:54,810
The first one is processor security extensions.
24

24

00:00:54,810  -->  00:00:57,540
Now, these are low-level CPU changes and instructions
25

25

00:00:57,540  -->  00:00:59,460
that enable secure processing.
26

26

00:00:59,460  -->  00:01:01,890
And these are built into your microprocessor.
27

27

00:01:01,890  -->  00:01:03,120
Now, they're called different things
28

28

00:01:03,120  -->  00:01:06,210
depending on if you're using an AMD or an Intel processor.
29

29

00:01:06,210  -->  00:01:08,010
If you're using an AMD processor,
30

30

00:01:08,010  -->  00:01:10,830
this is known as Secure Memory Encryption, SME,
31

31

00:01:10,830  -->  00:01:13,740
or Secure Encrypted Virtualization, SEV.
32

32

00:01:13,740  -->  00:01:16,560
On the other hand, if you're using Intel processors,
33

33

00:01:16,560  -->  00:01:20,340
you're going to be using Trusted Execution Technology, or TXT,
34

34

00:01:20,340  -->  00:01:23,460
or Software Guard Extensions, SGX.
35

35

00:01:23,460  -->  00:01:25,380
All four of these things are a form
36

36

00:01:25,380  -->  00:01:27,240
of processor security extensions.
37

37

00:01:27,240  -->  00:01:28,170
And for the exam,
38

38

00:01:28,170  -->  00:01:30,360
that's pretty much as deep as you need to go.
39

39

00:01:30,360  -->  00:01:33,270
The next thing we want to talk about is Trusted Execution.
40

40

00:01:33,270  -->  00:01:36,300
The CPU security extensions invoke TPM
41

41

00:01:36,300  -->  00:01:38,220
and a secure boot attestation
42

42

00:01:38,220  -->  00:01:40,770
to ensure a trusted operating system is running.
43

43

00:01:40,770  -->  00:01:42,900
So anytime we want to boot up the system,
44

44

00:01:42,900  -->  00:01:45,810
we want to make sure that we are using that trusted firmware,
45

45

00:01:45,810  -->  00:01:49,200
using UEFI, and using TPM and Secure Boot
46

46

00:01:49,200  -->  00:01:51,270
to tell us that this operating system that's being booted
47

47

00:01:51,270  -->  00:01:52,740
is something we trust.
48

48

00:01:52,740  -->  00:01:55,440
This is very common inside the world of using Microsofts
49

49

00:01:55,440  -->  00:01:57,960
on an Intel or AMD processor set.
50

50

00:01:57,960  -->  00:01:59,790
Next, we have a Secure Enclave.
51

51

00:01:59,790  -->  00:02:01,740
Now, a Secure Enclave is an extension
52

52

00:02:01,740  -->  00:02:03,540
that allows a trusted process
53

53

00:02:03,540  -->  00:02:06,210
to create an encrypted container for sensitive data.
54

54

00:02:06,210  -->  00:02:07,470
This will help us prevent things
55

55

00:02:07,470  -->  00:02:09,150
like buffer overflow attacks.
56

56

00:02:09,150  -->  00:02:11,100
And typical application usage here
57

57

00:02:11,100  -->  00:02:12,630
would be able to store encryption keys
58

58

00:02:12,630  -->  00:02:16,230
and other sensitive data inside of the Secure Enclave.
59

59

00:02:16,230  -->  00:02:17,940
Once we have that trusted operating system,
60

60

00:02:17,940  -->  00:02:19,800
we can then create the Secure Enclave
61

61

00:02:19,800  -->  00:02:22,230
for us to be able to store that data within.
62

62

00:02:22,230  -->  00:02:25,110
The next one we want to talk about is atomic execution.
63

63

00:02:25,110  -->  00:02:26,520
Now, there are certain operations
64

64

00:02:26,520  -->  00:02:29,160
that should only be performed once or not at all,
65

65

00:02:29,160  -->  00:02:31,650
for example, initializing a memory location.
66

66

00:02:31,650  -->  00:02:33,570
This should only happen one time, right?
67

67

00:02:33,570  -->  00:02:36,300
And so once you've initialized it, that should be it.
68

68

00:02:36,300  -->  00:02:37,980
Well, the idea of atomic execution
69

69

00:02:37,980  -->  00:02:39,840
is there are these extensions in place
70

70

00:02:39,840  -->  00:02:41,490
to make sure somebody can't reuse
71

71

00:02:41,490  -->  00:02:43,950
or hijack an atomic execution operation
72

72

00:02:43,950  -->  00:02:46,170
like doing a memory initialization.
73

73

00:02:46,170  -->  00:02:48,000
This can help you prevent buffer overflows
74

74

00:02:48,000  -->  00:02:49,200
and race conditions
75

75

00:02:49,200  -->  00:02:50,790
by being able to control these processes.
76

76

00:02:50,790  -->  00:02:52,020
And again, this is something that's built
77

77

00:02:52,020  -->  00:02:54,090
into both processors these days.
78

78

00:02:54,090  -->  00:02:56,250
And finally, we have bus encryption.
79

79

00:02:56,250  -->  00:02:57,840
Now, bus encryption is data
80

80

00:02:57,840  -->  00:02:59,790
that is encrypted by an application
81

81

00:02:59,790  -->  00:03:02,070
prior to being placed on the data bus.
82

82

00:03:02,070  -->  00:03:04,710
This will ensure that the data being sent over the network
83

83

00:03:04,710  -->  00:03:07,110
or over a bus is going to be protected
84

84

00:03:07,110  -->  00:03:08,970
because it's going to have end-to-end encryption.
85

85

00:03:08,970  -->  00:03:09,930
Now, for this to work,
86

86

00:03:09,930  -->  00:03:12,120
we have to ensure the device at the other end of the bus
87

87

00:03:12,120  -->  00:03:14,610
is trusted to decrypt that data.
88

88

00:03:14,610  -->  00:03:16,530
Now, what does this look like in the real world?
89

89

00:03:16,530  -->  00:03:17,910
Well, I've had this happen to me, myself,
90

90

00:03:17,910  -->  00:03:20,970
as I've plugged in something like my Roku device to my TV.
91

91

00:03:20,970  -->  00:03:22,290
If I have my Roku device
92

92

00:03:22,290  -->  00:03:25,200
and I have a cheap HDMI cable connecting it to my TV,
93

93

00:03:25,200  -->  00:03:27,390
sometimes they can't do the three-way handshake
94

94

00:03:27,390  -->  00:03:29,520
that's required for HDCP.
95

95

00:03:29,520  -->  00:03:32,040
Now, HDCP was a copyright protection thing,
96

96

00:03:32,040  -->  00:03:35,190
so it encrypts the data going from your device to your TV.
97

97

00:03:35,190  -->  00:03:36,870
And so when that handshake happens,
98

98

00:03:36,870  -->  00:03:38,100
if it doesn't happen properly,
99

99

00:03:38,100  -->  00:03:39,517
you'll get something that looks like this,
100

100

00:03:39,517  -->  00:03:41,490
"HGCP Unauthorized."
101

101

00:03:41,490  -->  00:03:43,890
And this is because the bus encryption failed.
102

102

00:03:43,890  -->  00:03:46,500
The TV or the Roku didn't trust each other.
103

103

00:03:46,500  -->  00:03:48,210
And so you have to unplug the cable,
104

104

00:03:48,210  -->  00:03:49,770
plug it back in, and try again.
105

105

00:03:49,770  -->  00:03:51,660
And then, eventually, they'll make the three-way handshake,
106

106

00:03:51,660  -->  00:03:53,670
and now you can watch your TV.
107

107

00:03:53,670  -->  00:03:54,503
That's the idea here.
108

108

00:03:54,503  -->  00:03:56,790
This is a form of bus encryption that most of us use
109

109

00:03:56,790  -->  00:03:59,640
and we may not even realize we're using on a daily basis.
