<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gufran Mirza — Writing]]></title><description><![CDATA[I’m a software engineer specializing in building (and occasionally designing) large scale Distributed systems & Softwares]]></description><link>https://gufranmirza.com</link><generator>GatsbyJS</generator><lastBuildDate>Thu, 27 Aug 2026 06:14:48 GMT</lastBuildDate><item><title><![CDATA[No Rule Was Broken]]></title><description><![CDATA[Every control around the browser sees where you went and what bytes moved. Identity tells you whose credentials were used, never who was driving. A human, or an AI agent?]]></description><link>https://gufranmirza.com/blogs/no-rule-was-broken/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/no-rule-was-broken/</guid><pubDate>Wed, 05 Aug 2026 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Disclaimer: The views expressed here are my own and do not represent those of my current or former employers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Why every control sees the request and misses the situation&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Every control around the browser sees where you went and what bytes moved. Identity tells you whose credentials were used, never who was driving. A human, or an AI agent?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;None of them holds the situation: what the page is, who is acting, and why. That gap is where the attacks that matter now live.&lt;/p&gt;
&lt;p&gt;After enough time with policy engines, DLP rules, and the incident write-ups that follow them, I keep landing on the same conclusion:&lt;/p&gt;
&lt;p&gt;The unit of risk is no longer the file.&lt;/p&gt;
&lt;p&gt;And it&apos;s no longer the request.&lt;/p&gt;
&lt;p&gt;It&apos;s &lt;strong&gt;the situation&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The situation, not the request&lt;/h2&gt;
&lt;p&gt;Imagine an analyst signed into Snowflake on a corporate laptop. The credentials are valid. The session is real. The query is &lt;code class=&quot;language-text&quot;&gt;COPY INTO&lt;/code&gt;, which is Snowflake&apos;s own export feature, run thousands of times a day by people doing their jobs.&lt;/p&gt;
&lt;p&gt;Nothing here is malformed. Every field checks out. What no field records is that the credentials were lifted by infostealer malware from an account with no multi-factor, and that the table on its way out is the customer list.&lt;/p&gt;
&lt;p&gt;Mandiant traced &lt;a href=&quot;https://cloud.google.com/blog/topics/threat-intelligence/unc5537-snowflake-data-theft-extortion&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;every incident in the 2024 campaign&lt;/a&gt; to exactly that. Around 165 organizations exposed. Snowflake itself was never broken.&lt;/p&gt;
&lt;p&gt;If you inspect the request afterward, it still does not look alarming. A valid user ran a valid query against a valid endpoint. That&apos;s exactly the problem.&lt;/p&gt;
&lt;p&gt;The dangerous part is not the request. It&apos;s what the request means. A whole customer table leaving at once is a fact about the situation, not about the query. &quot;Bulk&quot; appears nowhere in the bytes. Neither does &quot;customer data.&quot; Neither does &quot;this login was stolen last week.&quot;&lt;/p&gt;
&lt;p&gt;The engine holds the request in full and still cannot reach the one fact that decides the case.&lt;/p&gt;
&lt;p&gt;A lot of the security stack is built around &lt;strong&gt;request-shaped&lt;/strong&gt; thinking. This URL was visited. That file type was uploaded. This pattern matched.&lt;/p&gt;
&lt;p&gt;But the attacks that matter are not request-shaped. They are &lt;strong&gt;situation-shaped&lt;/strong&gt;. A page loads. A prompt appears. Someone reads it and believes it, or something reads it and acts on it. A button gets clicked. A session that was already valid does something it has never done before.&lt;/p&gt;
&lt;p&gt;Each piece is ordinary on its own. The danger only shows up when you hold them together and ask what is going on here.&lt;/p&gt;
&lt;p&gt;Nothing in the stack holds them together. That is &lt;strong&gt;the missing layer&lt;/strong&gt;. DLP sees the bytes. It never sees the situation around them.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The perimeter moved into meaning&lt;/h2&gt;
&lt;p&gt;For thirty years, offense went after code, and defense answered in kind. It worked, because an attack and its intent traveled together. Malware looked like malware. An exploit looked like an exploit.&lt;/p&gt;
&lt;p&gt;Then the ground kept moving. First the binary mattered. Then the network. Then the browser became the work environment, and control moved up into identity, SaaS, extensions, and browser-native DLP. Now I believe the center of gravity is shifting again.&lt;/p&gt;
&lt;p&gt;The mistake is to call this an AI problem. It is more concrete than that. The new perimeter is the moment of the action itself: what the page is, what it is asking for, who is acting, what is about to leave, and whether those things fit together.&lt;/p&gt;
&lt;p&gt;The modern intrusion barely touches a bug. It goes after people and the trust between them.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;ClickFix&lt;/a&gt; talks a user into pasting a command into PowerShell, on a legitimate site the attacker quietly took over. &lt;a href=&quot;https://learn.microsoft.com/en-us/defender-office-365/detect-and-remediate-illicit-consent-grants&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Consent phishing&lt;/a&gt; talks a user into clicking Allow on a real screen, after which Microsoft notes that resetting the password will not help. Golden SAML is one settings change on a domain, made from an ordinary admin console over a properly authenticated session, and it &lt;a href=&quot;https://www.elastic.co/guide/en/security/8.19/entra-id-domain-federation-configuration-change.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;hands the front door to a stranger&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Each one is a sanctioned action, aimed at a harmful end. That is the deeper shift. Attackers are no longer stumbling into same-shape attacks. They are manufacturing them, dressing an intrusion in the clothes of ordinary work on purpose. And they no longer have to do it by hand. An agent driving the browser will do it for them, on the user&apos;s own credentials, the moment a page can talk it into the act.&lt;/p&gt;
&lt;p&gt;That&apos;s why I think this is not a gap in any one product. The tell has moved into meaning, and shape-matching cannot follow it there.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Rules can only describe form&lt;/h2&gt;
&lt;p&gt;Every control in the stack sees a piece of the picture. Pattern and entropy scanners can tell you a string looks like a secret. Useful. Identity can tell you who signed in, from what device, with what factors. Also useful. Reputation and URL filtering can tell you a domain is known bad. Still useful.&lt;/p&gt;
&lt;p&gt;But none of those, on its own, gives you a coherent read on what is actually happening in front of the user. Increasingly, that&apos;s the thing that matters.&lt;/p&gt;
&lt;p&gt;You can watch teams live inside the gap. The standard tuning advice is the same everywhere: narrow your expressions by hand until the noise is bearable, which is a quiet admission that the method is noisy by design. Measured against the SecretBench corpus, these scanners flagged &lt;a href=&quot;https://arxiv.org/abs/2303.06729&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;84.5% false positives&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Tighten the rules and real work stops. Loosen them and the signal drowns. There is no setting in the middle, because the missing piece is not a setting.&lt;/p&gt;
&lt;p&gt;That isn&apos;t really a criticism of DLP. It&apos;s a statement about the vocabulary. A rule can name a URL, a method, a file type, a signed-in user, a device, and whatever a regular expression can pull out of the bytes. That is the entire dictionary.&lt;/p&gt;
&lt;p&gt;Every rule anyone has ever written is built from those words, and all of them describe the form of a request. Not one of them describes what the request is for.&lt;/p&gt;
&lt;p&gt;So the administrator gets two settings for any action, block or allow, and no way to write the only rule that would actually be safe. &lt;em&gt;Allow this, unless it means something dangerous.&lt;/em&gt; Block paste into ChatGPT and people move to a personal account in the same browser. Allow it and you have no idea what left.&lt;/p&gt;
&lt;p&gt;When a valid session exports a table, or a real consent screen hands over a mailbox, knowing who signed in is necessary information.&lt;/p&gt;
&lt;p&gt;It is no longer sufficient.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The model advises, the engine decides&lt;/h2&gt;
&lt;p&gt;The missing layer is the thing that holds the situation. I think it has to do four things well, and the fourth is the one the other three depend on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First, it has to read meaning rather than bytes.&lt;/strong&gt; Not another matcher over the payload, but a judgment about the moment. Is this actually customer data. Is this page actually asking for more than it should.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second, it has to know who is acting, and on whose authority.&lt;/strong&gt; A person exporting a table, an agent doing it because they were asked, and an agent doing it because a page told it to are the same request three times over. Same session, same credentials, same bytes. Only the provenance differs. Identity does not answer this. It tells you whose credentials were used, and nothing about who was driving.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Third, it has to stand where the situation is visible, and run where the data already is.&lt;/strong&gt; A network filter sees encrypted traffic and little else. A server-side audit log sees the action after it is done, one application at a time. The browser sees the page as rendered, what is acting on it, and who is signed in, in the moment, across every site including the long tail no ruleset reaches.&lt;/p&gt;
&lt;p&gt;If you want to weigh a situation you have to stand where the situation is. That is the browser or nowhere.&lt;/p&gt;
&lt;p&gt;And a tool whose job is to stop data from leaving cannot work by making the data leave. Ship every page to a cloud model for a verdict and you have built the exact leak you set out to prevent, with surveillance on top. So the reading happens on the person&apos;s own machine.&lt;/p&gt;
&lt;p&gt;That used to be impossible. The model was always too large to sit on the machine reading the page. That changed fast. &lt;a href=&quot;https://developer.chrome.com/blog/webgpu-release&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;WebGPU&lt;/a&gt; opened the GPU to web code, quantization packed capable models into a couple of gigabytes, and a browser now runs one at &lt;a href=&quot;https://arxiv.org/html/2412.15803v2&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;around forty words a second&lt;/a&gt;, with nothing leaving the device.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And fourth, it has to advise and never act.&lt;/strong&gt; This is the constraint the whole design rests on.&lt;/p&gt;
&lt;p&gt;Anything that can understand a page can be talked to. Anything that can be talked to can be talked into things. Brave&apos;s researchers showed a hidden note on a page &lt;a href=&quot;https://brave.com/blog/comet-prompt-injection/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;turning an AI browser against its own user&lt;/a&gt;, reading mail and sending it out. It is &lt;a href=&quot;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;the first item on OWASP&apos;s list&lt;/a&gt;, and not a bug a patch removes.&lt;/p&gt;
&lt;p&gt;So do not give it the keys. Let the model look and think. Let a plain, unpersuadable engine decide and act.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The model&apos;s read can only ever &lt;strong&gt;raise&lt;/strong&gt; a concern. It advises, it never authorizes. The deterministic policy holds whatever the model says, or is tricked into saying.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hold to that and injection loses its reward. Fool the model and the worst you get is a wrong opinion. You gained nothing, because it could never do anything.&lt;/p&gt;
&lt;p&gt;There are really two ways to frame this. One is &lt;strong&gt;content inspection with a smarter matcher&lt;/strong&gt;, which is where most of the industry is heading. That will catch more secrets in more documents. But it is the same vocabulary with a bigger dictionary, and it still cannot say the word &quot;bulk.&quot;&lt;/p&gt;
&lt;p&gt;The other is &lt;strong&gt;situational judgment sitting on top of deterministic policy&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Cheap triggers do the watching, because most of what matters announces itself plainly. A query returning a hundred thousand rows. A domain&apos;s login settings being edited. A page writing a shell command to the clipboard. You call on the model only at those moments, and only for the judgment a rule cannot generalize.&lt;/p&gt;
&lt;p&gt;That would let you ask far better questions than most teams can ask today. Is this export routine for this person, or the first of its kind? Did this page turn into something else after it loaded? Was this admin change consistent with anything anybody intended?&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;A category, not a feature&lt;/h2&gt;
&lt;p&gt;Widen the aperture and the same framework starts to matter elsewhere. Which documents were pulled into context before the assistant drafted the memo? Which local files became cloud inputs? Which tool was invoked, and on whose behalf?&lt;/p&gt;
&lt;p&gt;Once work becomes composable, the situation becomes the control surface.&lt;/p&gt;
&lt;p&gt;Right now most security stacks answer those questions indirectly, if at all. That&apos;s why this feels like a category opening, not a missing feature.&lt;/p&gt;
&lt;p&gt;Historically, new perimeters create new companies, because the telemetry changes and the control surface changes with it. Browser-native work produced enterprise browsers. Cloud-native infrastructure produced cloud-native security companies. They were not feature extensions of what came before. They were responses to a different environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Situational security&lt;/strong&gt; has that same feel. The telemetry is different from DLP. The unit of analysis is different from identity. The control problem is different from URL filtering. You are trying to understand what is happening to a person, in a moment, in context.&lt;/p&gt;
&lt;p&gt;It is worth saying plainly what this does not solve. It goes blind where the page does, because tools that paint themselves onto a canvas show a browser almost nothing to read. It sees automation, not the intent to hide it: a declared agent can be held to a policy, but an agent driving Chrome over the DevTools Protocol looks exactly like a person to the page, and an agent that spawns its own headless browser was never inside yours to begin with.&lt;/p&gt;
&lt;p&gt;And it is approximate, which is why it belongs on the gentle end of the response. Asking, warning, recording. Never silently slamming a door.&lt;/p&gt;
&lt;p&gt;None of that dents the argument. It fences it.&lt;/p&gt;
&lt;p&gt;If you only scan the bytes, you miss what the bytes are for. If you only check the domain, you miss the page that changed after it loaded. If you only watch identity, you miss what a valid session did with it. If you only log the API call, you miss the person who was talked into making it.&lt;/p&gt;
&lt;p&gt;The missing layer is the situation itself.&lt;/p&gt;
&lt;p&gt;My guess is that this will look obvious in hindsight. We&apos;ll talk about situational context in the browser the way we now talk about identity, isolation, or posture. A distinct layer that had to emerge once the environment changed.&lt;/p&gt;
&lt;p&gt;But right now the space is still open enough that the categories blur together. One company matches strings. Another checks domains. Another governs identity. Another isolates the session. All useful. None of them holds the situation.&lt;/p&gt;
&lt;p&gt;That&apos;s the opening.&lt;/p&gt;
&lt;p&gt;The situation is right there, in the browser, fully visible. Security needs to start reading it.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[TLS with Remote Attestation (aTLS) | Machine-to-Machine Secure Channel]]></title><description><![CDATA[An Attested TLS channel is a TLS channel that integrates remote attestation validation as part of the TLS channel establishing process.]]></description><link>https://gufranmirza.com/blogs/attested-tls/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/attested-tls/</guid><pubDate>Sat, 20 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h3&gt;1. Introduction&lt;/h3&gt;
&lt;p&gt;aTLS introduces a set of protocol extensions to the TLS 1.3 handshake, enabling the binding of TLS authentication keys to remote attestation sessions.&lt;/p&gt;
&lt;p&gt;This allows peers to authenticate themselves using &quot;attestation credentials,&quot; comprising platform evidence and key attestation, enhancing security metrics during TLS channel setup.&lt;/p&gt;
&lt;p&gt;These extensions are technology-agnostic, accommodating various attestation formats, and support both background-check and passport topologies for authentication. Additionally, the specification allows for one-way and mutual authentication using attestation credentials, with attestation topologies at each peer being independent.&lt;/p&gt;
&lt;h3&gt;2. Conventions and Terminology&lt;/h3&gt;
&lt;p&gt;The following terms are used in this document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;TLS Identity Key (TIK):
A cryptographic key used by one of the peers to authenticate
itself during the TLS handshake.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIK-C, TIK-S:
The TIK that identifies the client or the server, respectively.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TIK-C-ID, TIK-S-ID:
An identifier for TIK-C or respectively, TIK-S. This may be a
fingerprint (cryptographic hash) of the public key, but other
implementations are possible.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. Overview&lt;/h3&gt;
&lt;p&gt;The goal is to link the authenticated key exchange of TLS with an interleaved remote attestation session in such a way
that the key used to sign the handshake can be proven to be residing within the boundaries of an attested TEE. The requirement is that the attester can provide evidence containing the security status of both the signing key and the platform that is hosting it. The associated security goal is to obtain such binding so that no replay, relay or splicing from an adversary is possible.&lt;/p&gt;
&lt;p&gt;TEE attestation is provided by a Platform Attestation Token (PAT) signed by the attester&apos;s &quot;attesting environment&quot;. Among other security metrics, the PAT contains evidence about the integrity of a &quot;Key Attestation Service&quot; executing within the TEE which issues a Key Attestation Token (KAT) for the TLS handshake signing key (TIK). The protocol&apos;s security relies on the verifiable binding between these two logically separate units of evidence.&lt;/p&gt;
&lt;h3&gt;4. Attestation Extensions&lt;/h3&gt;
&lt;p&gt;As typical with new features in TLS, the client indicates support for the new extension in the ClientHello message. The newly introduced extensions allow remote attestation credentials and nonces to be exchanged. The nonces are used for guaranteeing freshness of the exchanged evidence when the background check model is in use.&lt;/p&gt;
&lt;p&gt;In TLS a client has to demonstrate possession of the private key via the CertificateVerify message, when client-based authentication is requested. The attestation payload must contain assertions relating to the client&apos;s TLS Identity Key (TIK-C), which associate the private key with the attestation information. These assertions may come in the form of a Key Attestation Token (KAT), or of specific claims in an attestation result document.&lt;/p&gt;
&lt;p&gt;In a monolithic implementation, the TLS stack is completely embedded within the TEE. In a split implementation, the TLS stack is located outside the TEE, but any private keys (and in particular, the TIK) only exist within the TEE. In order to support both options, only the TIK&apos;s identity and its public component are ever passed between the Client or Server TLS stack and its Attestation Service.&lt;/p&gt;
&lt;h3&gt;5. Use of Remote Attestation Credentials in the TLS Handshake&lt;/h3&gt;
&lt;p&gt;For both the passport model and background check model the following modes of operation are allowed when used with TLS, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;TLS client is the attester,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TLS server is the attester, and&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TLS client and server mutually attest towards each other.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;5.1. Handshake Overview&lt;/h4&gt;
&lt;p&gt;The handshake defined here is analogous to certificate-based authentication in a regular TLS handshake. Instead of the
certificate&apos;s private key, we use the TIK identity key. This key is attested, with attestation being carried by the Certificate message. Following that, the peer being attested proves possession of the private key using the CertificateVerify message.&lt;/p&gt;
&lt;p&gt;Depending on the use case, the protocol supports peer authentication using attestation only, or using both attestation and a regular public key certificate.&lt;/p&gt;
&lt;p&gt;Not all platforms support this model, and a document that defines private key attestation for use in TLS Attestation as defined here, must specify:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The format and the lifetime of TIK (e.g. an ephemeral, per session
TIK vs. a long lived one).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How the key is attested using a structure carried by the Certificate message.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How proof of possession is performed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;5.2. TLS Client Authenticating Using Evidence&lt;/h4&gt;
&lt;p&gt;In this use case, the TLS server (acting as a relying party)
challenges the TLS client (as the attester) to provide evidence. The
TLS server needs to provide a nonce in the EncryptedExtensions
message to the TLS client so that the attestation service can feed
the nonce into the generation of the evidence. The TLS server, when
receiving the evidence, will have to contact the verifier (which is
not shown in the diagram).&lt;/p&gt;
&lt;p&gt;An example of this flow can be found in device onboarding where the
client initiates the communication with cloud infrastructure to get
credentials, firmware and other configuration data provisioned to the
device. For the server to consider the device genuine it needs to
present evidence.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;       Client                                           Server

