-: Secure Processing.
In this lesson, we're going to talk about secure processing
and a couple of key concepts associated with it.
Now, when we talk about secure processing,
this is a mechanism for ensuring the confidentiality,
integrity, and availability of software code and data
as it's executed in volatile memory.
Because after all, we're going to take data
off of our hard drive or off of our network
and we're going to put it into RAM
and then from RAM into our processor.
And all of that time going from RAM to the processor
or while it's stored in RAM,
it has the potential for it to be modified
or for it to be stolen or for it to be not available.
And so by doing secure processing,
we want to harden that area of this process.
Now, there are lots of ways to do secure processing,
but we're going to focus on five of them in this lesson.
We're going to talk about processor security extensions,
trusted execution, secure enclaves,
atomic execution, and bus encryption.
The first one is processor security extensions.
Now, these are low-level CPU changes and instructions
that enable secure processing.
And these are built into your microprocessor.
Now, they're called different things
depending on if you're using an AMD or an Intel processor.
If you're using an AMD processor,
this is known as Secure Memory Encryption (SME)
or Secure Encrypted Virtualization (SEV).
On the other hand, if you're using Intel processors,
you're going to be using Trusted Execution Technology or TXT
or Software Guard Extensions (SGX).
All four of these things
are a form of processor security extensions
and for the exam,
that's pretty much as deep as you need to go.
The next thing we want to talk about is trusted execution.
The CPU's security extensions invoke TPM
and a secure boot attestation
to ensure a trusted operating system is running.
So, any time we want to boot up the system,
we want to make sure that we are using that trusted firmware
using UEFI and using TPM and secure boot
to tell us that this operating system that's being booted
is something we trust.
This is very common inside the world of using Microsoft
on an Intel or AMD processor set.
Next, we have a secure enclave.
Now, a secure enclave is an extension that allows
a trusted process to create an encrypted container
for sensitive data.
This will help us prevent things
like buffer overflow attacks,
and typical application usage here,
we'll be able to store encryption keys
and other sensitive data inside of the secure enclave.
Once we have that trusted operating system,
we can then create the secure enclave
for us to be able to store that data within.
The next one we want to talk about is atomic execution.
Now, there are certain operations
that should only be performed once or not at all.
For example, initializing a memory location.
This should only happen one time, right?
And so, once you've initialized it, that should be it.
Well, the idea of atomic execution
is there are these extensions in place
to make sure somebody can't reuse or hijack
an atomic execution operation
like doing a memory initialization.
This can help you prevent buffer overflows
and raise conditions
by being able to control these processes
and again, this is something that's built into
those processors these days.
And finally, we have bus encryption.
Now, bus encryption is data that is encrypted
by an application
prior to being placed on the data bus.
This will ensure that the data being sent over the network
or over a bus is going to be protected
because it's going to end up an encryption.
Now, for this to work, we have to ensure
the device at the other end of the bus
is trusted to decrypt that data.
Now, what does this look like in the real world?
While I've had this happen to me myself
as I've plugged in something like my Roku device to my TV.
If I have my Roku device
and I have a cheap HDMI cable connecting it to my TV,
sometimes they can't do the three-way handshake
that's required for HDCP.
Now, HDCP was a copyright protection thing,
so it encrypts the data going from your device to your TV.
And so, when that handshake happens,
if it doesn't happen properly,
you'll get something that looks like this,
HDCP Unauthorized.
And this is because the bus encryption failed.
The TV or the Roku didn't trust each other
and so you have to unplug the cable,
plug it back in and try again
and then eventually, they'll make the three-way handshake
and now you can watch your TV.
That's the idea here.
This is a form of bus encryption that most of us use
and we may not even realize we're using on a daily basis.