Shoptalk Series: Confidential Computing and Remote Attestation — What, Why and How

August 22, 2023

Technical Experts — Shoptalk Series: Array Insights is fortunate to have a team of dedicated and passionate data scientists and engineers working to advance patient-centric AI research. Our ‘Technical Experts – Shoptalk Series’ is a place for our technical experts to share their thoughts about emerging technologies, interesting use-cases, and other topics that intersect with the mission of Array Insights, without necessarily translating all the nitty-gritty details and acronyms for a non-technical audience. 

Author: Prawal Gangwar, Senior Software Engineer at Array Insights 

As companies move their workload from on-premises machines to a public cloud shared by multiple tenants, the need for securing data in the remote environment has grown. Protecting data in domains such as healthcare (e.g., Personally Identifiable Information), finance (e.g., credit card information), and government intelligence (e.g., risk calculations) is more important than ever. Confidential computing, an innovative practice in data security, offers an unprecedented level of protection for data during processing, particularly in cloud-based environments.  

This blog post will explore the profound benefits of confidential computing, along with a discussion of the types of systems in use, with the aspiration that a broader understanding will inspire a shift towards its adoption, thereby continuing to the future of data security and privacy. 

From a high-level perspective, some benefits of confidential computing are: 

  • Data Protection: Confidential computing offers the highest level of security by protecting data while it’s in use. This minimizes the risk of sensitive information being exposed to potential threats. 
  • Enhanced Privacy: It ensures that data remains confidential even in shared environments, bolstering privacy measures significantly.  
  • Compliance with Regulations: It aids businesses in aligning with stringent data protection laws and regulations, making it easier to achieve and maintain compliance.  
  • Trust Building: By offering a higher degree of data security, confidential computing helps businesses build trust with their customers and stakeholders.  
  • Innovation: By providing a secure framework for data processing, confidential computing paves the way for advancements in data-driven sectors, such as AI and machine learning, without compromising data privacy. 

Let us take a closer look at these benefits and how this works. Traditional data security methods have been effective at securing data at rest (i.e., data storage) and in transit (i.e., data being sent over a network).  However, data being used in any processing or computation has been vulnerable to attacks. This is where confidential computing can step in: providing a much-needed layer of protection and filling this security gap by ensuring the data remains encrypted and secure even during processing or computation. This not only strengthens the security measures applied on the data, but also mitigates the risks of data breaches, unauthorized access, and other forms of cyber threats 

Confidential computing is able to provide this protection by performing computation on a hardware-based, attested Trusted Execution Environment (TEE). A Trusted Execution Environment (TEE), per the Confidential Computing Consortium, is ‘a secure area inside the main processor of a device that ensures the confidentiality and integrity of the data and code being executed within it’. In other words, it’s a protected space where sensitive data can be stored, processed, and manipulated, safe from potential attacks or unauthorized access.

TEEs work by isolating the specific application code, data, and operating system within the main device processor. This isolation is hardware-based, meaning it’s physically separate from the rest of the device’s components, which adds an extra layer of security; even if the system is compromised, an attacker would not have access to the data inside the enclave, as it’s isolated from the rest of the system by encryption. Even cloud providers and system administrators cannot access or view this data, ensuring the highest possible level of confidentiality and security. Confidential computing provides a secure environment for processing data in the cloud, which can help organizations adhere to regulatory compliance requirements, such as HIPAA and GDPR. 

As we navigate the ever-evolving landscape of data security, it becomes pivotal to compare different confidential computing systems. This comparative analysis allows us to understand their unique features, advantages, and potential limitations, facilitating a more informed decision when choosing a system to best suits the specific needs of data protection and privacy. 