Key  ^ ClientHello
Exch | + evidence_proposal
     | + key_share*
     | + signature_algorithms*
     v                         --------&amp;gt;
                                                  ServerHello  ^ Key
                                                 + key_share*  | Exch
                                                               v
                                        {EncryptedExtensions}  ^  Server
                                          + evidence_proposal  |  Params
                                                      (nonce)  |
                                         {CertificateRequest}  v
                                                {Certificate}  ^
                                          {CertificateVerify}  | Auth
                                                   {Finished}  v
                               &amp;lt;--------  [Application Data*]
     ^ {Certificate}
Auth | {CertificateVerify}
     v {Finished}              --------&amp;gt;
       [Application Data]      &amp;lt;-------&amp;gt;  [Application Data]

        Figure 1: TLS Client Providing Evidence to TLS Server.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;5.3. TLS Server Authenticating Using Evidence&lt;/h4&gt;
&lt;p&gt;In this use case the TLS client challenges the TLS server to present
evidence. The TLS server acts as an attester while the TLS client is
the relying party. The TLS client, when receiving the evidence, will
have to contact the verifier (which is not shown in the diagram).&lt;/p&gt;
&lt;p&gt;An example of this flow can be found in confidential computing where
a compute workload is only submitted to the server infrastructure
once the client/user is assured that the confidential computing
platform is genuine.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;       Client                                           Server

Key  ^ ClientHello
Exch | + evidence_request
     |   (nonce)
     | + key_share*
     | + signature_algorithms*
     v                         --------&amp;gt;
                                                  ServerHello  ^ Key
                                                 + key_share*  | Exch
                                                               v
                                        {EncryptedExtensions}  ^  Server
                                          + evidence_request   |  Params
                                                               |
                                         {CertificateRequest}  v
                                                {Certificate}  ^
                                          {CertificateVerify}  | Auth
                                                   {Finished}  v
                               &amp;lt;--------  [Application Data*]
     ^ {Certificate}
Auth | {CertificateVerify}
     v {Finished}              --------&amp;gt;
       [Application Data]      &amp;lt;-------&amp;gt;  [Application Data]

        Figure 2: TLS Server Providing Evidence to TLS Client.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;5.4. TLS Client Authenticating Using Attestation Results&lt;/h4&gt;
&lt;p&gt;In this use case the TLS client, as the attester, provides
attestation results to the TLS server. The TLS client is the
attester and the the TLS server acts as a relying party. Prior to
delivering its Certificate message, the client must contact the
verifier (not shown in the diagram) to receive the attestation
results that it will use as credentials.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;       Client                                           Server

Key  ^ ClientHello
Exch | + results_proposal
     | + key_share*
     | + signature_algorithms*
     v                         --------&amp;gt;
                                                  ServerHello  ^ Key
                                                 + key_share*  | Exch
                                                               v
                                        {EncryptedExtensions}  ^  Server
                                           + results_proposal  |  Params
                                         {CertificateRequest}  v
                                                {Certificate}  ^
                                          {CertificateVerify}  | Auth
                                                   {Finished}  v
                               &amp;lt;--------  [Application Data*]
     ^ {Certificate}
Auth | {CertificateVerify}
     v {Finished}              --------&amp;gt;
       [Application Data]      &amp;lt;-------&amp;gt;  [Application Data]

        Figure 3: TLS Client Providing Results to TLS Server.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;5.5. TLS Server Authenticating Using Results&lt;/h4&gt;
&lt;p&gt;In this use case the TLS client, as the relying party, requests
attestation results from the TLS server. Prior to delivering its
Certificate message, the server must contact the verifier (not shown
in the diagram) to receive the attestation results that it will use
as credentials.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;       Client                                           Server

Key  ^ ClientHello
Exch | + results_request
     | + key_share*
     | + signature_algorithms*
     v                         --------&amp;gt;
                                                  ServerHello  ^ Key
                                                 + key_share*  | Exch
                                                               v
                                        {EncryptedExtensions}  ^  Server
                                           + results_request   |  Params
                                                               |
                                         {CertificateRequest}  v
                                                {Certificate}  ^
                                          {CertificateVerify}  | Auth
                                                   {Finished}  v
                               &amp;lt;--------  [Application Data*]
     ^ {Certificate}
Auth | {CertificateVerify}
     v {Finished}              --------&amp;gt;
       [Application Data]      &amp;lt;-------&amp;gt;  [Application Data]

  Figure 4: TLS Server Providing Attestation Results to TLS Client.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;hr&gt;
&lt;p&gt;Will be covering the Evidence Extensions in next blog post.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
Credits
&lt;p&gt;&lt;a href=&quot;https://datatracker.ietf.org/doc/draft-fossati-tls-attestation/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Using Attestation in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Managing the cryptographic keys within Trusted Execution Environment]]></title><description><![CDATA[High level overview of the cryptographic keys management in the Trusted Execution Environment.]]></description><link>https://gufranmirza.com/blogs/trusted-platform-module-keys-management/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/trusted-platform-module-keys-management/</guid><pubDate>Thu, 15 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The Trusted Platform Module (TPM) is a dedicated hardware component designed to enhance the security of computing systems. It provides a root of trust for the platform and offers various security-related functions. The primary role of a hardware TPM involves secure storage, key management, and attestation.&lt;/p&gt;
&lt;p&gt;Cryptographic key management in a Trusted Execution Environment (TEE) involves the generation, storage, and usage of cryptographic keys to ensure the security of operations within the TEE.&lt;/p&gt;
&lt;h2&gt;1. Key Generation:&lt;/h2&gt;
&lt;p&gt;Flow Diagram:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;+---------------------+
|  TEE Initialization |
+---------------------+
           |
           v
+---------------------+
|   Key Generation    |
|   (Asymmetric,      |
|    Symmetric, etc.)  |
+---------------------+
           |
           v
+---------------------+
|    Key Storage      |
+---------------------+&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;During the initialization of the TEE, cryptographic keys are generated. These keys can be either symmetric or asymmetric, depending on the specific requirements of the TEE application.&lt;/li&gt;
&lt;li&gt;Asymmetric keys usually include a public-private key pair, while symmetric keys are a single shared secret.&lt;/li&gt;
&lt;li&gt;After generation, the keys need to be securely stored within the TEE to prevent unauthorized access.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Key Storage:&lt;/h2&gt;
&lt;p&gt;Flow Diagram:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;+---------------------+
|    Key Storage      |
+---------------------+
           |
           v
+---------------------+
|   Secure Storage    |
|   within the TEE    |
+---------------------+
           |
           v
+---------------------+
|   Access Controls   |
|   (Hardware-based   |
|   and Software-based|
|   protections)      |
+---------------------+&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The generated cryptographic keys are stored securely within the TEE. This storage needs to be resistant to various attacks, such as side-channel attacks or unauthorized access attempts.&lt;/li&gt;
&lt;li&gt;Access controls, both hardware-based and software-based, are implemented to restrict access to the stored keys. Only authorized processes or entities within the TEE should have access to these keys.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Key Usage:&lt;/h2&gt;
&lt;p&gt;Flow Diagram:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;+---------------------+
|    Key Usage        |
+---------------------+
           |
           v
+---------------------+
|   Cryptographic     |
|   Operations        |
|   (Encryption,       |
|   Decryption,        |
|   Signing, etc.)     |
+---------------------+
           |
           v
+---------------------+
|   Result of         |
|   Cryptographic     |
|   Operation         |
+---------------------+&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Cryptographic keys stored within the TEE are used for various operations, such as encryption, decryption, signing, or other cryptographic functions.&lt;/li&gt;
&lt;li&gt;These operations are performed within the secure environment of the TEE, ensuring the confidentiality and integrity of the sensitive data involved.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;4. Key Lifecycle Management:&lt;/h2&gt;
&lt;p&gt;Flow Diagram:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;+---------------------+
|  Key Lifecycle       |
|  Management         |
+---------------------+
           |
           v
+---------------------+
|   Key Update/       |
|   Rotation          |
+---------------------+
           |
           v
+---------------------+
|   Key Revocation/   |
|   Deletion          |
+---------------------+&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Key lifecycle management includes processes for key update or rotation to enhance security over time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In case a key becomes compromised or is no longer needed, key revocation or deletion processes are implemented to ensure that the key is no longer used.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key updates and revocations should be managed carefully to avoid disruptions to ongoing operations that rely on these keys.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In summary, cryptographic key management in a TEE involves key generation, secure storage, access controls, key usage, and key lifecycle management. These processes collectively contribute to maintaining the confidentiality and integrity of cryptographic operations within the Trusted Execution Environment.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Trusted Platform Module (TPM) as Root of Trust (rot) and cryptographic features]]></title><description><![CDATA[High level overview of the trusted platform module its cryptographic features that can be used to perform the platform attestation.]]></description><link>https://gufranmirza.com/blogs/trusted-platform-module-and-attestation/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/trusted-platform-module-and-attestation/</guid><pubDate>Thu, 08 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The Trusted Platform Module (TPM) is a dedicated hardware component designed to enhance the security of computing systems. It provides a root of trust for the platform and offers various security-related functions. The primary role of a hardware TPM involves secure storage, key management, and attestation.&lt;/p&gt;
&lt;h2&gt;Root of Trust (RoT):&lt;/h2&gt;
&lt;p&gt;The Root of Trust is the foundation of a secure system, providing a starting point for establishing trust. It is typically a hardware-based component or set of components that are inherently trusted. The RoT ensures the integrity and security of a system from the beginning of the boot process.&lt;/p&gt;
&lt;h2&gt;Secure Storage:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key Storage:&lt;/strong&gt; TPMs are equipped with secure storage areas that protect cryptographic keys from unauthorized access. This storage is often referred to as the Platform Configuration Registers (PCRs).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Endorsement Key (EK):&lt;/strong&gt; The TPM is initialized with a unique and secret Endorsement Key (EK) during manufacturing. The EK serves as a root key for the TPM and is used for attestation purposes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Key Management:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key Generation:&lt;/strong&gt; TPMs can generate cryptographic key pairs, including public and private keys, within the hardware. These keys can be used for various security functions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Storage Root Key (SRK):&lt;/strong&gt; TPMs often have a Storage Root Key (SRK), which is used to protect other keys. It is a key generated within the TPM during initialization and is typically used to wrap (encrypt) and protect other keys.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Sealing and Unsealing:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data Protection:&lt;/strong&gt; TPMs can be used to seal (encrypt) sensitive data based on the state of the system. The data can only be unsealed (decrypted) if the system is in a specific, expected state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Binding Keys:&lt;/strong&gt; Public-private key pairs generated by the TPM can be used for data binding, where data is bound to a specific system state, ensuring its integrity.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Secure Boot and Measurement:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Boot Integrity:&lt;/strong&gt; TPMs are involved in the secure boot process, measuring each stage of the boot sequence and extending the measurements into the PCRs. This provides a chain of trust from the hardware to the operating system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrity Verification:&lt;/strong&gt; The measurements recorded in the PCRs can be used to verify the integrity of the system. Deviations from the expected values indicate potential tampering.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Secure Key Exchange:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Asymmetric Key Exchange:&lt;/strong&gt; TPMs can facilitate secure key exchange protocols by generating, storing, and managing asymmetric key pairs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key Wrapping:&lt;/strong&gt; Public keys can be used to wrap (encrypt) other keys, ensuring that they can only be unwrapped (decrypted) by the TPM that generated the wrapping key.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Attestation (In detail):&lt;/h2&gt;
&lt;p&gt;The TPM attestation process provides a way to remotely verify the trustworthiness of a computing platform. It relies on the TPM&apos;s ability to securely measure the platform&apos;s state, generate signed attestation data, and allow remote entities to verify the integrity and authenticity of that data. The use of attestation enhances security in scenarios such as secure boot, remote device management, and secure communication between devices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TPM Initialization and Key Generation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;During manufacturing, the TPM is initialized with a unique and secret Endorsement Key (EK). The EK serves as a root of trust for attestation.&lt;/li&gt;
&lt;li&gt;The TPM can generate other keys, such as Storage Root Key (SRK) and Attestation Identity Key (AIK), during its initialization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Measurement and PCR Extending:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;During the system boot process, each component (bootloader, BIOS, OS kernel, etc.) is measured using a cryptographic hash function (e.g., SHA-256).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The measured values are extended into the Platform Configuration Registers (PCRs) of the TPM. PCRs are registers that store hash values and serve as a cumulative measure of the system&apos;s state.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;AIK Creation (Optional):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The platform may create an Attestation Identity Key (AIK) within the TPM. The AIK is used for attestation and is typically bound to specific PCRs to link it to the platform&apos;s state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The AIK is associated with the Endorsement Key (EK) and is used to sign attestation data.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Quote Generation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The platform, or a software component within the platform, generates a quote. A quote is a signed set of PCR values from the TPM. It proves that the platform is in a specific state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The quote is signed with the AIK, providing evidence that the attestation data comes from a TPM with a specific Endorsement Key.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Challenge-Response Protocol (Optional):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The verifier (remote entity) may challenge the platform to provide a quote. The challenge-response protocol ensures that the attestation is not replayed.&lt;/li&gt;
&lt;li&gt;The platform generates a response to the challenge, including a new quote.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Sending Attestation Data:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The platform sends the attestation data (quote) to the verifier. This may include the PCR values, the AIK&apos;s signature, and other relevant information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The attestation data is typically sent securely, often through a secure channel like TLS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Verification by the Verifier:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The verifier receives the attestation data and performs the following checks:
&lt;ul&gt;
&lt;li&gt;Signature Verification: The AIK&apos;s signature is verified using the EK&apos;s public key.&lt;/li&gt;
&lt;li&gt;PCR Values: The PCR values are checked to ensure they match the expected values for a trusted platform.&lt;/li&gt;
&lt;li&gt;Validity Check: The AIK, EK, and other elements are checked against known, trusted values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Trust Decision:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Based on the verification results, the verifier makes a trust decision. If the attestation data is valid and matches the expected state, the platform is deemed trustworthy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The verifier can decide whether to allow access, establish a secure communication channel, or take other actions based on trust.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;In summary, the hardware TPM plays a crucial role in providing a secure foundation for computing systems. It offers secure storage for cryptographic keys, supports key generation and management, enables remote attestation, and ensures the integrity of the system through secure boot processes.&lt;/p&gt;
&lt;p&gt;Public and private keys within the TPM are utilized for various cryptographic operations, attestation, and data protection, contributing to the overall security of the platform.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Deep dive into the Confidential Containers (CoCo)]]></title><description><![CDATA[Enabling cloud native confidential computing by leveraging Trusted Execution Environments to protect containers and data]]></description><link>https://gufranmirza.com/blogs/confidential-containers-arch/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/confidential-containers-arch/</guid><pubDate>Sun, 14 Jan 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;What is Confidential Computing?&lt;/h2&gt;
&lt;p&gt;Data can exist in three states:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data in storage is &lt;code class=&quot;language-text&quot;&gt;at rest&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Data traversing the network is &lt;code class=&quot;language-text&quot;&gt;in transit&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Data being processed is &lt;code class=&quot;language-text&quot;&gt;in use&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption at rest&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents data from being obtained in an unencrypted form, in the event of an attack.&lt;/li&gt;
&lt;li&gt;Used in services such as Disk Encryption, SQL Databases, Storage Accounts, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption in transit (E2E)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents data from being sent in clear text over public or private networks.&lt;/li&gt;
&lt;li&gt;Typically happens via SSL and TLS protocols.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption in use&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Protecting the data in use at processor/memory and caches.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Key Components&lt;/h2&gt;
&lt;p&gt;The following diagram shows how the different building blocks for Confidential Computing (CC) come together:
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/30ab2c170866ef507f538f6a2db2ed4b/79deb/CC_all_blocks.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 38.857142857142854%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAIABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQD/2gAMAwEAAhADEAAAAdexLBf/xAAXEAADAQAAAAAAAAAAAAAAAAAAARAR/9oACAEBAAEFAsiP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFxAAAwEAAAAAAAAAAAAAAAAAAAEQQf/aAAgBAQAGPwLRT//EABkQAAIDAQAAAAAAAAAAAAAAAAABESExYf/aAAgBAQABPyFxm7dFiJmLZ//aAAwDAQACAAMAAAAQe/8A/8QAFhEAAwAAAAAAAAAAAAAAAAAAAAER/9oACAEDAQE/EE4U/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8QiP/EABgQAQEBAQEAAAAAAAAAAAAAAAERACFB/9oACAEBAAE/EEUQ9awQsI17nJo7/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;CC All building Blocks&quot;
        title=&quot;&quot;
        src=&quot;/static/30ab2c170866ef507f538f6a2db2ed4b/03346/CC_all_blocks.jpg&quot;
        srcset=&quot;/static/30ab2c170866ef507f538f6a2db2ed4b/71299/CC_all_blocks.jpg 175w,
