Intel SGX

Overview

Intel's Software Guard Extensions (SGX) are specialized security features integrated into select models of Intel's CPUs. These extensions enable users to safeguard sensitive applications by running them inside unique, secure memory zones known as enclaves. Protected directly by the CPU, these enclaves are prevents unauthorized access—even from high-privilege processes like the operating system or hypervisor. Recognized as a Trusted Execution Environment (TEE), the SGX enclave enhances security through in-CPU encryption and decryption of its memory, effectively blocking any external code from gaining access.

SGX can be used to boost the security of various types of applications that handle sensitive data such as passwords, encryption keys, or medical records. SGX is also an excellent candidate for secure remote computation, as it can provide integrity and confidentiality guarantees for code that runs on hardware maintained by a third party.

Attestation

To guarantee a user's confidence in the authenticity and integrity of a secure enclave running on bona fide hardware, Intel SGX employs a rigorous procedure known as attestation. This process involves generating a cryptographic signature that serves as a digital certificate for the enclave's contents. Users can then authenticate this signature by cross-referencing it with a key that is endorsed by a trusted hardware manufacturer, thereby establishing faith in the application's security. Intel SGX facilitates two distinct categories of attestation: Local Attestation, also known as Intra-Platform Attestation, and Remote Attestation, commonly referred to as Inter-Platform Attestation.

Local (Intra-Platform) Attestation

Local Attestation in Intel SGX serves to validate the identity and authenticity of one enclave relative to another when both are operating on the same machine—referred to as the "platform" in Intel's terminology. In this procedure, the prover enclave directs the hardware to generate a specialized credential known as a "report." This report incorporates a cryptographic proof affirming that both the prover and verifier enclaves are executing on the same hardware platform.

The enclave report is a composite document that includes an assortment of critical data. It encompasses details about the code and data present within the enclave, a hash of the public key in the Independent Software Vendor (ISV) certificate provided at the time of initialization, user-specific data, additional security-related state information, and a cryptographic signature block that verifies the included data.

In the context of Intra-Platform Attestation, a hardware-embedded symmetric key is used as the cornerstone of the verification process. Importantly, this key is accessible solely by enclaves operating on the same hardware, thereby maintaining the sanctity of the attestation mechanism.

Remote (Inter-Platform) Attestation

Remote Attestation in Intel SGX enables an external entity, which could be a remote server or another machine, to validate that a given application is securely executing within an SGX enclave. This form of attestation is particularly vital for establishing trust in cloud environments or in scenarios where the verifier and the enclave exist on separate hardware platforms.

Intel SGX offers two principal methodologies for conducting remote attestation:

  1. Intel EPID Attestation: Standing for Enhanced Privacy ID, EPID is a group signature scheme that not only confirms the integrity of the enclave but also provides an additional layer of privacy. EPID allows for anonymous attestation, which means the verifier can confirm that a legitimate SGX enclave is in use without identifying the individual enclave instance.

  2. ECDSA Attestation: Elliptic Curve Digital Signature Algorithm (ECDSA) is used for generating a cryptographic signature that attests to the enclave's integrity. Unlike EPID, ECDSA attestation does not provide anonymity; each enclave has a unique signature that can be traced back to its origin.

Intel Enhanced Privacy ID (EPID) Attestation

EPID is a sophisticated group signature scheme designed to facilitate anonymous attestation. In this approach, each member of a specified group possesses a unique private key for signing, yet verification is performed using a single, group-wide public key. This obfuscates the identity of the individual enclave, making it untraceable based on its public key alone. Within the context of SGX, the "group" refers to a collective of SGX-enabled platforms.

When an application is operating within an enclave, it can instruct the enclave to generate a cryptographically-signed credential, known as a "quote." This quote is then transferred to the external verifying entity. It encapsulates various elements such as code and data measurements, a hash of the public key from the Independent Software Vendor (ISV) certificate presented at initialization, the Product ID, the Security Version Number (SVN), enclave attributes, user data, and a signature block. The latter is secured using the Intel EPID key.

Elliptic Curve Digital Signature Algorithm (ECDSA) Attestation

ECDSA attestation offers an alternative approach, permitting service providers to construct their in-house attestation services instead of utilizing Intel's EPID attestation. This is advantageous for organizations that wish to keep attestation decisions within their internal infrastructure or require device-specific traceability, negating the anonymity inherent to EPID. ECDSA attestation is facilitated via Intel's SGX Data Center Attestation Primitives (DCAP). In this model, quotes are both generated and authenticated using ECDSA-based collateral, digitally signed by Intel.

By offering these two distinct but robust forms of remote attestation, Intel SGX provides a versatile set of tools for ensuring the secure and trustworthy operation of enclaves across disparate hardware platforms.

References

Last updated