There are several types of Trusted Execution Environments (TEEs), each with its own unique features and capabilities:

  1. Intel Software Guard Extensions (SGX): Intel SGX creates private memory regions or enclaves, which are areas of execution in memory that are protected from processes running at higher privilege levels. SGX is especially beneficial in cloud environments where you don’t necessarily trust the infrastructure. They provide robust protection for code and data from disclosure or modification, meaning SGX is a good fit for applications that need to handle sensitive data but don’t fully trust the system they’re running on.
  2. ARM TrustZone: ARM TrustZone technology provides a secure world, a trusted execution environment, alongside a less secure, normal world. This technology is commonly used in mobile devices and other low-power environments, since it consumes less energy and traditionally offers lower computation power. It’s ideal for separating secure and non-secure applications in the same device, such as mobile payments, secure boot, and content protection.
  3. AMD Secure Encrypted Virtualization (SEV): AMD SEV is designed to protect virtual machines (VMs) from rogue systems software, and to protect the hypervisor and VMs from each other. SEV is particularly useful in multi-tenant environments, like public or private clouds, where you need to protect VMs from each other, as well as from a potentially malicious hypervisor.                                    
  4. Secure Service Container (SSC): Secure Service Container (SSC) is a security technology designed to protect sensitive data and applications. It was developed by IBM and is used in their IBM Z and LinuxONE systems. It works by creating a secure, isolated environment known as a container. Within this container, data is automatically encrypted, and access is tightly controlled. The encryption keys are also securely managed within the container and are not accessible to external systems. SSC is mostly focused on securing mainframe systems for centralized, large-scale data processing and high-volume, mission-critical applications.                                                                           
  5. MultiZone™ Security: MultiZone™ Security is a trusted execution environment (TEE) solution developed by Hex Five Security for RISC-V processors. It provides hardware-enforced software isolation to create multiple secure execution zones or “multizones” for different tasks or applications.  

Each type of TEE offers different levels of security and functionality, and the choice between them would depend on the specific requirements and use case of the application. Our company is primarily an Azure shop. Microsoft Azure Confidential Computing provides Intel SGX and AMD SEV options. We have tested both options and here are some key takeaways from our experience: 

While Intel SGX offers a more fine-grained security model with enclaves and protection from malicious OS, it is limited by enclave size and requires significant changes to existing software by partitioning it into sections for use. AMD-SEV, on the other hand, provides full virtual memory encryption at VM level using a unique key, ensuring that even the hypervisor (which typically has unrestricted access to all VM memory) cannot read or tamper with the VM’s data. This provides for a simple programming model that does not require any changes to the existing applications. Since we are developing a data analytics platform where users would want to use multiple existing programs and libraries, AMD-SEV based trusted computing proved to be a better choice.  

Attestation: Confirmation of Trust  

Let’s assume a company has adopted confidential computing and is using Azure cloud AMD SEVs for all their secure computation needs. The work does not end there. The company needs to ensure that the computation is indeed being performed remotely on a TEE and not by some insecure VM “pretending” to be a TEE. Additionally, we need to ensure that the machine is always executing the right code. That’s where attestation comes in.  

Attestation is a process that validates or verifies the integrity and authenticity of a system and its components. Attestation involves creating a digital signature, which is essentially a summary or ‘hash’ of a software or hardware state, which can then be checked against a trusted and well-known signature. If the two match, it indicates that the system is in a known and trusted state.

In the context of Trusted Execution Environments (TEEs), attestation is the process of verifying the identity and integrity of the TEE. Azure Attestation collects data (evidence) from computing entities, transforms this evidence into a set of statements (claims), and checks these claims against certain adjustable rules (policies). After this, it creates cryptographic confirmations (proofs) for applications that are based on these claims. These entities could be, for instance, parties that rely on these claims for authorization (relying parties) or those responsible for system monitoring and recording (auditing authorities). Azure Attestation supports both platform and guest-attestation of AMD SEV-SNP, and it happens automatically during the critical boot path of CVMs, with no customer action needed. Guest-attestation, on the other hand, is something that can be explicitly requested by customer workloads (before computation begins) or by any other third parties. 

While there are many benefits to using TEEs, there remains a potential issue. Sometimes the code submitted by a customer introduces vulnerabilities, such as known vulnerabilities in the software package or malicious users. To protect against this issue, teams should follow best practices for secure coding, regularly testing and auditing the code, and promptly patching any discovered vulnerabilities, allowing you to use confidential computing to its maximum effectiveness. 

Trusted Execution Environments (TEEs) are secure areas inside a main processor that ensure the confidentiality and integrity of data and code execution. They provide a foundational layer of protection, especially pertinent in an era of increasing cyber threats. 

The attestation process acts as a handshake, validating the authenticity and integrity of the TEE. By proving the code’s initial state and subsequent execution, it fosters trust among devices and platforms in distributed environments. 

Investing in TEEs can be a strategic move to fortify security, build trust, and safeguard intellectual and data assets.