/static/30ab2c170866ef507f538f6a2db2ed4b/1e9fe/CC_all_blocks.jpg 350w,
/static/30ab2c170866ef507f538f6a2db2ed4b/03346/CC_all_blocks.jpg 700w,
/static/30ab2c170866ef507f538f6a2db2ed4b/c3223/CC_all_blocks.jpg 1050w,
/static/30ab2c170866ef507f538f6a2db2ed4b/da6ee/CC_all_blocks.jpg 1400w,
/static/30ab2c170866ef507f538f6a2db2ed4b/79deb/CC_all_blocks.jpg 2096w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Infra layer&lt;/h3&gt;
&lt;p&gt;It can be on-premises (bare metal, VMware etc.) or public clouds (AWS, Azure, GCP, etc.)&lt;/p&gt;
&lt;p&gt;Hardware with CC support - this includes 2 distinct models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;b&gt;VM-based TEEs&lt;/b&gt; - In this model, memory is encrypted along a traditional VM boundary running on top of a VMM. AMD SEV-SNP, Intel TDX, IBM Secure Execution and Protected Execution Functionality (PEF) are examples of VM-based TEEs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;b&gt; Process-based TEEs &lt;/b&gt; - In this model, a process that needs to run securely is divided into two components: trusted and untrusted. The trusted component resides in encrypted memory and handles confidential computing, while the untrusted component interfaces with the operating system and propagates I/O from encrypted memory to the rest of the system. Intel SGX is an example of a process-based TEE.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Hypervisor&lt;/h3&gt;
&lt;p&gt;This includes hypervisors such as QEMU/KVM, cloud hypervisor, public cloud provider hypervisors etc.&lt;/p&gt;
&lt;h3&gt;The Confidential Computing Services&lt;/h3&gt;
&lt;p&gt;This block contains a number of services (colored pink) which are required for creating a holistic CC platform which the customer can then use to build their solution. This currently includes the following services:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Attestation service&lt;/b&gt; - The primary purpose of the attestation service is to validate the evidence provided by the hardware TEE. This is the Verifier, as defined in the RATS architecture.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Key Broker Service (KBS) &lt;/b&gt; - The KBS is the Relying Party, as defined by the RATS architecture. Following are its primary functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Receive evidence from the Attester (confidential VM or container) via a challenge-response protocol.&lt;/li&gt;
&lt;li&gt;Relay the evidence to the Attestation Service for verification.&lt;/li&gt;
&lt;li&gt;Apply appraisal policy for the returned Attestation Results to assess the trustworthiness of the Attester.&lt;/li&gt;
&lt;li&gt;Interact with the Key Management Service to retrieve the keys and then send them back to the Attester.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Key management service &lt;/b&gt; - A service for securely storing, managing and backing up of cryptographic keys used by applications and users.&lt;/p&gt;
&lt;p&gt;&lt;b&gt; Image build service &lt;/b&gt; - Services used to build confidential containers or VM images for end users.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Image registry &lt;/b&gt; - A service that is used to store encrypted and/or signed container and VM images required for CC workloads. Examples of such registries include Quay.io, Docker Hub, CSPs provided registries, etc.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Confidential Container Stack&lt;/h2&gt;
&lt;p&gt;The two following sections describe a generic software architecture for Kubernetes pods to run in either VM-based or process-based TEEs.&lt;/p&gt;
&lt;p&gt;Although internal implementations for the two approaches differ, they share the same goals and attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove cloud and infrastructure providers from the guest application Trusted Computing Base (TCB).&lt;/li&gt;
&lt;li&gt;Integrate natively with the Kubernetes control plane.&lt;/li&gt;
&lt;li&gt;Provide an unmodified Kubernetes user and developer experience.&lt;/li&gt;
&lt;li&gt;Deploy unmodified workloads.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;VM-based TEE&lt;/h3&gt;
&lt;p&gt;VM-based TEEs (e.g. AMD SEV, IBM SE or Intel TDX) can be used to build a confidential containers software architecture:&lt;/p&gt;
&lt;p&gt;Following is the workflow when deploying a Kubernetes pod with VM-based TEEs:&lt;/p&gt;
&lt;p&gt;CC workload preparation&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User builds the container image(s) (e.g. with tools like podman).&lt;/li&gt;
&lt;li&gt;User signs/encrypts the container image(s).&lt;/li&gt;
&lt;li&gt;User pushes the container image(s) to the image registry.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deploying the CC workload in k8s&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User deploys the workload (kubectl apply -f cc_workload.yaml).&lt;/li&gt;
&lt;li&gt;Kubernetes schedules the workload to target host having the required capability to run confidential containers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CC workload execution flow (red connector in the diagram)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Confidential containers runtime on the host starts the VM TEE (The enclave).&lt;/li&gt;
&lt;li&gt;Enclave (agent) performs remote attestation: steps 1-2 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave (agent) gets the keys required to verify/decrypt the containers image(s): steps 3-4 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave (image management) downloads the container image(s) : step 5 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave verifies/decrypts the container image(s) : step 6 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave starts the container workload.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7f2ffe09bd4657c57b08efbef9ee981c/c7227/CC_TEE_container.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 54.85714285714286%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAACU0lEQVR42n2SWU8TURiG+/uMFybGS680Eq0/wBgh0QgXbgURIVHjAlEWA6YCNihQlaIGDCJ7Sze60G1m2pnOdJnl8bQlKGic5MvJ2Z7zvt87Lo58DhXDwlDFWG6VodnomoVtO0dO2raNVFQIhnfJFvLNueM4uH6jWhf6ZpY48aybU489nH7Sw8lBD5dGJlBks3XOcQ6BhZLM0o/v5BQJ2/kX0IbODz5urjylb22UM/M3eBHycsvvJZur/QXMCWB4L0ZG/o/Ch9OrtI/58bxbpH36LT1TC3SNLZOXWkC7LpRaFpgmVUVB2U9j1KqHj7mO93BwIsvljjDPhzaIBWMMPFrleucGSiIHmootyWIsQ6XSAh/rq6tFPsCZFr65ODP+MF8DQRa/hAh8CjLp3SQXzgqITkXTSEcjpFIJilqJmqqSzmZICqVyqdgCNsj7GbEYjfEtECaRiYtGp9gvJCkocVbXU2IvBTUDQymyGdpmJ7qLIsKoSpKY77AVDoqQBLDhu5GQJco060zNxhj2RRiZ2uKVd43x9xGGpmMk81rDAoauk85nSUk5JFWhVq8jC6WNYEpGWQCFQqtqYupVzGqdatlGKVSJJ/KEd1NkM5qw5XCQWdONqpYoJpPoAt4QpBs6svgnK7UaroSao9s/TPfsS0Y35hkKzXHt433cr6/gnuzg6sJdPOvjdK2MMB4JYNbqxBJx5FwWtaw1HziMtJHytpygbaEP92J/s9oCDzjnu8f5N7dxBwa4GOjnwudezs7foXfN23Sx/HOF0F60adX6I+kG8BcK+h459iWZywAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;CC_TEE_container&quot;
        title=&quot;&quot;
        src=&quot;/static/7f2ffe09bd4657c57b08efbef9ee981c/39600/CC_TEE_container.png&quot;
        srcset=&quot;/static/7f2ffe09bd4657c57b08efbef9ee981c/1aaec/CC_TEE_container.png 175w,
/static/7f2ffe09bd4657c57b08efbef9ee981c/98287/CC_TEE_container.png 350w,
/static/7f2ffe09bd4657c57b08efbef9ee981c/39600/CC_TEE_container.png 700w,
/static/7f2ffe09bd4657c57b08efbef9ee981c/57cd1/CC_TEE_container.png 1050w,
/static/7f2ffe09bd4657c57b08efbef9ee981c/c7227/CC_TEE_container.png 1382w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/h2&gt;
&lt;h3&gt;Process-based TEE&lt;/h3&gt;
&lt;p&gt;The confidential containers software architecture can also be built on top of process-based TEEs like e.g. Intel SGX:&lt;/p&gt;
&lt;p&gt;Following is the workflow when deploying a Kubernetes pod with a process-based TEEs. The main differences from the VM-based TEE approach are the last 3 steps involving interaction between 2 enclave processes:&lt;/p&gt;
&lt;p&gt;CC workload preparation&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User builds the container image(s) (e.g. with tools like podman).&lt;/li&gt;
&lt;li&gt;User signs/encrypts the container image(s).&lt;/li&gt;
&lt;li&gt;User pushes the container image(s) to the image registry.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deploying the CC workload in k8s&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User deploys the workload (kubectl apply -f cc_workload.yaml).&lt;/li&gt;
&lt;li&gt;Kubernetes schedules the workload to target host having the required capability to run confidential containers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CC workload execution flow (red connector in the diagram)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Confidential containers runtime on the host starts the enclave agent.&lt;/li&gt;
&lt;li&gt;Enclave (agent) performs remote attestation: steps 1-2 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave (agent) gets the keys required to verify/decrypt the containers image(s): steps 3-4 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave (image management) downloads the container image(s) : step 5 in the diagram.&lt;/li&gt;
&lt;li&gt;Enclave verifies, decrypts and writes the container image(s) to a local encrypted filesystem: step 6 in the diagram.&lt;/li&gt;
&lt;li&gt;The runtime starts the app enclave which reads the container bundle from the encrypted filesystem.&lt;/li&gt;
&lt;li&gt;Secure use of the encrypted filesystem is facilitated by a key exchange between the agent and app enclaves using either sealing or local attestation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/79db45f3aba71f580070e45fb3ea66ae/58465/CC_SGX_container.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 55.42857142857143%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAACX0lEQVR42m2SXU8TURCG+WFceGU08Qa9M4Qb/4BeEGOi4nciGDQxMSbExIREJUKLjYoElaCihVKQWrCUUraFfrAtbWn3s93dx2EBhcgkm3NyduZ53zNn2tgPz/P8NVXLM7Q6xevEFMHkN16uTDKejWI7rYNU7GaTdEYhsZpE0zUOR9vBxvFcfx1Y/sDJwBXOD9/ixOBFOkfvcm7sNiWj9g/YahJZnGc6EqYuwAMzxwIfL4Rof3WJs29u0B7spmP4OqdHr5Kvlf8WmU2b9c0MqUzaB+Id49DbP40VkwwsjfEsPs7gygRPY+8IKD9oGA2/0HNdPNumWS5haRruIXdHgOIbV5Jta2fvWg0TQ80LQKR0A1tZBVXF3tykmc9jmyaO5LuOgyUCtrg2LfMQUMJttdDrDdScSi6eYGNVIb+copTJYQmUhoaynmZuYY7fqSS1YgFNvmg8xq/EkrQhuwc0DYOsKFfk55ZAPo7NMxEKMzud4pPsY7NrGIUM6DXU7W2UYo6yVkM3dKnVWc9toEqPi5XyHtAR24ZliQsNXa0wF07w/cuiv0ZnVkgncnjysrtRKKmkNxTWsgrVRp2W61DcLpEtbKJWt2nT6xpbGwW5ZlGApvRE+uI5NEW5Xi5ji8iu4EHrW9JTS86tSkXO9yajKXNpiaHdN2jrmxmiM3iHi5NPuBx5TkfoJmcGu+l6e42usR4ufL7HqfEe+heDfrEi1ytsFajuVNFM48gM+q88kp7mfnyE/vgofbEA/fMj9H59wYOFAA+XQzyKh+j9Ocx7JeIXrKylCEcjPrhuaP8B/wDOXCABnvxxNwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;COCO_ccv1_enclave.png&quot;
        title=&quot;&quot;
        src=&quot;/static/79db45f3aba71f580070e45fb3ea66ae/39600/CC_SGX_container.png&quot;
        srcset=&quot;/static/79db45f3aba71f580070e45fb3ea66ae/1aaec/CC_SGX_container.png 175w,
/static/79db45f3aba71f580070e45fb3ea66ae/98287/CC_SGX_container.png 350w,
/static/79db45f3aba71f580070e45fb3ea66ae/39600/CC_SGX_container.png 700w,
/static/79db45f3aba71f580070e45fb3ea66ae/57cd1/CC_SGX_container.png 1050w,
/static/79db45f3aba71f580070e45fb3ea66ae/58465/CC_SGX_container.png 1272w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;As can be seen, the flows for process and VM-based TEEs are almost identical. It should be noted that process-based TEE requires a few additional software components like libOS without which the application requires re-architecting. This is not the case for VM-based TEEs. Conversely, Process based TEEs do not require a separate VM and CC-aware hypervisor.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Credits&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/confidential-containers&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Confidential Containers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Remote Attestation Procedures Architecture (RATS) - Part-I]]></title><description><![CDATA[In this article, we will focus on attestation, as a method to prove specific properties of the system and components being used.]]></description><link>https://gufranmirza.com/blogs/rats-remote-attestation-architecture/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/rats-remote-attestation-architecture/</guid><pubDate>Fri, 17 Nov 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The question of how one system can know that another system can be trusted has found new interest and relevance in a world where trusted computing elements are maturing in processor architectures.&lt;/p&gt;
&lt;p&gt;Systems that have been attested and verified to be in a good state (for some value of &quot;good&quot;) can improve overall system posture. Conversely, systems that cannot be attested and verified to be in a good state can be given reduced access or privileges, taken out of service, or otherwise flagged for repair.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A bank backend system might refuse to transact with another system that is not known to be in a good state.&lt;/li&gt;
&lt;li&gt;A healthcare system might refuse to transmit electronic healthcare records to a system that is not known to be in a good state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In Remote Attestation Procedures (RATS), one peer (the &quot;Attester&quot;) produces believable information about itself - Evidence - to enable a remote peer (the &quot;Relying Party&quot;) to decide whether to consider that Attester a trustworthy peer or not. RATS are facilitated by an additional vital party, the Verifier.&lt;/p&gt;
&lt;p&gt;The Verifier appraises Evidence via appraisal policies and creates the Attestation Results to support Relying Parties in their decision process.&lt;/p&gt;
&lt;h2&gt;Architectural Overview&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3983e5d47702b9b6609a4463ede8fcd9/5ece7/cover.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 69.71428571428572%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAABS0lEQVR42q2UyY6DQAxE8///lisXOEAQYg07WSDg6FkyIkOYUyyhbtPucpVtOMmP7WSb5/MpbdvquiyL3G43GYZBxnHU88fjof40Terf73f1u65bYz4Ai6KQIAikLEsNdBxHfN/XC4B4nqd+3/ea1Pw8z/UOJD4AyWKZuBBFkcRxrO8IBohE7M3nYf96vfYMYQHLNE0lyzINIrOxwJIkUf96vapfVZWEYajnO4YAUjfYUS8AYQAo7zBYUwoDRMH5fBbXddeYFZAMyAOIlQaRwMwSbOOp72FTsHme9SIMkAc7yoA0wHhnSYlFiYF/BSSABwDGgj3g+FYKHs4AZD2cQ5stmgKAZbUVpowKLOn2luEhIAEEbs0AkUpNkWsfQF3Xx5KRdrlc1hH5a3YJMLpKx/kQTPZubDhomkbl/AdoE0B3aZR9il8l/+Ln8AZ5dEVC+C6WtAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;depicts the data that flows between different roles, independent of protocol or use case&quot;
        title=&quot;&quot;
        src=&quot;/static/3983e5d47702b9b6609a4463ede8fcd9/39600/cover.png&quot;
        srcset=&quot;/static/3983e5d47702b9b6609a4463ede8fcd9/1aaec/cover.png 175w,
/static/3983e5d47702b9b6609a4463ede8fcd9/98287/cover.png 350w,
/static/3983e5d47702b9b6609a4463ede8fcd9/39600/cover.png 700w,
/static/3983e5d47702b9b6609a4463ede8fcd9/57cd1/cover.png 1050w,
/static/3983e5d47702b9b6609a4463ede8fcd9/5ece7/cover.png 1200w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 1 depicts the data that flows between different roles, independent of protocol or use case.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Attester role is assigned to entities that create Evidence that is conveyed to a Verifier.&lt;/p&gt;
&lt;p&gt;The Verifier role is assigned to entities that use the Evidence, any Reference Values from Reference Value Providers, and any Endorsements from Endorsers, by applying an Appraisal Policy for Evidence to assess the trustworthiness of the Attester. This procedure is called the appraisal of Evidence.&lt;/p&gt;
&lt;p&gt;Subsequently, the Verifier role generates Attestation Results for use by Relying Parties.&lt;/p&gt;
&lt;p&gt;The Appraisal Policy for Evidence might be obtained from the Verifier Owner via some protocol mechanism, or might be configured into the Verifier by the Verifier Owner, or might be programmed into the Verifier, or might be obtained via some other mechanism.&lt;/p&gt;
&lt;p&gt;The Relying Party role is assigned to an entity that uses Attestation Results by applying its own appraisal policy to make application-specific decisions, such as authorization decisions. This procedure is called the appraisal of Attestation Results.&lt;/p&gt;
&lt;p&gt;The Appraisal Policy for Attestation Results might be obtained from the Relying Party Owner via some protocol mechanism, or might be configured into the Relying Party by the Relying Party Owner, or might be programmed into the Relying Party, or might be obtained via some other mechanism.&lt;/p&gt;
&lt;h2&gt;Layered Attestation Environments&lt;/h2&gt;
&lt;p&gt;An Attester may consist of one or more nested environments (layers). The bottom layer of an Attester has an Attesting Environment that is typically designed to be immutable or difficult to modify by malicious code. In order to appraise Evidence generated by an Attester, the Verifier needs to trust various layers, including the bottom Attesting Environment. Trust in the Attester&apos;s layers, including the bottom layer.&lt;/p&gt;
&lt;p&gt;In layered attestation, Claims can be collected from or about each layer beginning with an initial layer. The corresponding Claims can be structured in a nested fashion that reflects the nesting of the Attester&apos;s layers. Normally, Claims are not self-asserted, rather a previous layer acts as the Attesting Environment for the next layer. Claims about an initial layer typically are asserted by an Endorser.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/089f84a6f2b877633c479bcee844dd5d/140de/layered-attestation.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAABdUlEQVR42q2V6Y6CUAxGff/H44/EKIsGZVMRF9ygk9OkhjgjXmeGpAGa3HO/r+2FkfzzNfop2XWdHI9HqetaTqeTnM9nKYpCsizTXJ7ncr1ePwPudjtJ0/QBPRwOGsB53+/37kAu1ABEKRHHseZut5uCV6uV5p2Bs9lMxuOxrNdrWS6XMp1OZTKZyGKxUDD5qqrcgPf7/WHNakgJNpuNNE2jKsuylMvl8h7Ytq1CsMNiYHYHQNi7Uw1NnXUVNeQIQADpMM1KkuSbykGg7/tqja5bHgCbbLdb8TxP72+BLAJCN4Mg0EWoIk9JeKamNOp5fF4qxJKNDkDbCHXcqTEbsrGzZRubMAx1jObz+QNG4+wQvO0yxWcRtlAKFKUMM0BgKH2GDQKtjrwDJqzDr0ZmsCl2/LCK/SiKtAQ8/woIjKOFZYISYB27r740gyelrwJVjA+b9B04K6SG/aB+qGN8aMZHlmkECvpnF4uArCE8f/TF/ssv4AtXZB4lpHGQ1AAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Layered Attestation Environments&quot;
        title=&quot;&quot;
        src=&quot;/static/089f84a6f2b877633c479bcee844dd5d/39600/layered-attestation.png&quot;
        srcset=&quot;/static/089f84a6f2b877633c479bcee844dd5d/1aaec/layered-attestation.png 175w,
