This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jianliang Shen <[email protected]>
- Loading branch information
Jianliang Shen
committed
Jul 18, 2024
1 parent
7ed50b1
commit c298ae9
Showing
17 changed files
with
127 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
source/_posts/Security/Confidential-Computing-Consortium.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
layout: post | ||
title: 机密计算联盟 CCC | ||
index_img: /img/post_pics/cc/ccc1.png | ||
date: 2024-07-18 20:18:02 | ||
tags: | ||
- Compute | ||
categories: | ||
- 安全 | ||
--- | ||
|
||
Confidential Computing Consortium (CCC). | ||
|
||
<!-- more --> | ||
|
||
# 目录 | ||
|
||
- [目录](#目录) | ||
- [机密计算的常用术语](#机密计算的常用术语) | ||
- [简介](#简介) | ||
- [包装模型术语](#包装模型术语) | ||
- [隔离方法](#隔离方法) | ||
- [A-Technical-Analysis-of-Confidential-Computing](#a-technical-analysis-of-confidential-computing) | ||
|
||
# 机密计算的常用术语 | ||
|
||
<details> | ||
<summary>点击查看PDF</summary> | ||
|
||
<iframe src="/pdf/Common-Terminology-for-Confidential-Computing.pdf" width="100%" height="1000" name="topFrame" scrolling="yes" noresize="noresize" frameborder="0" id="topFrame"></iframe> | ||
|
||
</details> | ||
|
||
## 简介 | ||
|
||
随着越来越多的公司和开源项目开始使用类似的术语来描述基于硬件的、经过验证的可信执行环境 (TEE) 的类似范例,供应商使用一致的术语来描述这些新功能在不同功能域中的应用方式将变得越来越重要。 | ||
|
||
机密计算联盟已将机密计算定义为“通过在基于硬件的、经过验证的可信执行环境中执行计算来保护正在使用的数据”,并确定了可信执行环境的三个主要属性:数据完整性、数据机密性和代码完整性。如“机密计算:基于硬件的应用程序和数据可信执行”中所述,可能存在四个附加属性(代码机密性、可编程性、可恢复性和可验证性),但只有可验证性才是将计算环境归类为机密计算的严格必要条件。 | ||
|
||
本文将术语“机密”的其他应用定义为描述性前缀,例如“机密容器”、“机密虚拟机”等。此类术语已开始出现在营销材料和商业产品以及相关开源项目中。本文重点介绍机密计算和相关的“机密 xxx”术语,以提供描述将机密计算添加到计算机架构的影响时的通用词汇表。目标是充分描述隔离计算工作负载所引入的不同潜在架构变化,以便正确评估保护完整应用程序及其数据的影响。内存隔离是机密计算引入的新元素之一。能够保护正在运行的应用程序会显著改变计算机安全的方法。网络攻击通常始于对内存内容的破坏(提取数据或修改内存状态以启用执行)。因此,有效的内存隔离能力早已被认为是最佳的潜在缓解措施。但保护正在使用的数据只是应用程序安全性的一部分。需要一种综合解决方案,利用机密计算和静态和动态保护来全面保护敏感工作负载及其数据,无论它们流向何处。 | ||
|
||
例如,在云计算中,保护使用中的数据成为一项基本要求,以使客户能够在云供应商提供的基础设施上运行时控制保护应用程序及其数据。所有云都支持建立在一定信任程度上的共享责任模型。机密计算允许以更强的方式分离责任和隔离资源。 | ||
|
||
|
||
## 包装模型术语 | ||
|
||
本文档定义了以下术语: | ||
|
||
- 机密库:在基于硬件的、经过认证的 TEE 内执行的库(例如“enclave”),这样它就不会受到其他此类库和 TEE 中任何托管环境的影响,并且可以由 TEE 外部的应用程序使用。 | ||
- 机密进程:在基于硬件的、经过认证的 TEE 内执行的进程(例如“受信任的应用程序”),这样它就不会受到其他机密进程和 TEE 中任何托管环境的影响。 | ||
- 机密容器:由 OCI 容器运行时启动的符合开放容器计划 (OCI) 的容器映像的入口点进程,这样该进程在基于硬件的 TEE 内执行,并且不会受到其他机密容器和 TEE 中任何托管环境的影响。 | ||
- 机密 VM:在基于硬件的、经过认证的 TEE 内执行的虚拟机,通过这种方式,整个 VM 映像内的代码和数据受到保护,不受虚拟机管理程序和主机操作系统以及其他机密 VM 和 TEE 中的任何托管环境的影响。 | ||
|
||
在上述定义中,托管环境可能包括在 TEE 内运行但在多个机密库、进程、容器或 VM 之间共享的部分。在这种情况下,使用术语“机密”意味着额外的隔离层,通过该隔离层,机密代码和数据即使在托管机密代码和数据的整体 TEE 实例内的共享环境中也受到保护。例如,可能使用嵌套隔离边界。 | ||
|
||
当代码的机密部分是较大包的一部分时,例如包含在整体 VM 映像内的机密库,我们使用介词“with”,如“带有机密库的 VM”,而不是“机密 VM”,后者要求整个 VM 映像在 TEE 内执行。 | ||
|
||
当代码的机密部分包含多个可以单独安装但它们之间没有安全隔离的包时,我们使用介词“in”,如“机密虚拟机中的进程”。 | ||
|
||
## 隔离方法 | ||
|
||
上述封装术语将由与 TEE 的硬件和固件协同运行的软件提供。这种组合将提供数据机密性、数据完整性和/或代码完整性保护的混合。数据机密性是在运行时通过隔离处理器(无论是 CPU 还是其他处理单元,如 GPU)内的特定 TEE 上下文(可能在 RAM 内)提供的。有多种方法可以提供使用中数据保护。限制 CPU 对 TEE 数据的可寻址性/可访问性的三种技术示例包括: | ||
|
||
- 访问控制验证:对内存区域的访问仅限于某些进程/上下文。 | ||
- 地址转换:内存的分段区域根本无法从 TEE 边界之外直接寻址。 | ||
- 分页控制:非 TEE 进程不会与 TEE 数据同时在 CPU 内活动。 | ||
|
||
当然,CPU 并不是唯一可以看到 TEE 数据的地方。此类数据通常也存储在 RAM 中。当在 RAM 中时,可能会尝试对 TEE 数据进行旁道攻击。可以通过加密 RAM 中的 TEE 数据等方式保护 RAM 免受此类攻击。 | ||
|
||
处理器供应商通常会捆绑多种隔离方法来保护其实现。提供机密计算功能的软件就是在这些捆绑包的基础上进行分层的。 | ||
|
||
![](/img/post_pics/cc/ccc2.png) | ||
|
||
但是,根据这些隔离方法,实际上集成和交付了哪些软件层?软件层的打包取决于代码是为软件开发人员、系统集成商还是系统管理员准备的。在系统管理员实际安装代码之前,很可能会出现许多嵌套的打包应用层。考虑到这一点,下面的栏目列出了九个示例,说明软件层如何实际打包以供软件供应链下游参与者使用。在这些示例中,仅突出显示了 NIST 800-12 Rev.1 定义的可信计算基 (TCB) 的软件元素。未显示 TCB 的其他元素(例如固件和硬件)。 | ||
|
||
![](/img/post_pics/cc/ccc3.png) | ||
|
||
如图所示,这九种实施方案中的每一个都可以映射到上述四个打包术语之一。红色框显示了在 TEE 内运行的组件集。黄色框显示了可能一起打包的示例。在另一个示例(未显示)中,红色框中的某些组件可能被单独打包。 | ||
|
||
此外,九列中的每一列都可由某些使用中数据隔离方法子集支持。这种打包分类对于机密计算的最终用户非常有用,因为它可以: | ||
|
||
- 表达应该作为打包产品一部分的软件元素。 | ||
- 了解在特定封装产品中哪些信息是隔离的(或不是)。注意:这由红色虚线表示,该虚线描绘了在内存隔离部分运行的机密计算。 | ||
- 了解隔离方法中的常见角色,例如“TEE shim”,它有助于加载 TEE,并将信息传递到受保护的内存和从受保护的内存传递信息。 | ||
- 了解各种 CCC 项目如何通过常见的北向抽象来抽象内存隔离方法的差异。 | ||
- 了解从 TEE 公开的封装 API 如何与其他软件交互。这包括 TEE 在建立机密性后通过安全通道加载其他代码/数据的能力。 | ||
- 允许比较封装软件替代方案,每个替代方案可能基于不同的隔离方法。 | ||
- 启用可扩展性,以便新兴处理器技术可以声明它们支持的封装模型(例如基于 RISC-V)。 | ||
|
||
各种 CCC 项目将提供针对此处描述的一种或多种包装模型的代码。示例可能包括: | ||
|
||
- Occlum 和/或 Gramine 可以帮助开发人员将现有应用程序打包为基于 Intel SGX 构建的“机密库”包。 | ||
- Enarx 可以帮助开发人员编译单个应用程序包,该包可以透明地部署到多个部署类别中。相同的应用程序包可以在 SGX 等“机密库”或 SEVSNP 等“机密 VM”中运行,Enarx 提供抽象层以确保相同的运行时环境。 | ||
- Open Enclave 可以让开发人员设计一个能够在 SGX(打包为“机密库”)和 TrustZone(打包为“机密进程”)上运行的库。 | ||
|
||
# A-Technical-Analysis-of-Confidential-Computing | ||
|
||
<iframe src="/pdf/A-Technical-Analysis-of-Confidential-Computing.pdf" width="100%" height="1000" name="topFrame" scrolling="yes" noresize="noresize" frameborder="0" id="topFrame"></iframe> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.93 MB
themes/fluid/source/pdf/A-Technical-Analysis-of-Confidential-Computing.pdf
Binary file not shown.
Binary file added
BIN
+588 KB
themes/fluid/source/pdf/Common-Terminology-for-Confidential-Computing.pdf
Binary file not shown.
Binary file added
BIN
+3.91 MB
themes/fluid/source/pdf/NVIDIA-Blackwell-Architecture-Technical-Overview.pdf
Binary file not shown.
Binary file added
BIN
+8.05 MB
themes/fluid/source/pdf/NVIDIA-H100-GPU-Architecture-Whitepaper-zhCN.pdf
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+856 KB
themes/fluid/source/pdf/NVIDIA_Fermi_Compute_Architecture_Whitepaper.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.