/static/089f84a6f2b877633c479bcee844dd5d/98287/layered-attestation.png 350w,
/static/089f84a6f2b877633c479bcee844dd5d/39600/layered-attestation.png 700w,
/static/089f84a6f2b877633c479bcee844dd5d/57cd1/layered-attestation.png 1050w,
/static/089f84a6f2b877633c479bcee844dd5d/140de/layered-attestation.png 1100w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The example device illustrated in Figure 2 includes (A) a BIOS stored in read-only memory, (B) a bootloader, and (C) an operating system kernel.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The first Attesting Environment, the ROM in this example, has to ensure the integrity of the bootloader (the first Target Environment).Claims relating to the integrity of the bootloader have to be measured securely.&lt;/p&gt;
&lt;p&gt;After the boot sequence is started, the BIOS conducts the most important and defining feature of layered attestation, which is that the successfully measured bootloader now becomes (or contains) an Attesting Environment for the next layer. This procedure in layered attestation is sometimes called &quot;staging&quot;.&lt;/p&gt;
&lt;p&gt;It is important that the bootloader not be able to alter any Claims about itself that were collected by the BIOS. This can be ensured having those Claims be either signed by the BIOS or stored in a tamper-proof manner by the BIOS.&lt;/p&gt;
&lt;p&gt;Continuing with this example, the bootloader&apos;s Attesting Environment is now in charge of collecting Claims about the next Target Environment, which in this example is the kernel to be booted. The final Evidence thus contains two sets of Claims:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one set about the bootloader as measured and signed by the BIOS,&lt;/li&gt;
&lt;li&gt;a set of Claims about the kernel as measured and signed by the bootloader.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This example could be extended further by making the kernel become another Attesting Environment for an application as another Target Environment. This would result in a third set of Claims in the Evidence pertaining to that application.&lt;/p&gt;
&lt;p&gt;The essence of this example is a cascade of staged environments. Each environment has the responsibility of measuring the next environment before the next environment is started.&lt;/p&gt;
&lt;p&gt;In general, the number of layers may vary by device or implementation, and an Attesting Environment might even have multiple Target Environments that it measures, rather than only one as shown by example in Figure 2.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
&lt;p&gt;To be continued in the next blog post&lt;/p&gt;
&lt;br /&gt;
&lt;hr&gt;
&lt;br /&gt;
References
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ietf.org/archive/id/draft-ietf-rats-architecture-22.html#I-D.ietf-teep-architecture&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Remote Attestation Procedures Architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Protection against vulnerabilities at boot time with Linux Secure Boot Process]]></title><description><![CDATA[Secure Boot is a security feature found in the UEFI standard, designed to add a layer of protection to the pre-boot process]]></description><link>https://gufranmirza.com/blogs/linux-secure-boot/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/linux-secure-boot/</guid><pubDate>Wed, 15 Nov 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Computers are vulnerable during the boot process if they are not secured. The kernel, hardware peripherals and user space processes are all initiated at boot and any vulnerability in the boot firmware can have cascading effects on the entire system.&lt;/p&gt;
&lt;p&gt;When enabled and fully configured, UEFI secure boot helps the software running on top of UEFI resist attacks and infection from malware. UEFI secure boot detects tampering with boot loaders, key operating system files, and unauthorized option ROMs by validating their digital signatures. Detections are blocked from running before they can attack or infect the system.&lt;/p&gt;
&lt;p&gt;UEFI secure boot works like a security gate. Code signed with valid keys (whose public key/certificates exist in the DPU) gets through the gate and executes. However, UEFI secure boot blocks at the gate and rejects a code that has a bad signature or no signature.&lt;/p&gt;
&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;The boot process is authenticated by default. Authentication is based on the verification of digital signatures.&lt;/p&gt;
&lt;h3&gt;Integrity verification&lt;/h3&gt;
&lt;p&gt;The integrity of the boot firmware must be proven before trust is established in user space processes. This requires a secure mechanism to establish integrity.&lt;/p&gt;
&lt;p&gt;Such a mechanism should be implemented into low level computer initialisation firmware like UEFI, as validating the boot process integrity at this low level assures that a device has started up in a secure state.&lt;/p&gt;
&lt;p&gt;Standard requirements and recommendations for boot integrity measurement are following (NIST 800-155):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable endpoints to measure the integrity of all executables and configuration metadata at boot time&lt;/li&gt;
&lt;li&gt;Securely transmit measurements of integrity&lt;/li&gt;
&lt;li&gt;Provide the hardware support necessary to implement credible root of trust for integrity measurements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The root of trust is the most critical element for integrity determination. It can be implemented in hardware through secure elements or Trusted Platform Module (TPM) or coded in software using cryptographic libraries (Trusted Execution Environment).&lt;/p&gt;
&lt;h3&gt;Chain of Trust&lt;/h3&gt;
&lt;p&gt;Each component in the boot sequence cryptographically validates the authenticity of the subsequent component in the boot sequence. Every component is measured before it is loaded in the runtime memory space. If an improper or unsigned component is detected, the boot process is stopped.&lt;/p&gt;
&lt;h3&gt;Digital keys&lt;/h3&gt;
&lt;p&gt;We can use either of the hardware or software root of trust for secure boot. Security admins can create and store the digital keys used to validate the boot sequence in either a secure element, a TPM device or a software TEE&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Typical Boot Process&lt;/h2&gt;
&lt;p&gt;When an Ubuntu machine boots, it goes through 4 main phases.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;BIOS phase- firmware on motherboard, typically stored as a form of read only memory (ROM), contains code to initialize the hardware components of the computer and obtain the code for the bootloader.&lt;/li&gt;
&lt;li&gt;Bootloader phase- loads the operating system into memory along with an inital ram disk filesystem (initrd).&lt;/li&gt;
&lt;li&gt;Kernel phase- the kernel executes the init script inside the initrd filesystem. This loads hardware drivers and mounts the root partition.&lt;/li&gt;
&lt;li&gt;System startup- the operating system loads system daemons and services, sets up the network, mounts file systems, starts system logging, and performs other initialization tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is common for a 512-bit partition to be present on Linux systems called the Master Boot Record (MBR). This partition contains the bootloader (GRUB, LILO, yaboot, or others) and boot records. This is one of the places that Linux can be booted from.&lt;/p&gt;
&lt;h3&gt;Pre-bootloader (Shim)&lt;/h3&gt;
&lt;p&gt;When enabling Secure Boot, it is important to understand shim. In the context of SecureBoot, a shim is a pre-bootloader program that is designed to work with Secure Boot firmware. It allows for bootloaders and kernel modules to be loaded and executed if they are not included in the Secure Boot database. In Ubuntu, the shim loader is pre-installed and signed by the Microsoft certificate authority.&lt;/p&gt;
&lt;p&gt;Secure Boot uses asymmetrical cryptography, meaning that a public and private key are used. The key pair can be generated by the user and the private key is used to sign all programs that are allowed to run, including the GRUB bootloader. The firmware on the BIOS or UEFI will use the public key to verify the checksums and signatures of programs before allowing them to execute.&lt;/p&gt;
&lt;h3&gt;Boot loader&lt;/h3&gt;
&lt;p&gt;UEFI Secure Boot allows users to install their own keys and sign boot loaders themselves, and in that case the boot loader can do whatever the
user is comfortable with. Typically, that means that the boot loader must not execute any unsigned code in a firmware context, that is, before ExitBootServices is called just before jumping into the kernel.&lt;/p&gt;
&lt;h3&gt;Kernel Signing&lt;/h3&gt;
&lt;p&gt;Intention of secure boot is to protect against malicious use or modification of pre-boot code, before the ExitBootServices UEFI service is invoked. Currently, this call is performed by the boot loader, before the kernel is executed.&lt;/p&gt;
&lt;p&gt;The kernel is the core code of the operating system, providing access to hardware and other services. The bootloader starts the kernel running. To keep kernels to a reasonable size and permit separate modules for separate hardware, modern kernels also use a file system which is present in memory, called an &apos;initrd&apos; for &apos;initial ram disk&apos;.&lt;/p&gt;
&lt;p&gt;Both the kernel file to load and the initial ram disk are normally specified as options to the boot loader.&lt;/p&gt;
&lt;p&gt;The kernel launches the init script inside the initrd file system, which loads hardware drivers and finds the root partition.&lt;/p&gt;
&lt;h3&gt;System startup&lt;/h3&gt;
&lt;p&gt;After the kernel is running, the remainder of the operating system is brought online.&lt;/p&gt;
&lt;p&gt;First the root partition and filesystem is located, checked and mounted. Next the init process is started, which runs the initialization scripts. These scripts involve different /etc/rc scripts and upstart events that eventually gives you a ready-to-use computer with a login screen.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Booting components&lt;/h2&gt;
&lt;h3&gt;MBR (IBM-compatible PCs)&lt;/h3&gt;
&lt;p&gt;The master boot record is the first sector on a disk and contains in general a partition table for the disk and a simple boot loader. This simple boot loader will in most cases just look for an active partition on the same disk and jump to the boot sector on that partition. The boot sector will contain the real boot loader.&lt;/p&gt;
&lt;h3&gt;GRUB Boot loader&lt;/h3&gt;
&lt;p&gt;Because the GRUB boot loader provides menus of choices and can handle many different forms of hardware, it is larger than the code which can fit in a single MBR. It has 3 stages: stage 1 in the MBR, stage 1.5 in the remainder of the first cylinder of the disk, and stage 2 within in file on the disk.&lt;/p&gt;
&lt;p&gt;Grub will find the /boot/grub/menu.lst which configures its interactive menu. The location of the menu.lst, as well as stage1.5 and stage2 files, is hard-coded into grub when it is installed to the boot sector. Grub locates and loads the kernel and the initrd, using BIOS calls and its build-in recognition of file systems (thanks to the different available stage1.5 parts). And finally boots the kernel.&lt;/p&gt;
&lt;p&gt;In some cases, the operating system is split over several partitions (like /usr), and these partitions are mounted by the boot scripts as soon as they can be.&lt;/p&gt;
&lt;h3&gt;Chain of Execution&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;First, the BIOS has to find the boot loader and this depends on your hardware&apos;s capabilities.&lt;/li&gt;
&lt;li&gt;Second, the boot loader has to find the kernel and initrd. It will likely use BIOS calls, so this again depends on your BIOS.&lt;/li&gt;
&lt;li&gt;Finally, the kernel will boot and must, with the help of the initrd, find the root partition&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;root partition&lt;/h3&gt;
&lt;p&gt;The root partition with the operating system can be somewhere completely different than the kernel, for instance on another drive or on a remote computer. In some cases the kernel may not find the root partition on the disk, because the initrd is missing the modules to access the partition. If this your case, rebuild your initrd to include the missing modules (see man mkinitramfs and man update-initramfs).&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
References
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wiki.ubuntu.com/Booting&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Ubuntu Booting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://lists.ubuntu.com/archives/ubuntu-devel/2012-June/035445.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;UEFI Secure Boot and Ubuntu - implementation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Bits and pieces of confidential virtual machine architecture]]></title><description><![CDATA[In this post, we will look into confidential virtual machines (CVMs) and its core building blocks.]]></description><link>https://gufranmirza.com/blogs/confidential-virtual-machine-architecture-cvm-1/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/confidential-virtual-machine-architecture-cvm-1/</guid><pubDate>Sat, 04 Nov 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Confidential Computing enhances the security of public cloud platforms by adopting a nuanced approach rather than an all-or-nothing strategy. It minimizes the vulnerability of a cloud environment through the implementation of a defense-in-depth architecture.&lt;/p&gt;
&lt;p&gt;This is accomplished by leveraging security technologies embedded in central processing units (CPUs), including the AMD SEV technology, Trusted Platform Modules (TPMs), and the built-in security features of operating systems like Ubuntu. Now, let&apos;s explore how these protective measures are implemented within the cloud environment using Ubuntu.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Runtime VM Memory Encryption&lt;/h2&gt;
&lt;p&gt;Confidential VMs are powered by AMD&apos;s SEV technology, which encompasses SEV, SEV-ES, and SEV-SNP. These VMs operate within a secure environment, employing AES encryption to safeguard their memory and CPU registers. This robust encryption guarantees that neither other VMs nor the host administrator can access the data being processed. The operational concept can be visualized in the simplified diagram below.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 307px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e0804e0ee8dbcdb07d6854d8203dab7e/c1cfc/hv1.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 90.28571428571429%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB+UlEQVR42qVUyaoiQRD0373oVQQFL6JHEcENEUFRVFAUUVzQ577v+77EIxJKRObNOLyGoLKzKqMzMrNa83g8cD6fcTqdBMfj8QnlI3juk0ezXq9ht9ths9kEtBWUz2q1YjAYSMC/iDWz2QxGoxEmk0lWrVYLvV4PnU4n72azGQaDAV9fXxJwv9//TrhareB0OuHxeAQulwsWiwUOhwNerxdut1t8vV7vswwvlwsikQiCwaCsiUQCnU4H0WhUfOFwGLFYDPzwR4Q8sN/vsVgssFwusd1ucbvdsNvtxCY2m434PmqKMthpZvvbRwg5IipDZvtrQsoajUbodruYz+cyIrQ5Af1+H8PhEOPxGNfr9XNCRcLiUzoxnU7RarXQaDSEmGVRjfkTnoS8CZTL7N4l8yBL8l+S2UHKew1U3Wf23KPNzr9DTYKajmdTOLhKkvJxHuv1OiqVikifTCbPEhAskRorKuQHNLxKdLJ2lMxN+rhJonQ6jWQyiXw+LySFQkGGn/5yuSzTwVj+E6hCCHlPGVytVtFsNnE4HOSLJAmFQvD5fIjH42i320Lu9/sRCARQLBYlJpvNolarSZzmvWvq8nOTcjOZjGRTKpWk01xTqRRyuZwkomrJDEXyT91iDdkMyiGUNGauVmWrfZH8E6H68b6C4/X+/gqq+wboyUzHGtWzwgAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;hv1&quot;
        title=&quot;&quot;
        src=&quot;/static/e0804e0ee8dbcdb07d6854d8203dab7e/c1cfc/hv1.png&quot;
        srcset=&quot;/static/e0804e0ee8dbcdb07d6854d8203dab7e/1aaec/hv1.png 175w,
/static/e0804e0ee8dbcdb07d6854d8203dab7e/c1cfc/hv1.png 307w&quot;
        sizes=&quot;(max-width: 307px) 100vw, 307px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;While the CPU is in the guest VM mode, it consistently encrypts the memory locations it writes to and decrypts them when reading. Each VM is allocated specific memory areas, ensuring that in the event of a hypervisor breach, one VM cannot access the memory of another VM; it can only access an encrypted version of it.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 314px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/db079babe35a4a85f67ab225f06bb8ba/41d8d/hv2.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 112.57142857142857%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAXCAYAAAALHW+jAAAACXBIWXMAAAsTAAALEwEAmpwYAAACk0lEQVR42p1U+UuiURT1z28aKggJF5DAfglEQgWX3ComNarRXIMBl6zcstQ01868c5knOZUtHxzu9+73vXPPve++axgOh6jVanPc3t6+wstv3W4Xyx7D6ekpNjc3YTabYTKZYLFYYLVaFyz9/G40GuF0OpcTHh8fzwmJjY0N/FhZEbu+vi6WhAQJd3d3MZvNlhNSyc7ODux2u5D+XF3F2tqakHFNP7G9vQ2Hw4HpdPo+YT6fh9frxf7+PqLRKILBII6OjmCz2eByuRCJRBAKhQT8Jx6PYzKZvE9Yr9fhdrvh8XiEkJu4+erqColEAnt7e/D7/QiHwwgEAkilUstryGgPDw/odDpiNVinx8dHOdVmswkGpp++pYT65fn5GU9PT2Ab0fZ6PfT7/fn7eDzGZx6DJmPku7s72ci19r+FDwmZVqPRkLRpqeq7jxCyNvf392i320LI9UuFXyakwmq1ivPzc5TLZSH9qPgfKqS6gToEIVOH0FE+XQat9tOErFmr1RJSps6D6SrSm5sbWX+ZUD+j0Qgjda2ql5cIbm1hoNIeKl9XqWQLESyFtmynl+CVnBOykdnANdXAf3I5/FK3p1Qsypoqqfb6+los660bnd8IthwznBOSndctm80iowjT6o4XCgUBSTKZDNLpNH6rg8srH2cACQeDgaijYq4XFBaVIm7kBOLdPTs7kwClUknucCwWEz9nKP31f+rZJcQrQrYMf+aA8Pl8gtTFhSgnGf2cTBwWDEwBnEYnJydIJpNCvkBIJYx8eHgok4XkTJmBmO7BwYH4qTynysK66ZT1cJkTcuqw7yqVihDQUgEPgOkw2P9+fdK0xIJC9hkj6npo6Oi0b/kJrrl3QaFOm+PrO2APU9RfYRyqlxYuCfUAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;hv2&quot;
        title=&quot;&quot;
        src=&quot;/static/db079babe35a4a85f67ab225f06bb8ba/41d8d/hv2.png&quot;
        srcset=&quot;/static/db079babe35a4a85f67ab225f06bb8ba/1aaec/hv2.png 175w,
/static/db079babe35a4a85f67ab225f06bb8ba/41d8d/hv2.png 314w&quot;
        sizes=&quot;(max-width: 314px) 100vw, 314px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This model empowers the creation of private VMs within the public cloud, making them suitable for handling sensitive workloads. However, it&apos;s important to note that this represents just one aspect of cloud security. While runtime memory encryption plays a vital role in this security framework, workloads running in the cloud are typically loaded from the cloud&apos;s infrastructure, often from a hard disk.&lt;/p&gt;
&lt;h2&gt;VM Encryption at rest&lt;/h2&gt;
&lt;p&gt;Ubuntu&apos;s operating system takes care of safeguarding data while it&apos;s at rest. Through its robust full disk encryption capabilities, Ubuntu guarantees that all data written to the disk is encrypted and decrypted using AES. Additionally, it ensures the validation of each boot step through the UEFI secure boot process. The key necessary for disk encryption is securely stored within the virtual disk in an encrypted format.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 304px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/609b1a08843830e5cba08aab07ba1c90/45ea4/disk-enc.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 59.42857142857143%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB9UlEQVR42lVTiY7aQAzN//8NhXYrVHXDQso2BFLBBhKuhPsm3CACvM4zG8SOZNmOPW+ej2i32w3b7VbkcDhgv98r2T30bneXu3+Xw2Ev3+J7lPV6jfP5DI3OeDxGr9eD53moVqtoNJpwPlw0Gz5msxm63S7cmitx1/XgVDz4fgebzUaAKGEYSq7GF13XxXA4VEANZLNZVB0Xb79smEYNpZKNyWQCx6ki/56HXfzA758WSqb7YEpgElsslndAsqIQLJn8BtMs4O97EeV/DiqVisReX3UVS6JgWvhjFBTjhrSIQMfjEafTSQEuoPGFer0O27aRyehKMgJcKhXR6QQSsywLuq5iegZGLgeraElFBCH7fD6PcrmMcBl+Anp1lWh8Mkzh5ceLJPl+AE/1TFdAOQWUSCSQTqdhGAYGg6EwXC6XaDabaLfbYkvJHEKtVpNXUqnvUqbjODIM9pU9JkuWzMEwToa8y5LJlGULYDwlTno0GmE+n4mmzwtsOC/T5xRpT6fTxzrF60M9n8+hEZ0J8S6tVqsvq/DsPwu/Mx7nEIy2BnWi6CKUoyjC5XIR/WxTx/b1en34FPpcaAp/EgGMDyfa7/eFMTVLZx8p8fKzn5wsY9QcBquMzxdAgjAh1hwUbT7UarUQBIHsJIEZHwwG4rM6HjL8Dwf4cqSLIolUAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;disk enc&quot;
        title=&quot;&quot;
        src=&quot;/static/609b1a08843830e5cba08aab07ba1c90/45ea4/disk-enc.png&quot;
        srcset=&quot;/static/609b1a08843830e5cba08aab07ba1c90/1aaec/disk-enc.png 175w,
/static/609b1a08843830e5cba08aab07ba1c90/45ea4/disk-enc.png 304w&quot;
        sizes=&quot;(max-width: 304px) 100vw, 304px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The guest operating system is also responsible for providing greater security to the data at rest. As access to storage volumes is normally arbitrated by the host, the only feasible way for delivering confidentiality is encryption.&lt;/p&gt;
&lt;p&gt;Opting for full disk encryption, rather than encrypting specific data volumes, appears to be an attractive approach. However, a key consideration arises: Is it feasible to encrypt every element comprehensively? Given that we cannot depend on the host to handle decryption on our behalf, it necessitates retaining some decryption code in an unencrypted form.&lt;/p&gt;
&lt;p&gt;Key to decrypt the encrypted part of the storage volume must be automatically accessible to the genuine VM but to no one else. The most common way this is currently achieved is by using a virtual Trusted Platform Module (vTPM) backed by hardware.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 636px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b1193cf4fbf303504de9b654e5e40dd8/8cfac/disk-enc2.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 20%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAAsTAAALEwEAmpwYAAABFElEQVR42mXKy0oCcRiG8X9dR6uQ1t1I6+5gQMhNuepALkIlD9HS8lDRSp1IQdLMdBQlIqGSEtpk6XioxkCkMMunadoEvfDjg4dPjIDPP750La2H2nzisVanWW/z0tFoPKi01Q6tRgftucvPRiP+TbyVNxlkJIYFC0Nljg/d+4mZ8/IuiYpM8jpMqhLl6CpMshLh+EYmfSuTvYuTqR4aTqsxvUe5uC8gBnvT9OyC2uo4qk3QXhsDryAiz+AsLuJVFvDkrbj1a4uZWQpLLEclVg4kXLl5o3sUK46shUBpHdFPzNIPTKD5p+j6TbwGTAx2JkmlrfjONgjpT8GSy7Cdd+LL2g1bOQfB4m8Pldz4Cnbil/t8AyOM+7sAFPbcAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;disk enc2&quot;
        title=&quot;&quot;
        src=&quot;/static/b1193cf4fbf303504de9b654e5e40dd8/8cfac/disk-enc2.png&quot;
        srcset=&quot;/static/b1193cf4fbf303504de9b654e5e40dd8/1aaec/disk-enc2.png 175w,
/static/b1193cf4fbf303504de9b654e5e40dd8/98287/disk-enc2.png 350w,
/static/b1193cf4fbf303504de9b654e5e40dd8/8cfac/disk-enc2.png 636w&quot;
        sizes=&quot;(max-width: 636px) 100vw, 636px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;While it doesn’t seem to be possible to hide it, the true requirement is to make sure the untrusted host cannot modify it unnoticed. To achieve that, code signing technologies like UEFI SecureBoot can be utilized. SecureBoot is a technology which guarantees that only the code trusted by the platform vendor is executed when the system boots, allowing it to prevent attacks on the system before the operating system is fully loaded.&lt;/p&gt;
&lt;h2&gt;VM Encryption during boot time&lt;/h2&gt;
&lt;p&gt;With confidential disk encryption, the root volume of a VM is pre-encrypted prior to the first boot on the target host. Some parts of the volume must remain unencrypted. In particular, all the code required to obtain the key to the encrypted part of the volume and perform the decryption must remain as cleartext.&lt;/p&gt;
&lt;p&gt;When the root volume of the operating system is encrypted, the decryption must happen in the initramfs; meaning that the bare minimum unencrypted volume must include all pieces of the boot chain up to the initramfs:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 365px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3dafb9b06d001623527b6618fb9b19aa/02681/boot-w.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 114.28571428571428%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAXCAYAAAALHW+jAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEc0lEQVR42m2U/U9TdxTGT28Tf1riQrQo23CbuGzz//CHvWRzTh1L9sImzmW+YciWuGDFghZERMycAk43dG6S0VLUOQeo22C+AF2ZRmaHaGuhhdICbWnL99579tzedmK1zSfne895zrnnPrdAhI/jsmvdtaEQ9wwGEj2DfqHx5z8B0eW6Ky70ukWn847S5RxWOpxD4tLAPZHRaHTf8iecngjbLzqLKPP54+bwBm+C2R1mGfDtkMpDU8xX3ePc0evmzj43X3Te4Uuue6ncv5MpLetaRQ6ozL+53MX/D2w88/dLbde8W89e83zWft2zMcOvA8FNZ/pG1ncNBvs7bgT6z/b6is8PBDbN1TjQ47h+f9sRx8CLqWEXS2nRhJVq41Zqi1dRK6JNY7aabEqNZOfd1OL9bsXo/RMrRrUz75PsWi2jS/VUkX28ivb/YiYTBWvpHNsNrNqNMtuMnMJu5PiPRp5oNHKoychj9Qb21hKHj+N82MiJU7pGTetTvZgxUUdtFD1MyeRuUqaLSImuIyUOksWkTH1IimetzvAag6rhKyTFvQpa1BLQxKCNIkaKSJatxP56mqZoE6mx94gFEbOBeBzRBwIgTPp1BIymc5PpGAVJoEhAOxcRD9eRSrH0QK2oYuAYohd40kO04WHkRwz62Z+ua4NngCzpyyQ+Ir5XRwpFvyJVVKO4lTi+jXgWyGlECXKfo3mpjnaWS/RaEiS26T2xLXg6eOypxsDIQVL5azTvgxBJUavHFMgpB4mn3gd4CvWgnpNrH2a2BgMPY0MrBsYaSY0U6z7NGPTHyBADIRCcByvm6X7OZCPpfs68iw3r0gNjGCinXwrTA1RtWNo3X9pTzkbSdcnCjIeHSE2WY8PXsdGbWbyBO69GLR9bmODXqsdoVqL+KhYqw4Y1mocH4GETDP4Gd8nmKIacwGZr8ZZfQ3Mz/Dr6qC6OHB/DwD0kU+QIfqB4S9HFKCwB+Q+T0MAbThSAx9Tjz+JG2D75CX6HtdojH6MEPJThh4CHIhXnkABuInmQ8BdBj9bhoRZn44Wk+o/QFAUbJAebJZafkRQukJiXzuF5sExi5UmJxXycs+tL9bqaJ8lcKvHEUeknCqymJybLaUe4mton95IN2DNMV1PbWD21jOdTf3AB3fDvoxYtN1ej9YT3UntoF5m1WVTuKK0xd+z63tK5o7mi03xiLuU/l50s/73yWN2pzZcPHN9wRTtXdO08ma3Tend2lp8y20utdOiKWf325h5u6K/gRmeavypwbeFKRwlbbFt4++mN/GXrZrZo4LrJVflACxr6LNw8WMU1F76Qqf582eynVwuFKZAjnhrLFXkjJpE3CnwmsRhx0f0FwnQ3R87zLpRzPQvEYt9Cva4RMImnA7kiZ3y+KHK9JaynS5PUcMnCHw+8zfjHwwZ8KUJMXjAC/MAHxkEIBMAECIJRME0s4YsTv3P7Fd5v285kbS29td6xhl/ofk4s7y6QX+6ZQ3cWPVkRLO9eJhf0LJn94NxKrvihxPUfl1Qxc2yth5oAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;boot w&quot;
        title=&quot;&quot;
        src=&quot;/static/3dafb9b06d001623527b6618fb9b19aa/02681/boot-w.png&quot;
        srcset=&quot;/static/3dafb9b06d001623527b6618fb9b19aa/1aaec/boot-w.png 175w,
/static/3dafb9b06d001623527b6618fb9b19aa/98287/boot-w.png 350w,
/static/3dafb9b06d001623527b6618fb9b19aa/02681/boot-w.png 365w&quot;
        sizes=&quot;(max-width: 365px) 100vw, 365px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The key to the encrypted part needs to be revealed during the initramfs boot phase so the boot sequence can continue to the operating system. This also means that all the code running in the VM up to that point must be verified to prevent a possible attack from a compromised host trying to reveal the encryption key. For example, if the initramfs is not verified, then the host can try injecting some malicious code into it to steal the key.&lt;/p&gt;
&lt;p&gt;The established standard for boot time code verification is UEFI SecureBoot, which guarantees that only code trusted by the platform vendor is executed when the system boots. Traditionally, SecureBoot scheme covers the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First stage bootloader (shim)&lt;/li&gt;
&lt;li&gt;Second stage bootloader (GNU GRUB)&lt;/li&gt;
&lt;li&gt;Linux kernel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The vTPM operates within the Guest VM address space, so it is protected by the run-time memory encryption of the CPU, and is also encrypted at rest.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
References
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/rhel-confidential-virtual-machines-azure-technical-deep-dive&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;RHEL confidential virtual machines on Azure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ubuntu.com/blog/how-we-designed-ubuntu-pro-for-confidential-computing-on-azure&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Ubuntu Pro Confidential Computing on Azure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Zero Trust Architecture and Confidential Computing]]></title><description><![CDATA[How on-chip security features (TEEs) that can significantly boost your Zero Trust solution architecture.]]></description><link>https://gufranmirza.com/blogs/zero-trust-and-confidential-computing/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/zero-trust-and-confidential-computing/</guid><pubDate>Sun, 29 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Historically, safeguarding corporate assets relied on perimeter-based security measures, with a clear division between trusted users and data on the inside and potential threats on the outside. However, as the world evolved, remote work became the norm, and individuals began connecting to their corporate networks from various locations, including their homes or while traveling.&lt;/p&gt;
&lt;p&gt;Additionally, the rise of cloud computing enabled data and workloads to migrate outside the traditional data center. As a result, the conventional security perimeter became obsolete. In response to this shifting landscape, a new approach was needed, giving rise to the concept of Zero Trust.&lt;/p&gt;
&lt;h2&gt;What Exactly is Zero Trust?&lt;/h2&gt;
&lt;p&gt;The most authoritative source on the subject is &lt;a href=&quot;https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-207.pdf&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;NIST Special Publication 800-207&lt;/a&gt;, titled &quot;Zero Trust Architecture.&quot; According to this publication, zero trust revolves around the idea of managing identity and access to resources within an enterprise network.&lt;/p&gt;
&lt;p&gt;The fundamental principle is that no entity should be automatically trusted solely because it belongs to a particular network or is located in a specific physical location. In essence, zero trust involves assuming that a breach of the enterprise network has already occurred. In line with this perspective, NIST identifies encrypting all network traffic and implementing session-based access control for network resources as key pillars of the &quot;basic tenets&quot; of zero trust.&lt;/p&gt;
&lt;p&gt;This stands in contrast to traditional security models where everything within the enterprise network is inherently trusted, while everything outside is not. In such a traditional model, once attackers breach the network, such as bypassing the firewall, they gain access to all resources on the enterprise network.&lt;/p&gt;
&lt;h2&gt;How Does Confidential Computing Enhance Zero Trust?&lt;/h2&gt;
&lt;p&gt;Confidential computing enhances Zero Trust by providing a secure execution environment for sensitive workloads, even in untrusted environments. Zero Trust calls for constant verification of all resource access but ensuring that the underlying cloud infrastructure is reliable and secure might be challenging.&lt;/p&gt;
&lt;p&gt;The hardware-based security mechanism offered by confidential computing solves this problem by enabling the processing and storage of sensitive data in a safe enclave isolated from the host system and other potentially vulnerable components.&lt;/p&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;p&gt;Confidential Computing is the protection of data in use by performing computation in a hardware-based, attested Trusted Execution Environment.&lt;/p&gt;
&lt;p&gt;Confidential Computing Consortium, &lt;a href=&quot;https://confidentialcomputing.io/about/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://confidentialcomputing.io/about/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;p&gt;Confidential Computing, as thus described, can provide two properties which are excellent starting points for components wishing to exercise zero/explicit trust, which we’ll examine individually:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Isolation from the host machine/system, particularly in terms of confidentiality of data at runtime&lt;/li&gt;
&lt;li&gt;Cryptographically verifiable identity.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Runtime Encryption&lt;/h2&gt;
&lt;p&gt;One of the primary trust considerations for any executing component is the relationship it establishes with the system providing its execution capabilities, typically the host machine. Even when a component claims to have &quot;zero trust,&quot; it must still trust the host machine to maintain the confidentiality of its code and data. This reliance on the host machine and its administrators, including potential compromises, does introduce a substantial trust relationship. This situation seems incompatible with the concept of a &quot;zero trust&quot; architecture, but there are potential solutions.&lt;/p&gt;
&lt;p&gt;Confidential Computing offers a solution by enabling isolation from the host machine responsible for execution. While the component still needs to trust the CPU and firmware facilitating the execution context (because code must run, after all), this approach significantly reduces the number of trust relationships required. It also allows for cryptographic assurances to underpin this relationship, as outlined in the &quot;Attestation&quot; section.&lt;/p&gt;
&lt;p&gt;The assurance that a component is isolated from other components provides several benefits. It allows the component to have confidence in its operation, knowing it can function independently. It also enables other components to establish trust relationships with it, with the assurance that it acts autonomously and is not under the influence of a malicious actor.&lt;/p&gt;
&lt;h2&gt;Cryptographic Attestation&lt;/h2&gt;
&lt;p&gt;As mentioned earlier, zero trust emphasizes the importance of verifying the identities of entities on a network and implementing access control based on sessions and resources. Without hardware-based remote attestation, access control primarily relies on cryptographic keys held by these entities, such as applications, services, or end-user devices, and unverifiable reports regarding aspects like patch levels. In this setup, if, for instance, the private key of a service gets compromised, an attacker can effectively impersonate that service.&lt;/p&gt;
&lt;p&gt;This is where confidential computing-style remote attestation makes a significant difference. It enables software to prove their precise identity and integrity to a verifier, which plays a crucial role in access control. Specifically, the verifier gains clear insights into the cryptographic hash of the software, the confidential computing features it utilizes (such as runtime encryption), and its public key. To forge this information, an attacker would need to compromise the remote attestation protocol of the confidential computing technology in use, such as Intel SGX or AMD SEV. While not impossible, this is a formidable challenge, beyond the capabilities of most attackers.&lt;/p&gt;
&lt;p&gt;In light of this, it&apos;s reasonable to assert that confidential computing-style remote attestation brings a substantial enhancement to the verification aspect of zero trust. It shifts us from predominantly relying on certificate-based identities (which are susceptible to theft) to dynamically attested, semantics-based identities, offering a more robust foundation for trust and security.&lt;/p&gt;
&lt;h2&gt;Forging a &quot;Zero Trust&quot; Connection&lt;/h2&gt;
&lt;p&gt;These attributes enable the formation of zero (or &quot;explicit&quot;) trust connections with components operating within a Confidential Computing environment. This approach is a departure from traditional computing methods where any component&apos;s trust relationship is inherently tied to the environment in which it operates, typically the system providing its execution environment. Such a relationship is far from being a zero trust model and is often far from explicit.&lt;/p&gt;
&lt;p&gt;In a Confidential Computing environment, components can establish only a limited set of explicitly defined trust relationships, typically including the attestation service, the CPU/firmware provider, and the provider of the executing code. This results in a significantly more well-defined trust framework. While it may not achieve a perfect &quot;zero trust&quot; state, it at least moves closer to the concept of &quot;minimal trust.&quot;&lt;/p&gt;
&lt;br/&gt;
&lt;hr&gt;
&lt;br /&gt;
Related Posts
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.intel.com/content/www/us/en/cloud-computing/zero-trust-tech-guide.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Rethinking Zero Trust with Intel Technology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.edgeless.systems/blog/the-relationship-between-zero-trust-and-confidential-computing/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;The relationship between zero trust and confidential computing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.fortanix.com/faq/zero-trust-architecture/how-does-confidential-computing-enhance-zero-trust&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;How does confidential computing enhance Zero Trust?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[AMD Secure Encrypted Virtualization (SEV) on AMD EPYC™ Microprocessors]]></title><description><![CDATA[Confidential computing on AMD EPYC™ with built-in Encrypted Virtualization (SEV), which helps protect data in use.]]></description><link>https://gufranmirza.com/blogs/amd-secure-encrypted-virtualization/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/amd-secure-encrypted-virtualization/</guid><pubDate>Sat, 21 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Confidential Compute on AMD&lt;/h2&gt;
&lt;p&gt;Confidential computing helps keep data private while it’s in use. In the past, data remained undefended while it was being processed virtually or in the cloud. Confidential computing on AMD EPYC™ processors can be enabled using built-in security features like Secure Encrypted Virtualization (SEV), Secure Memory Encryption (SME) which helps protect data in use.&lt;/p&gt;
&lt;p&gt;AMD&apos;s memory encryption technologies that are designed to address these needs across a variety of systems and can be broadly divided into several categories&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Secure Memory Encryption (SME)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;defines a simple and efficient architectural capability for main memory encryption.&lt;/li&gt;
&lt;li&gt;SME is a general purpose mechanism that is flexible, integrated into the CPU architecture.&lt;/li&gt;
&lt;li&gt;Scalable from embedded to high-end server workloads, and requires no application software modifications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Secure Encrypted Virtualization (SEV)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Integrates main memory encryption capabilities with the existing AMD-V virtualization architecture to support encrypted virtual machines.&lt;/li&gt;
&lt;li&gt;Encrypting virtual machines can help protect them not only from physical threats but also from other virtual machines or even the hypervisor itself.&lt;/li&gt;
&lt;li&gt;SEV represents security paradigm to cloud computing where virtual machines need not fully trust the hypervisor and host system.&lt;/li&gt;
&lt;li&gt;As with SME, no application software modifications are required to support SEV.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;AMD Secure Encrypted Virtualization-Encrypted State (SEV-ES)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Encrypts all CPU register contents when a VM stops running.&lt;/li&gt;
&lt;li&gt;Prevents the leakage of information in CPU registers to components like the hypervisor.&lt;/li&gt;
&lt;li&gt;It can even detect malicious modifications to a CPU register state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;AMD Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adds strong memory integrity protection to help prevent malicious hypervisor-based attacks like data replay, memory re-mapping.&lt;/li&gt;
&lt;li&gt;Also, SEV-SNP introduces several additional optional security enhancements designed to support additional VM use models,&lt;/li&gt;
&lt;li&gt;It offers stronger protection around interrupt behavior, and offer increased protection against recently disclosed side channel attacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;SEV-SNP Memory Management&lt;/h2&gt;
&lt;p&gt;SEV-SNP allows a guest to separate its memory into shared and private memory. Shared memory is accessible to host software and is marked as hypervisor-owned in the Reverse Map Table (RMP), a data structure that stores the SEV-SNP security attributes of each page of memory in the system.&lt;/p&gt;
&lt;p&gt;Private memory is assigned to the guest in the RMP, writeable only by the guest, and encrypted with the guest’s unique memory encryption keys. The guest uses private memory to store sensitive data and its executable code. The CPU and IOMMU both enforce the access control policy for guest private memory by checking the RMP as required during address translation to ensure that the software or device accessing memory has sufficient privileges.&lt;/p&gt;
&lt;p&gt;This comes with limitations as the device can only operate within the shared memory space of the guest and cannot access the private memory of the guest. If the guest needs data to flow between its private memory and the assigned device, the guest must copy the data in and out of a shared buffer that is accessible by both the guest and assigned devices.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/7d769/sev-snp-mem.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 46.857142857142854%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABN0lEQVR42oWS6U7DMBCE+/7vBUob6F9EoRVUOWznPp178C40SkgRllZy7G9nx7vZ4dfSYQAdR6uzaZrQ9/2/HK3d8mMcBkjrEeGzvRHsum55ALU33NG+LziOI4IwRFWWUNYD1MFCnmWzK7pfCk6mMHHh095oj3NRFvR9H57noTPJk0ksnCsy9wqlFEpTIIoiDtd1IaWck3PnE4XnsNvBFAiNIeJ2eZ6D4rbc4AV+dGJHBDaNRlVViOMYaZrOTogT0Rvv6SVaa9R1ve4h2RfJCTJ5R5qlEEIwPP24KIqCXRDnx68I8guLENf13XYoBF7EAWfPNhVr465hsduU+6FnAXJ99ix8yCPatmGO+rwRJBd1U0C35fy0e1Om5G+uWnErQbpIkgRKKg7q11//IfVUCGkGF/B+KfgFr7W6hcehqiEAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;SEV-SNP Memory Management&quot;
        title=&quot;&quot;
        src=&quot;/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/39600/sev-snp-mem.png&quot;
        srcset=&quot;/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/1aaec/sev-snp-mem.png 175w,
/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/98287/sev-snp-mem.png 350w,
/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/39600/sev-snp-mem.png 700w,
/static/e8d8e12ada6cdc8c9430d30dd7ad1e83/7d769/sev-snp-mem.png 960w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 1: Diagram depicting bounce buffering required for a non-trusted device (left) and direct access to private memory by a trusted device (right).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;SEV Security Model&lt;/h2&gt;
&lt;p&gt;Traditional computing systems have operated using a ring-based security model. In this model, high privilege code has full access to the resources at its level and of all lower privileged levels.&lt;/p&gt;
&lt;p&gt;In the SEV model, code executing at different levels (namely hypervisor vs guest) is isolated so neither has access to the resources of the other. Even though the hypervisor level is traditionally “more privileged” than the guest level, SEV separates these levels through cryptographic isolation. Communication between hypervisor and guest is still possible, but those communication paths are tightly controlled.&lt;/p&gt;
&lt;p&gt;Consequently, SEV technology is built around a threat model where an attacker is assumed to have access to not only execute user level privileged code on the target machine, but can potentially execute malware at the higher privileged hypervisor level as well. The attacker may also have physical access to the
machine including to the DRAM chips themselves.&lt;/p&gt;
&lt;p&gt;In all these cases, SEV provides additional assurances to help protect the guest virtual machine code and data from the attacker. Note that SEV does not protect
against denial-of-service attacks against the guest.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 453px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7f4bea277866905a5b963166511dfc67/7b460/sev-sec-model.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 69.71428571428572%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAADAElEQVR42j2Ty28bVRTG/YexgRX/ACJskBASGxSBYMcKsUCIUiQKG1hAUBACFPVlp02wM6nt2Bm7fj/qpG7sJE78HL/HMx7b0a/33Na19Pneufec757Hd3zT6RTLspjP59i2zWw203tZ5VwwHo8ZjUa4rovneTiOo20E6zvBZDLBJ3/lcplYLMbh4aFe4/E4qVSKbrdLu91muVxqsmw2q23y+TyJRELbCKE8IpDHNaEYm6ZJOp0ml8vptdVq0ev16HQ6rFYr7SBEhmFQqVQ0uXyL/5qw3+/jk1DlJyQHBweEQiGKxaI+EzKJUggXi4UuidgIgsEgrWaThTd/UyYdoYQsKQmm9kzBVs4eNzcrTSgQMsdx9d1wOHxTW7F35x6uPVX39itCWzVlMrWJPC0RiBTwRwtEU2VtbKmUW622JneVw2L+qimu67C8gaQRIL5/F3sJc3UgJfJJ3sfFc/4J5vhj53+2Hxzyr1EiVqjRaDSUkWpMb0CiVCfz7JyhKpGn0vQUwdbXn/Db5ruUd27RyIexBiN8lWqdULZBKJIk+ssm4Tub7D0xeZS6JFMoc6VIg8lTAsdV7h+dEE1XVOQdrOGI+z98xl+fvkXm9gaZnz7kRTGFL116TrDYZX/7Z+59+Q7/ff42u3/eYTfX4SiZo3pWY/thhK17Blv+I/4ORIgfRTGTaRK/f4Xx7Qb+bz4geet9CuGH+J6d1ghmr9kLhQl9/zF7331EYM8g8PQSM12g3WoSV+n7zRfcjZ6otM/wVA0db0UtsU/uxw1yt9/D/PUL6mdVfD2rx5NMlcfpSx5HsuyGMzxIXLBvnlCv15VsOoyV1krPzzk9u2CiVCHTJRirZtbyMcrGDs2LGl1L6VC0JcUMZ055lKjiP1YlMMu0uxYdNSVXV9daNq4z091dk2moh+yZkpOjxlZpUey1sEW4Ip9mu8t1q6OjEJKe0pVIQWZXJkI0K+t6L77DQZ9B31L7IU0ldC3swWCgL8evsRavSEpgvSZej6Jg/b2GzLzgJeEU6ZRCWQQ9AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;SEV-SNP Memory Management&quot;
        title=&quot;&quot;
        src=&quot;/static/7f4bea277866905a5b963166511dfc67/7b460/sev-sec-model.png&quot;
        srcset=&quot;/static/7f4bea277866905a5b963166511dfc67/1aaec/sev-sec-model.png 175w,
/static/7f4bea277866905a5b963166511dfc67/98287/sev-sec-model.png 350w,
/static/7f4bea277866905a5b963166511dfc67/7b460/sev-sec-model.png 453w&quot;
        sizes=&quot;(max-width: 453px) 100vw, 453px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 2: SEV Security Model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;SEV Architecture&lt;/h2&gt;
&lt;p&gt;SEV is an extension to the AMD-V architecture which supports running multiple VMs under the control of a hypervisor. When enabled, SEV hardware tags all code and data with its VM ASID which indicates which VM the data originated from or is intended for. This tag is kept with the data at all times when inside the SOC, and prevents that data from being used by anyone other than the owner.&lt;/p&gt;
&lt;p&gt;While the tag protects VM data inside the SOC, AES with 128 bit encryption protects data outside the SOC. When data leaves or enters the SOC, it is encrypted/decrypted respectively by hardware with a key based on the associated tag.&lt;/p&gt;
&lt;p&gt;Each VM as well as the hypervisor is associated with a tag, and consequently an associated encryption key. Because of the tag and memory encryption, data is restricted to only the VM using that tag. If that data is accessed by anyone else, including the hypervisor, they will only be able to see the data in its encrypted form. This provides strong cryptographic isolation between the VMs, as well as between the VMs and the hypervisor.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 453px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/75ca6cedb115b05c775f6dbd0a4a4518/7b460/sev-arch.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 105.71428571428572%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE6klEQVR42nWVCWzTVRzHSwxGA4yogBACUYkamYYrmChBPIgSQQFJTJSgJjAU5xCIyzIVBoOEsTmOwcY6xm4G7dbuYJ3r2C3ssNvYvXZXWbseY+u1+2o//rsDWNRf8vLe//r8vu/3vu/9RbiYjEHbENpiPboyI10VJsyabuxDLQyOtzM0rmd43MToiAPnoBXnaB/OsUFcE6M4nU4mJiZwuaZAIvcNdzQXt+Dl6YPXBm981vlz8YcgLmdt4mT0WkKS3uFy9lbK036kynsLpb7bqAvYQ+2JXZTEhGCx9wnJRqaALucU2aQxk+CfzPkDlzi1O4hwvyAupX6Eb8h6jp1dzdFwT7KDtiDbMJdza+YRuXE+SWtERHntpEHTSp/DMalSxHTMSDYZrOh6LGj0XbSatdQbSlG1KSnX5FFTrqQtM5aGqABqw/3JP7GfO4li1G3tDAz0TwFd01O25+bR/uXXaA540+rrT/uZIIyRcTxISkR3W4GxoALj/XpMDwx01lShM/fQ5Rig19GHzWplfHx8esrTA3NYOFVPL6DxxZWUL1pO7HNLkS5eRubSlSiWv0TuK69R/OY6VG+/S/Xm96nbvovCnXtQCcnsAwOMjY5OAZlWOFhTR9fxUzTt86Jux26Um7YQ+8Yabq1YRdwLSxEvXETMguf5y2MxFR5LqF64hFuiuSQfP0Gn2cSQAJ0CCuFe6RFB6ZBQxo42wTadeozNzZgqq1ArpGglKWguXaFJSFh/8BCqTz+j9sNtyDzXooi+js5oZHho6DHQXUwXbj+N8VBvxu6w0t3TI9THQZtZjanPgcHaS7fQm6wWOhvv09VloL2hAaPBiEN4z+3FR0B3VOfUUXSjlGJpGbVlDWjb23HYbXToanH09tPTbcM+OIzdZkdXo8Jo7kZv6MJisTA8PPzY2K7prRJ3+Dr7V32F30YfArYEIL72HRck24n/8yApBUGUlknQVxTR06gS+kIeWh1YbA5GBNiMukcKJwS6n0LNzmAl3/wm4YjPDYJjD3EsdB2/hr7F0dAVpESsJ2/bCm7ueJnCbzeQ7/0JReKzaPWGSQ/OAo5OOFmb1oYoupH5F++w6EIey6LL8Uwo5L24NHZLo/CLDyHi8D4i924m+fPXyflgHllHvqC6SYPN0uteicfAMWGV9+Tr8Yhv4tmAVER+ycwJzGLOT1HM+SUZ0XFh/Ecpz0RWsiT6b1aLi9gclMCpsKuomxqx2myzFTqFGtQ1NJFVWs25XBUHZeV8nFzBqxGFLAzNZe7pDETfn0fkcxWRbyJPiesRhdWwN0JGR2MtVrtjNnBsbAxljpIMmRxlRjp5mRkos7NR5OYLi1LM6duleElK2JpUyirxXTyu3Ud0/h4/R8vQtapx9A/MBo4IR48sLQOpLB15poK0rByuRkUTEhJKfGwc8ps3yZbLyUzPQJaZTUx6Lr9LlEiUhei0HZPfzwK6PaRSVSKVphAjAOLiE7lwMYzAwDMEnAzkpNC7k6UKTSrsmrTUVKSJ8SgyM2lpaWF0eh/PMvbMFrTb7TQ1NXP37j3k8jTE4mtcuRKBWFCckHgDiTQVuTCbmLhEbkmkqNXqSWP/Czjj9CfD5XLS399Pa2srJSUlpKSkEhkZNdmCg0MpKCjEYDD8v8InlTqdrv96NFkvrfYBlcLB4Z6N+3rmN+IG/gMedUn4WyPjpAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;SEV Architecture&quot;
        title=&quot;&quot;
        src=&quot;/static/75ca6cedb115b05c775f6dbd0a4a4518/7b460/sev-arch.png&quot;
        srcset=&quot;/static/75ca6cedb115b05c775f6dbd0a4a4518/1aaec/sev-arch.png 175w,
/static/75ca6cedb115b05c775f6dbd0a4a4518/98287/sev-arch.png 350w,
/static/75ca6cedb115b05c775f6dbd0a4a4518/7b460/sev-arch.png 453w&quot;
        sizes=&quot;(max-width: 453px) 100vw, 453px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 3: SEV Architecture&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Memory Encryption&lt;/h2&gt;
&lt;p&gt;One of the key features of SEV is that guest VMs are able to choose which data memory pages they would like to be private. This choice is done using the standard CPU page tables, and is fully controlled by the guest. Private memory is encrypted with the guest-specific key, while shared memory may be encrypted with the hypervisor key.&lt;/p&gt;
&lt;p&gt;This feature allows VMs to mark selected pages of memory data they want to keep confidential (private), and others to be used for communication with other VMs
or the hypervisor. In a typical arrangement, the guest would map all of its code and data as private, except for specific shared pages that it chooses to expose.&lt;/p&gt;
&lt;p&gt;For security, SEV hardware does require certain types of memory (including instruction pages and page tables) to always be private to protect the VM. An example communication configuration is shown in Figure 4. In this example, the SEV-enabled guest and hypervisor communicate through memory that both entities mark as shared. All other guest memory is encrypted with
the guest’s key (which the HV cannot use).&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 353px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/da09477d721956e926456e359f7c37af/3b7c6/sev-hg-mem.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 181.71428571428572%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAkCAYAAACJ8xqgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAG9ElEQVR42p2WiVPURxbH8+9sbdVmqUWNSNRSa91UovHY2mQTg0YTlWRRo2a9EBUvREWRY0BUAooGEZFThREYhoEBRzmUa2BmgBnmvjg88Pps929QBzepcvdX9Z03/bp/n3n9uvv1fMB7PK9evVL0Ps8H8mN8fByv14vP5/sv+f1+pX90dPQ3+6Xku0+fPg0Bnz9/jtvtZnRsjMDo+JTGGJt4jHlwmIqKSqpu3qS0rJwadS1j44/E2Ik3km2/P4DL5QoBnz17hscrfsU+jHeoB99wH+7BXvxWIy7TA9paddxtbUWnrqRDr8Fp6cVh7nkrUzdux4gAuqeAk0/xjT6iuyiJ6q0zaIhfiCFxEVU/z+fO1kgspSdwWc24VStxZa5gJO3zkM4sZSR9OSMpizE3lePyjYpkvwwB3YEJhq4fQrvljxRt+DN3d8+iMi6Sps1/wHx1H0P93bhOf0Iw81P8GZ8JK7WEoGop/tRFmHSlOMOBTv8Y1oqTdB6Yh3r3Iqp3LqBqx0I690UzeOMY1oFu2vbPpX7HHAwJ86j9OQr9no9p3TufjviPMOtKcHiDU8Bnk7g8Psytt+kvT2fw9lkGb2Urtr8sFVNrNba+dvoOzaNm60zK4mag3jaLik2RaHdG0Rk/g4GG62FAEaFsDN5IwpuyAG/GErzpn4bsyXkMlhzB1NOJ5+R8Bg59TO22GTTumClS8hd6Ds7FfzwKY30Rdk9AblgJnFSAFjG17sRoupP+Ru+xv/Lw6GKMiXME8Cjm7nYcRz7CcywK/4loAYkmcHwOnuRoXAcjMNYVTgGnIpQNGUn9TxFUbJlN3b+jqN4+h+btEZivHcQsIrQmLcAmZE1aqHwflu3kRdgOzxERXsPu9sszFQLaXH5sJYfoio+kNG6myM1sJfHGfZEMFyXQP2SlVXOJ+82/Ymj8lXtNhdyXar4q2gV0PzRgdzinTooAWgVwuPggHbsiRNIjqdkSSbmwHTs/ZKgwgS6LEdXlf5Gk+o60iyF7KjeW1LwfSbsUS0ubGofdHQ70MSj3W0IEvfuj6N47i/b42Qzu/RPDV/bwYKCXwsptZOZv5HjmGtJ++Z6U7LWoLsaSXxqH3nAbu9319qRYnV6MVxKwHohg5Nhc7EnROJLnYtv/IQMFu2jv66Lw1jZyr2/i8JlVpF5Yz+HUVWRf+YHC6q3oWqqwj7hCOXz58iVWqw1jZyu9+mr6WtX0tYTUqxd7s6MFk9nE/Q4dbZ1NdHY1k5WTQouhTnxv4X57I11dnQrjTfl68uQxLrdH2eDvyin8TpFwt9uryOl0U1lRxZBYKK/olz5Zad6UL/6PZ2BgAFmlfrfAvk9FDu83Go3TgOHvv4lQDpgUp+a3JIuw1Ot2T08PExMTyjtyqrJvWoSBQEAp47Lcvyvpt1gsDA8PiXEhn8FwV+TORTAYUHwej0dcExNhFVs4xsQVIO+N1woGg8pdYrfbKSgooLS0XET1WPjH+CU3H5vNzrhoj8orIxAUi+WcDpQAGWm4ZDSj4n4ZMPVyS5NFnT4Xte48ZTVnUDedp74lT9gceo1tguFT8qgA5bK/BoRL3mgyggHzQ0rqdnP+WhyJp/5JSs5aklWryS3exLU727nbrhZAv9jW7wB9Pv80ecXlFQyOYzQ9pLh2JxfESTlw8itSzq3j4Omvybi0keK63wEq0wv4GAvTqN/LI5Fbi+UBRbe2U1C2RZzfDZy7Eosqfz351zdTeHMzBlEcPG/KlwC6BdBmd3CuykBamYGM8rfKLL/HmRt6jl6+TdKVao4XqUm+WiNsDcmFNSTmV6E1dOAVq/7q9aK4XE5M4lKPy9ESk9HI2sxGvp3Smgwt3wrfuqxmRWtV0upZJ+z32Xpi0puobOzA53ZOB8p/CdtyG8UgHbFndWw428iGbC2x51qIPd/CxpwmReuFb31Wg2LlmDUZGqoa26cDnU4HJssQm3IaWC0iWpcplCVezrnLsvg8lu3JY0XCJVbuv8zajAa+O6sXsxBjVFpWndFQoW0TQEcY0OEQW2OQH7M1ygA51S+TK1i29xKf785jyY5zAnyRpbty+XtiEf84UkJMWr1IhZYvT9dT1nAfrysM6BCnod9k4YcsDV+nasQ0dKwULy7enM6K/VdZvq9QAAv4bOcFPttxXoDz+Ca1jjXpWr44JYAaCbS/BdrtI/T1m4hV1fOVAMaIKGPE4DUqPavTGxXFTNnVGU1COr6RY9I0fJFSx426e3icIyHg5OQzRmxWATSLX61lybFalh+vZZlU8p2QDVeYb8WJWj45qqb4jkH8A7OFgPL8OUQOu3t6uVCmJaO4AdX191NWSQPp1zTUNwugy/m2fMl6JqvN5GNR457875qYGOPFixcK8D8uq1O9+bCHyAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;SEV Architecture&quot;
        title=&quot;&quot;
        src=&quot;/static/da09477d721956e926456e359f7c37af/3b7c6/sev-hg-mem.png&quot;
        srcset=&quot;/static/da09477d721956e926456e359f7c37af/1aaec/sev-hg-mem.png 175w,
/static/da09477d721956e926456e359f7c37af/98287/sev-hg-mem.png 350w,
/static/da09477d721956e926456e359f7c37af/3b7c6/sev-hg-mem.png 353w&quot;
        sizes=&quot;(max-width: 353px) 100vw, 353px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 4: Guest/HV Communication Example&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;br /&gt;
Related Posts
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.amd.com/content/dam/amd/en/documents/epyc-business-docs/white-papers/memory-encryption-white-paper.pdf&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;AMD MEMORY ENCRYPTION&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.amd.com/content/dam/amd/en/documents/developer/sev-tio-whitepaper.pdf&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;AMD SEV-TIO: Secure Encrypted Virtualization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.amd.com/en/developer/sev.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;AMD Secure Encrypted Virtualization (SEV)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Confidential Compute Architecture(CCA) on Armv9.2+ Microprocessors]]></title><description><![CDATA[CCA is hardware-based secure environment, to shield portions of code and data from access or modification, even from privileged software stack.]]></description><link>https://gufranmirza.com/blogs/arm-confidential-compute-architecture/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/arm-confidential-compute-architecture/</guid><pubDate>Sun, 15 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Confidential Compute in Arm&lt;/h2&gt;
&lt;p&gt;Arm&apos;s Confidential Compute Architecture (CCA) leverages the groundwork established by Arm&apos;s TrustZone technology. Under the CCA framework, it&apos;s specifically engineered to safeguard application data, even when it&apos;s actively utilized. This level of protection extends to shielding private data from unauthorized access, even by privileged software components like the hypervisor or the operating system.&lt;/p&gt;
&lt;p&gt;Confidential Compute Architecture is an integral part of the freshly introduced Armv9 architecture. More precisely, it serves as an optional feature within Armv9.2 and is poised to evolve into a mandatory extension in forthcoming specifications. To determine whether a CPU supports CCA, software developers can examine the presence of the Realm Management Extension (RME) feature.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c4b8e5b60e8f6218fee6b72f9cb75351/a15e6/arm-cc-stack.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 44.57142857142857%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAACFklEQVR42lWRy2sTYRTF+38IgqCi4k5c+WhrdeNCcOdKqhQsrtyIVXf+B6JWXERiYilt0zQ+wEUJRVuMaNJubGuTOplOHjNTUpPJo5kkk/y836QgDpy559xz75n5ZgYqlQqGYWBZFsViEdM0sWzL17Ztk8/nsQ88yzIpFAqYwkulkj+rfOWpWc/zGFCB+s6ONE10CdayOjtGTmCQlX5W72sjlxdt8FvL+lxBF618tV8ul1HXwMrqOkevjnHy2jhnb9xjcPQBw7cnBA8ZGXvs68tSFb8kvaFbE6IfCZ/gws37nL5+l8NXRhl/8rwfWNzdI/guztNwlBeCmU9fCH1c4uVUjElff+Z1bJFnoQhTH+LMih94v8TkQpxXsheIxQkuLLKcWu8HqpvXg4bbYr/m0HabNDtdXKn79aqvG60OdrGAbRbptNs0ZaEpO/UudPj/8gO7Yu5VHNZSKTLpNHUJ1zSNzNYWtWoV1+vKx8+RFl11HFqiN0o1kpbwjge9nmT06KlAqf4TbafGz41NsvIDnE6PjG6Q1nT+VGuUGi7l+r7wusx2Kbtt8jWXrCOnkNO05Y08FaQClwtljgS/ciyU4PibBGemvzM8v8rFSIohqedmfwiSjETXGBKcn0v6GBT/VPgbJ8IJDgVWuBPf7AeajRbTWxazaZsZwVxml+j2LpHMP8xv93vzB9r3BWpe7b39ZZEwHT/wL3Q/Ymr4EjgNAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;ARM Confidential Computing features on Chip&quot;
        title=&quot;&quot;
        src=&quot;/static/c4b8e5b60e8f6218fee6b72f9cb75351/39600/arm-cc-stack.png&quot;
        srcset=&quot;/static/c4b8e5b60e8f6218fee6b72f9cb75351/1aaec/arm-cc-stack.png 175w,
/static/c4b8e5b60e8f6218fee6b72f9cb75351/98287/arm-cc-stack.png 350w,
/static/c4b8e5b60e8f6218fee6b72f9cb75351/39600/arm-cc-stack.png 700w,
/static/c4b8e5b60e8f6218fee6b72f9cb75351/57cd1/arm-cc-stack.png 1050w,
/static/c4b8e5b60e8f6218fee6b72f9cb75351/a15e6/arm-cc-stack.png 1265w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 1: Confidential computing features on ARM chips&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Overview of Arm CCA&lt;/h2&gt;
&lt;p&gt;Previously, access to high-trust environments was primarily restricted to silicon vendors and OEMs, typically achieved through technologies like TrustZones. With the introduction of Arm CCA, the goal is to expand the availability of high-trust environments to all developers, with the aim of making it a standard for mainstream workloads. Initially, this will be implemented through OS-related software.&lt;/p&gt;
&lt;p&gt;At the core of the Confidential Compute Architecture are &quot;Realms,&quot; which function as small, self-contained high-trust environments or enclaves. The architecture is specifically engineered to safeguard private data throughout the entire technology stack, starting from the silicon level.&lt;/p&gt;
&lt;p&gt;CCA offers robust protection for isolating workloads that inherently distrust each other, providing resilience against compromised rich operating systems such as Linux or Windows, fortifying defenses against compromised hypervisors, and introducing novel protection measures for applications operating within secure environments.&lt;/p&gt;
&lt;p&gt;A significant aspect of CCA involves shielding realms from the underlying hypervisor. While the hypervisor retains responsibilities for resource allocation and tasks like scheduling, it is no longer granted access to the data contained within a realm.&lt;/p&gt;
&lt;p&gt;The number of realms supported by a system is theoretically limitless, constrained only by the available system resources, such as memory and computational power. For instance, small IoT devices may have only a handful of realms, while a powerful server System on Chip (SoC) could handle hundreds of realms. The creation and termination of realms are designed to be efficient operations, suitable for use by applications as needed.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8437956e94e22d83e96a79d4145811ec/a15e6/arm-cca-arch.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 48%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAACj0lEQVR42k2TW08TURSF+yf8NUYTfTPxQUP0yVcN4IOBRAxGQ6KQCN4SBURBAmmV0pJyEygX5WoRlCIXyyWUogU6LZ0ZaIfpdNqZz0N9kJ18yU72OSsrZ6/jOE4nOIj/hnwK0zTQtDTRvT2kxAGZjIFt2/wvm5ylkc4k2UvsYOSPyNtGYWLZOTG1cMSkGIqqYuoSipxgLawQ3pGQJAlZVrEs65RcHjUdJ3mQIh6X0XWDrKVwuhz5/QbM33Vk1e+kNJ1MtJGMssDwxBy/1tcxrTy6kUHPZrCFdlz7yYJczYpaTzBZe+IZzYgztFjFZmwcB5vXYe0SltwnLpoQOkdq+w0P61roHhhkZ29fuN5mI7JNLgvh5Aju0Hl6N4ro2bjKiuRkOvyCCtcZhoI1QnD9CqyexUr6yGTzoNYKh8N86BphYiZAp68fZ2c3Lo8PLW0SjgVo8F+k3n8Bz0wJg8GH+Obu0DJ+mbmtViGYi0I2ArkYR6k0Tc0fqXteT8ObdzhdHTQ2tfD0xWtevmoU75pkV9rgbWcp7oEqvP7qAr6RJzS5SwiG/Dgmf0VY/BNjYWeX2c0IbQNjNPf4ae0fK/BO9O2fRkU/ylQozORaiLbRDlxfunAK2j+7cY57aRl2sbwdwlHsHuNmZ4BbnlmKPVOU9c5Q1hcQfKVicJ77I0GezaxSOTRHiXec212TlPd9F+fmKe/9wd2+Ve71r1LS9Q3/+i4OUz+AaClErqFLQxwdGhzJSQxNw+P1UfngEW3ODuyciW0KxGbyWV3kFpTDLT5OF+EN3GA/sfQvNseaghWrx4o+JpdeEsEF82SdoqZn53nvdDM4+kVk9RBZUQskFQVVFR8gHmZ4qYax5Tpi8lZB8C/Di6mdHdUQ3wAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;ARM Confidential Computing features on Chip&quot;
        title=&quot;&quot;
        src=&quot;/static/8437956e94e22d83e96a79d4145811ec/39600/arm-cca-arch.png&quot;
        srcset=&quot;/static/8437956e94e22d83e96a79d4145811ec/1aaec/arm-cca-arch.png 175w,
/static/8437956e94e22d83e96a79d4145811ec/98287/arm-cca-arch.png 350w,
/static/8437956e94e22d83e96a79d4145811ec/39600/arm-cca-arch.png 700w,
/static/8437956e94e22d83e96a79d4145811ec/57cd1/arm-cca-arch.png 1050w,
/static/8437956e94e22d83e96a79d4145811ec/a15e6/arm-cca-arch.png 1265w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 2: ARM Confidential Computing features on Chip&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Arm CCA hardware architecture&lt;/h2&gt;
&lt;p&gt;Hardware that supports the confidential compute architecture will have the Realm Management Extension (RME) available. At its core, processors that implement the Realm Management Extension have two new hardware capabilities: the creation of realms and dynamic memory assignment.&lt;/p&gt;
&lt;p&gt;With the new Realm Management Extension, pages can now transition from the non-secure world to the secure world and back again. This allows TrustZone to be utilized for much more memory-intensive applications.&lt;/p&gt;
&lt;p&gt;Two new hardware features in the Realm Management Extension (RME)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. New isolation boundaries for 3rd party confidential computing&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Realms: New type of protected execution environment&lt;/li&gt;
&lt;li&gt;Data and/or code are protected from any other execution environments:
&lt;ul&gt;
&lt;li&gt;Hypervisors&lt;/li&gt;
&lt;li&gt;OS Kernels&lt;/li&gt;
&lt;li&gt;Other Realms&lt;/li&gt;
&lt;li&gt;Even TrustZone&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;2. Dynamic assignment of memory to physical address spaces / worlds&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supports Realms AND adds dynamic memory support to TrustZone
&lt;ul&gt;
&lt;li&gt;Arm dynamic TrustZone technology&lt;/li&gt;
&lt;li&gt;Removes boot-time static memory carve-outs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;RME adds another two security states and associated physical address spaces&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Realm: A new mutually distrusting space for confidential compute&lt;/li&gt;
&lt;li&gt;Root: The Monitor gets its own private address space&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;HW isolation between address spaces is managed through a new Granule Protection Table (GPT), an extension of MMU page tables that is controlled by the Monitor in EL3&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Invalid accesses raise page faults&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/39cde7568cb7c515f865a3cc7a54badb/99285/arm-cca-hw.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 76.57142857142857%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAAAsTAAALEwEAmpwYAAADjElEQVR42nWUW2gcZRTH91Xw3VdBEAUrtRb0zUcffRDResM8aUDpg1FaQUtFBWOTGoiCjdrQTUyTtqZWaulFmrRNNptNNtlNuvfsZWYvM7uT7MzsbLL3n2eTWFDoB9+c+c5h/uf/nXP+42J/1dsdQsksGd3Ekfdqs4UYOvvxfEEno6iouTztdltiexHLslEUjUa9tXt2NZvQ2lGxjNuYm340bQZVCxDNKxSMNEZZI76RpGhsUt3epuI47NQb2I6FWpmltB1AKa6ytDFOuargMswWNfUn8D1KM/ERLD1GI/kZaVUlnV4hlggyPDLKUnAdp1GjaG5hVncoWTnG488zo/cyOXeU1793MRf9FVeXZqd8jU7kVRrqadqxt2jkzxLdiBGJelm772Pi4mXmfX6C4ShLq0GCoSi6oXEj9Cl+9SxXfMf5xP0Ii/FRXJvCsFE4B+vP0UwdE/sijUw/hWIWXV9HyYYYnZhicvoqgz+MMDB8RuwvhOPr9P9xgLE7PVz0HOXIkAtPbJ9h3VFxinPYule2B9MIkysoJFMxkuk4vpUAfrmyR1jOLy6z6A9IwiJrmeuElbvEsl7mI+MYVhqX5XRILg+x4H6C8K0eAlPPoPhOMPSjm1dee4cj7/XSd/wLPj/5DX3HTvB2zwe8/+HHhCNhTrvfpe/UCwyMvkHvl0+xELgsXW51sLcyFJV5NGURz/JfeNe8XFtY4fyNGS7cuvtgT968I75ZLvx9j/lQnKnZadw3xzh/e4qRqz8Tz8aly4aBU63KnBlo5QqHB6d58qtxDnw7xqHBKQ4NTPJs/wQvDU/zpvs6L5/5U86/8fTX5zj43SUO9l/i8KnfefzkBFfW0/td7rTl0aZWr7EYibEcT+JPZLgXDOG5H2NB2HgjCalZbtfXja1sKBKLii/LmpIlopWwd2p7gA/UIgMbDKySkxmsVCrohTw7wl7XCjgVe1chqpKh1WqKQixKur773bYMfGdfOf8BrNVqMntRFDVLQctL13JUxVeWc2NzC0tUYqYz1OwK3VJti78L1pVfS5J1/g9Yr9dFHWmZPx1Nz5PVE5TLJrlcik0jR9m0KErCioAVNQ0zkcAWpqbshzIMyJV1vUhJlJDKrohmHfREBEtNYleqZBKrmKJvQ9OxAwEc2344YJdhKpXaq09JJycMu9fJaxlKW1ksU/4shQRbZjdhiVxpQ8DK2FKCf9c/Kt4UxXWDjVcAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;ARM Confidential Computing Arch H/W stack&quot;
        title=&quot;&quot;
        src=&quot;/static/39cde7568cb7c515f865a3cc7a54badb/39600/arm-cca-hw.png&quot;
        srcset=&quot;/static/39cde7568cb7c515f865a3cc7a54badb/1aaec/arm-cca-hw.png 175w,
/static/39cde7568cb7c515f865a3cc7a54badb/98287/arm-cca-hw.png 350w,
/static/39cde7568cb7c515f865a3cc7a54badb/39600/arm-cca-hw.png 700w,
/static/39cde7568cb7c515f865a3cc7a54badb/99285/arm-cca-hw.png 805w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 3: ARM Confidential Computing Arch H/W stack&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;CCA is a combination of hardware and firmware&lt;/h2&gt;
&lt;p&gt;As part of the Arm CCA, a new firmware/software architecture is also defined. A new Realm Management Monitor (RMM) is defined which provides services for the hypervisor as well as to the realms themselves. This is done via a new Realm Management Interface (RMI).&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 635px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9d8581a6edf92b99370dd52288a8bc7d/93633/arm-rmm.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 75.42857142857143%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAAAsTAAALEwEAmpwYAAADR0lEQVR42oWTTUxcVRTHx6Wrxq8Yd240ujDEjUmjC1fWRY1WFzbGlW5aNYH6UaMDlQKVMg2YltpgJ1BCR3CkQCk10GhiGlsq0AnDMPJV5vv7882b92aG6cx7P++8AapNjTf53/+55+Se+7/nnmviX0O/D/f7/3+YNE3H4wuy6fFRrVbvpdB1/MEw63d8pNLZXd+DRs2/AxO6hiInUVUZWZYEsqhKlkQiQjgSIBz2ilhG7CpTFYdXtSqa2FPbXBECaqwWCkKMVldozEkrrL2GtvYu+sp+8B1GzW6QzvhxOG/hXF4gLwfIKXki6RSZvExpa4toOk1CypJXVNLCLhaL9YR65BQ4G2B5L7rrJdh8j4J0h2gygD8exxeLk5HCqKUCUkFF2Spyt1oRtoIsfGqhSCwWQ1GUbYUpm1D1MYSa0X2NELUYCeMiYSyTMVTlchHiiQSOJTdO9wpL7lXDXl5dJyvl0LR/XFn3fII+9zj64gto808JpS+LK68SiXsJCIXeaFRcK8rMb79z6IiZNstpjnV282VrJ5+a28XBKUKhkKi1Wn8UtE0ITIP9jKjhuFivosoxyltpcVxBFF4RrBAIhbl+c44/by+ysOgyeM7hNBTudIhJq5YJur7He6ON0JgZ3x8n8d5uJx1zM33tOtaBQX4YuEjfBRs2+wT28SlGxiYZHB6l32ZnePQyyVSGUqlkJDVVKyrO0ReZH3qSlZk3cFxq4NbgHiLOn9k4N8Bscwtvv3WQfQIfNR7lg0ONfHi4idffPMir+w6w/533iYhHi0TCos45TLU+8saSrIWiQuUNfKLB/cEoG+seYjdnCS84WBLN7fIGcXkCu3CL9V/+EMuCQ4n0vZ+ilu/SYBnh4aN9PP1ZL881dvNsk8CRHp4XvLfnJ145O8EzHUPs+fo8j5mtPCrwiLCfaLbyUNMZvpiaJRuPkclKmMqVCj2Tv2K+OEHLyBVahifr+LHGV+gam6Z7fIYO+1WabZfr/m18I+KfX7jE1PySoc6oYblcpq/3NN+2HsPS0Yal/biBrrZWvus8QX/fOYb6rZw/28tJ4euqxbZx6kQ7x81fce2Xq7t/2qihnFeQcvIDUWuJjCQZ/F/x2pfbqeHfsKgBXghAV0wAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;ARM Confidential Computing Arch H/W stack&quot;
        title=&quot;&quot;
        src=&quot;/static/9d8581a6edf92b99370dd52288a8bc7d/93633/arm-rmm.png&quot;
        srcset=&quot;/static/9d8581a6edf92b99370dd52288a8bc7d/1aaec/arm-rmm.png 175w,
/static/9d8581a6edf92b99370dd52288a8bc7d/98287/arm-rmm.png 350w,
/static/9d8581a6edf92b99370dd52288a8bc7d/93633/arm-rmm.png 635w&quot;
        sizes=&quot;(max-width: 635px) 100vw, 635px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 4: Realm Management Interface (RMI)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Services for the hypervisor include the creation and destruction of realms as well as adding and removing memory. Additionally, realms can also request attestation reports via the RMI which can be for the platform or the realm which can be presented to a requesting party.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
Related Posts
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://haspworkshop.org/2021/slides/HASP-2021-Session2-Arm-CCA.pdf&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;HASP-2021-Session2-Arm-CCA.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.arm.com/documentation/den0125/0300/Arm-CCA-Extensions&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;Arm-CCA-Extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Confidential Computing on Intel Microprocessors]]></title><description><![CDATA[This blog covers the confidential computing (TCB) features on the Intel chips]]></description><link>https://gufranmirza.com/blogs/confidential-computing-on-intel/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/confidential-computing-on-intel/</guid><pubDate>Tue, 10 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;What is Confidential Computing?&lt;/h2&gt;
&lt;p&gt;Data can exist in three states:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data in storage is &lt;code class=&quot;language-text&quot;&gt;at rest&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Data traversing the network is &lt;code class=&quot;language-text&quot;&gt;in transit&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Data being processed is &lt;code class=&quot;language-text&quot;&gt;in use&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption at rest&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents data from being obtained in an unencrypted form, in the event of an attack.&lt;/li&gt;
&lt;li&gt;Used in services such as Disk Encryption, SQL Databases, Storage Accounts, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption in transit (E2E)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents data from being sent in clear text over public or private networks.&lt;/li&gt;
&lt;li&gt;Typically happens via SSL and TLS protocols.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Encryption in use&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Protecting the data in use at processor/memory and caches.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Classical mechanisms to protect data in transit and at rest remain must-haves. These mechanisms are not enough when you are processing the very sensitive data. Even when you’re diligently keeping your environments up-to-date with all of the latest governance and security recommendations that Microsoft has on offer, protecting sensitive data while it is being processed might still be worth considering.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;📖 From the docs: “The trusted computing base (TCB) refers to all of a system’s hardware, firmware, and software components that provide a secure environment. The components inside the TCB are considered “critical”. If one component inside the TCB is compromised, the entire system’s security may be jeopardized. A lower TCB means higher security.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A &lt;strong&gt;Trusted Execution Environment (TEE)&lt;/strong&gt;, such as an Enclave/TDX, is a tampering resistant environment that provides security assurances to us. The range of assurances often depends on what ships with the TEE, but at a minimum, we will often see the following types of security assurances:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data integrity&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents unauthorized entities from modifying data inside of an enclave.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Code integrity&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents unauthorized entities from modifying code inside of an enclave.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Data confidentiality&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevents unauthorized entities from viewing data as it is being processed inside of an enclave.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;💡 “Keep the attack surface small!” Hardware-based TEEs can remove the operating system, (cloud) platform and service providers, along with their administrators, from the list of parties that your company places trust in. Doing so can potentially reduce the risk of a security breach or compromise.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;p&gt;The more code that is put inside of the trusted execution environment, the more vulnerable your setup might become due to the larger trusted computing base. Again, code that is run inside of an enclave cannot be viewed by a host or hypervisor, so keeping the code-base that runs inside the TEE to a minimum will typically result in more confidentiality assurances.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/90f7381fa424325446a41e0f94c0d2a6/edd80/tcb-comparison.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 60%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAADMElEQVR42m2TXUybZRTH60d0Xi0aEjOBXQCbcaO7aJo5HTqiGVK6dqA4ZAw0bmyhYsKyUXCg0EwYCxq3cTESs2F00V1sF36nocZtaRDQ2q4Q1o7IcDDK2w/6XaB9259v3+qd58k/53+ek5zn+Z/zPAr+tUwaxFCGTETicUjHJB7P5HxYitcz/J+tJtbwBbzEojE5VogpkcWlBR7M+hhovkTn0T7OvD1C/6ER+hovM3B4hK7ms5xv/I6e1kH6Wy5y7vA1egyf8FnTdYxHTjPYcJW2N03c+NKJIrgSxPrbLRw33ezZdAB16QvseaqBXRsO8PyGWsrz6tlRtBPNQ0bUW19i1yYtex9rZUfBi1Q8fJzn8lXonujgGcV2Pm/7CUUmI0nKLhHiyyJ+1zo+Z4rAtCjD50wiONZZmUkj2NfxOpLE7qeJe6TcnVW89qSUk7hDJHh/FUVWt9frxePxcMJ4HK1mH9UlrWgLj1FV2Ez1swbKVZU0PH2avTv1VG1r5NSxPurffYO2qjOUbaugafPHKJ98mSvdltwNBUFgRZI+PHyRUyc+4gP9BTp05zHqztFVO0Rb04eYKr/m5Du9tNee5dLgVQY+7Wfo5DcY6oz0vX6Fo9oOzMO2XMF0Oi1PKBqNsrzkJRSIsCJEZYQl7l0KkIitIjzwE/CGiMcThMJBFqdXcN8Q+HssjPtXgWV3GEUikcDlcjE3N0fla5UUFOaj31dNxSs6Xi3Xotfvp3BzAZ0dnZSUFLO7bDcGw3sUFxWzf3sLGx/Po+zRIzyi2MiF96/neiiKIqlUipmZGWx/2nC77jLtdDN92yUfZrPZWFhYwG63MzU1xfy9eRy37Ux8fwfzV2Pcuuzm55ExZic8OcnJZFLG+Pg4ZrOZ3yf/wHpzUsbExKS8ly08OjqK1WqVi1osFsk7sfwyyt2/XFz74kfsP8yjyPYvO2W/309NTQ2lylLq6w5Ro3sLfVUdBw82oFQqMZlMqNVqNBoN7e3tqFQquru62bJlKz29veTnFTHU8m1O8n+WHUowGJS/USQUlxGLxQiFQqytrck+EomQ7Xs4HJZ59oVEYxEWZwV896L8AwmP0baTXrfKAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;TCB Comparison&quot;
        title=&quot;&quot;
        src=&quot;/static/90f7381fa424325446a41e0f94c0d2a6/39600/tcb-comparison.png&quot;
        srcset=&quot;/static/90f7381fa424325446a41e0f94c0d2a6/1aaec/tcb-comparison.png 175w,
/static/90f7381fa424325446a41e0f94c0d2a6/98287/tcb-comparison.png 350w,
/static/90f7381fa424325446a41e0f94c0d2a6/39600/tcb-comparison.png 700w,
/static/90f7381fa424325446a41e0f94c0d2a6/57cd1/tcb-comparison.png 1050w,
/static/90f7381fa424325446a41e0f94c0d2a6/edd80/tcb-comparison.png 1342w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 1: Simplified comparison of the trusted computing base (TCB) of the different confidential computing technologies. “Infra- structure employees” includes cloud provider and datacenter employees. For Intel SGX and CVMs, the CPU enforces the secure execution context. It is thus marked with lighter purple.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With Intel based Microprocessors you can have two different type trusted computing base (TCB) environments&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel® SGX&lt;/li&gt;
&lt;li&gt;Intel® TDX&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Intel Software Guard Extensions (SGX)&lt;/h2&gt;
&lt;p&gt;Intel® Software Guard Extensions (Intel® SGX) offers hardware-based memory encryption that isolates specific application code and data in memory. Intel® SGX allows user-level code to allocate private regions of memory, called enclaves, which are designed to be protected from processes running at higher privilege levels. Only Intel® SGX offers such a granular level of control and protection&lt;/p&gt;
&lt;p&gt;Traditionally, when a system’s BIOS, hypervisor, or operating system is compromised by a malicious attack, the attacker’s code can gain visibility and access to everything higher in the system stack, such as applications and data. Intel SGX utilizes memory encryption and hardware-enforced access controls to change how data is accessed, providing enclaves of protected
memory in which to run applications and data.&lt;/p&gt;
&lt;p&gt;Intel SGX (Software Guard Extension) is a new instruction set in Skylake Intel CPUs since autumn 2015. It provides a reverse sandbox that protects enclaves from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OS or hypervisor&lt;/li&gt;
&lt;li&gt;BIOS, firmware, drivers&lt;/li&gt;
&lt;li&gt;System management module (Ring 2)&lt;/li&gt;
&lt;li&gt;Intel management engine (ME)&lt;/li&gt;
&lt;li&gt;Any remote attack&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In short, SGX architecture is a hardware-enforced security mechanism that requires &lt;strong&gt;Trusted Computing Base (TCB), Hardware Secrets, Remote Attestation, Sealed Storage and Memory Encryption&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In summary, Intel SGX offers the following protections from known hardware and software attacks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enclave memory cannot be read or written from outside the enclave regardless of the current privilege level and CPU mode.&lt;/li&gt;
&lt;li&gt;Production enclaves cannot be debugged by software or hardware debuggers.&lt;/li&gt;
&lt;li&gt;The enclave environment cannot be entered through classic function calls, jumps, register manipulation, or stack manipulation. The only way to call an enclave function is through a new instruction that performs several protection checks.&lt;/li&gt;
&lt;li&gt;Enclave memory is encrypted using industry-standard encryption algorithms with replay protection. Tapping the memory or connecting the DRAM modules to another system will yield only encrypted data.&lt;/li&gt;
&lt;li&gt;The memory encryption key randomly changes every power cycle. The key is stored within the CPU and is not accessible.&lt;/li&gt;
&lt;li&gt;Data isolated within enclaves can only be accessed by code that shares the enclave.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a result, the attack surface can be largely reduced after applying Intel SGX:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 691px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/23a50b1dd3d0b95a4d5749849b85f42b/091b0/enclave-comparison.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 43.99999999999999%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAACJUlEQVR42oWR3U/TUBjG++dpvDAhhmgcJmJiYjR4I3hlCP+CxkhiguCNizLEsaFwIW7yoQTYAGUbMFi3rmvZ1u6jXbt268/jjBde+Sa/nCfPed73nJMjlVSdYlmjotcoKBUU9YIzWaWs1VAEpUqVutnC7XY5L1ZQhScrf1dN9OooIiMrOh3HRfJ6Pg27SVNgu52BbgnMmkxFzaKrGTzHIgCalkmjbYqcTUPoQY9loNcVQQnf+z3QtzjIJkhnEhiNPKmjBMfHXzk5/8zi+muSe2F8xxQDAzKFXXayGxiWwo/8Nodnu1RKW8STMyS25uhaOpLdMslqdXK6wWm1yY6ssV/SOam1+Wl0yF0Y9FwLX1zxxHTJGS75pkdKb5PS2pw2XI5ENlO3cPw+Ur1hsljusVTpE9P6zMsuCyVvoKNqwIrSGTy504eY2iNaFjmRjRRdIrIjdDDojWsB4hykXNVgOO1w69AltO8QSha5uVFh5LDLDcH9gyadjkXdC7idbhNKCdI2oS8FQmvnQluC9mCvYPtIR3KJSy8+cPVlnOuzq9x9m2Q0vMa1mY9cno4x8moZ27aoGnWGnoe58jTM8HSE0dkYd+biQs8PvKFnb8iXVaR8rcW9d+uMLWwyEf3O1Moek5/2GI9u8yCyyZPlXRyvh9np8kh4D99/YyK2w+RKmqnVNI+FHhPe+NI25YaN5HY9PN/H6/UI3AY4df4t8RtB8Gf9bwX8AkjqeCvKwhueAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;TCB Comparison&quot;
        title=&quot;&quot;
        src=&quot;/static/23a50b1dd3d0b95a4d5749849b85f42b/091b0/enclave-comparison.png&quot;
        srcset=&quot;/static/23a50b1dd3d0b95a4d5749849b85f42b/1aaec/enclave-comparison.png 175w,
/static/23a50b1dd3d0b95a4d5749849b85f42b/98287/enclave-comparison.png 350w,
/static/23a50b1dd3d0b95a4d5749849b85f42b/091b0/enclave-comparison.png 691w&quot;
        sizes=&quot;(max-width: 691px) 100vw, 691px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 2: Attack Surface&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Intel Trust Domain Extensions (TDX)&lt;/h2&gt;
&lt;p&gt;This hardware-based trusted execution environment (TEE) facilitates the deployment of trust domains (TD), which are hardware-isolated virtual machines (VM) designed to protect sensitive data and applications from unauthorized access.&lt;/p&gt;
&lt;p&gt;A CPU-measured Intel TDX module enables Intel TDX. This software module runs in a new CPU Secure Arbitration Mode (SEAM) as a peer virtual machine manager (VMM), and supports TD entry and exit using the existing virtualization infrastructure. The module is hosted in a reserved memory space identified by the SEAM Range Register (SEAMRR).&lt;/p&gt;
&lt;p&gt;Intel TDX uses hardware extensions for managing and encrypting memory and protects both the confidentiality and integrity of the TD CPU state from non-SEAM mode.&lt;/p&gt;
&lt;p&gt;The main security goal of Intel® Trust Domain Extension (Intel® TDX) technology is to remove the need for a TDX guest to trust the host and virtual machine manager (VMM). It is important to note that this security objective is not unique to the TDX architecture, but it is common across all confidential cloud computing solutions (CCC) (such as TDX, AMD SEV, etc) and therefore many aspects described below will be applicable to other CCC technologies.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 700px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b59cbec873581612e528f34c1b7a8288/88b03/tdx.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 55.99999999999999%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAACE0lEQVR42kWSC3eaQBCF+f9/qae1qW1jTZoaH6hHEAOKIC/xwS6wcHNXTOo5n8PO7t65M2BElxpFpWAfa7xENcy0xiSuETB/LRWSa8X9FqotcSgCWPsVxqsRzPUYc2eKqfWK+ZsJ/+ThUuUw0kKhAVC3QEmqO4ro36VsKNyiaSUW0Rovvo0vzhq9jY2vmzX6roVZaGHEQqlIKHitb5cbpSBEASnELTZNcxM8SQpWneAy3uCnt0XP89H3dvi93eK7u8OvrY/h1sFRasGi5mF9VV/6oEHbdhbPnw4FzJAOvT2WQYgnL8CjG8L0A3LAs+cgExEM/6wQ02VCYd1+dkc7T0h8m2FDQX0mRXBKcTh30c+Tz+fgnKCorzCck8Imq2AnJSxiRiVmZBmXt9wqljhLheiisEpqLIkZd8yiLtrMuXypet7GlX9WUuGvL/FvL9HfSjy4Eo87iVEg8cy85BuLrgp/dgID8uD+5wcZMjc7lLfxGFrVocNJKJmUeKLowO/ETK5fGYu6wVEoLOjaSkuMeXkUdkzZzYo53aXuxNDVcx4+cZHLLp7v8QNdVKP3M9GtnUTCigTcrOQ3qMUaCH4NRiYabNj/Iq2wySs4xwpr4pLersI34jFv04HuRM/WJEM6H7Cb4b7EhI7X3EupZWRUfstrOMQ9kbwTsHhgeKgwCLsibt7tWSy85MwXZH6Peu3QlNZ6B0mWPxMYVwqrAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;TCB Comparison&quot;
        title=&quot;&quot;
        src=&quot;/static/b59cbec873581612e528f34c1b7a8288/39600/tdx.png&quot;
        srcset=&quot;/static/b59cbec873581612e528f34c1b7a8288/1aaec/tdx.png 175w,
/static/b59cbec873581612e528f34c1b7a8288/98287/tdx.png 350w,
/static/b59cbec873581612e528f34c1b7a8288/39600/tdx.png 700w,
/static/b59cbec873581612e528f34c1b7a8288/57cd1/tdx.png 1050w,
/static/b59cbec873581612e528f34c1b7a8288/4af54/tdx.png 1400w,
/static/b59cbec873581612e528f34c1b7a8288/88b03/tdx.png 1920w&quot;
        sizes=&quot;(max-width: 700px) 100vw, 700px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure 3 shows the Trusted Computing Base (TCB) for the Linux TDX SW stack&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;TDX Memory Protection&lt;/strong&gt; - TDX leverages VMX to enforce the memory isolation for TDs. Similar to legacy VMs, TDs are unable to access the memory of other security domains. As SMM, hypervisors, the TDX Module, and other VMs/TDs. With VMX, hypervisors maintain EPTs to enforce memory isolation.&lt;/p&gt;
&lt;p&gt;Since hypervisors are no longer trusted, TDX has moved the task of memory management to the TDX Module, which controls the address translation of TD’s private memory.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Related Posts&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://thomasvanlaere.com/posts/2022/04/azure-confidential-computing-iaas/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;azure-confidential-computing-iaas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sgx101.gitbook.io/sgx101/sgx-bootstrap/overview&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;sgx-bootstrap/overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.intel.com/content/www/us/en/security/confidential-computing.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;intel-confidential-computing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Managing Microservice Schema With Protocol Buffers]]></title><description><![CDATA[Defining the Microservice Schema, Interfaces, Objects, and strategies that can be used to manage Microservice API Interfaces.]]></description><link>https://gufranmirza.com/blogs/managing-microservice-schema-and-interfaces-in-distributed-environments-with-protocol-buffers/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/managing-microservice-schema-and-interfaces-in-distributed-environments-with-protocol-buffers/</guid><pubDate>Mon, 21 Dec 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://ednsquare.com/story/managing-microservice-schema-and-interfaces-in-distributed-environments-with-protocol-buffers-part-i-------AkFVJP&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://ednsquare.com/story/managing-microservice-schema-and-interfaces-in-distributed-environments-with-protocol-buffers-part-i-------AkFVJP&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Anatomy of Go-Routines in Go - Golang concurrency pattern]]></title><description><![CDATA[Goroutine is lightweight execution thread running in the background.]]></description><link>https://gufranmirza.com/blogs/anatomy-of-goroutines-in-go-concurrency-in-go/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/anatomy-of-goroutines-in-go-concurrency-in-go/</guid><pubDate>Thu, 03 Dec 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Read here&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://ednsquare.com/story/anatomy-of-goroutines-in-go-concurrency-in-go------PGPfEF&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://ednsquare.com/story/anatomy-of-goroutines-in-go-concurrency-in-go------PGPfEF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[A Comprehensive Guide to Learn GraphQL & Its Core Concepts]]></title><description><![CDATA[Tutorial series dedicated to learning the graphql from scratch with examples and working demos]]></description><link>https://gufranmirza.com/blogs/a-comprehensive-guide-to-learn-graphql-its-core-concepts-with-examples/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/a-comprehensive-guide-to-learn-graphql-its-core-concepts-with-examples/</guid><pubDate>Tue, 21 Apr 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://ednsquare.com/story/a-comprehensive-guide-to-learn-graphql-its-core-concepts-with-examples------gr6f1v&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://ednsquare.com/story/a-comprehensive-guide-to-learn-graphql-its-core-concepts-with-examples------gr6f1v&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[JWT authentication in Golang with Echo]]></title><description><![CDATA[Learn how to build JWT authentication middleware for Echo]]></description><link>https://gufranmirza.com/blogs/jwt-authentication-in-golang-with-echo/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/jwt-authentication-in-golang-with-echo/</guid><pubDate>Fri, 13 Dec 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://ednsquare.com/story/jwt-authentication-in-golang-with-echo------T2hTPm&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://ednsquare.com/story/jwt-authentication-in-golang-with-echo------T2hTPm&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Build Simple API with gRPC, Protocol Buffers in Golang]]></title><description><![CDATA[This guide gets you started with gRPC in Go with a simple working example.]]></description><link>https://gufranmirza.com/blogs/build-simple-api-with-grpc-protobuf-and-golang/</link><guid isPermaLink="false">https://gufranmirza.com/blogs/build-simple-api-with-grpc-protobuf-and-golang/</guid><pubDate>Sat, 07 Dec 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://ednsquare.com/story/build-simple-api-with-grpc-protobuf-and-golang------kuxI0H&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener noreferrer&quot;&gt;https://ednsquare.com/story/build-simple-api-with-grpc-protobuf-and-golang------kuxI0H&lt;/a&gt;&lt;/p&gt;</content:encoded></item></channel></rss>