How can we verify the TEE workers really fit requirement of Phala?

Question coming from miner group:

  • how can we verify the TEE workers online fit the SGX requirement?
  • how can we know there is no fake TEE workers getting reward?
  • how can we trust the team in this mining game?

矿工群问题:

  • 我们如何验证Phala的TEE矿工符合安全要求?
  • 如何确保矿工机器没有滥竽充数的?
  • 如何确保开发团队没有在后台夹带私货?
2 Likes

How can we verify the TEE workers online fit the SGX requirement?

We’re using technology called “Remote attestation” which provide by TEE vendors (We only support Intel SGX currently),
so a worker fits SGX requirement, it’s judged by Intel, not Phala.

When a worker doing on-chain registration, PRuntime will acquire attestation report from TEE vendor through “Remote attestation”,
then Phala will verify and validate the report.

In addition, Attestation report has security measurement of the worker,
including known security issues (most of these issues can be fixed by update firmware or disable Hyper-Thread, iGPU and Turbo-Boost),
Phala will deny the worker online which has known critical security issues.

It is important to notice that worker’s security measurement would be changed as time goes on,
for example, Intel will release new microcode update every quarters, and expose new found vulnerabilities of existing products,
if affect your current in-use CPU will lead the security measurement become less security than before.

Except critical security problems such as Meltdown and Specture, most of vulnerabilities are at the stage of theoretic or require very harsh terms.
Phala propose Confidence Level that allowing Confidential Smart contract running on suitable workers.
The higest rank is report with no vulnerability, the second rank is un-likely to exploit, the third rank is have possibilities but no exploit case.

In the end, when exploit come true, Phala has protocol to force affected workers offline.

How can we know there is no fake TEE workers getting reward?

All workers require do “Remote attestation” on registration process, and Phala verify and validate the attestation report,
if it is a fake TEE worker, it’s impossible to get a attestation report, because the report is signed by TEE vender.

How can we trust the team in this mining game?

Phala is open source, and team do every governing action can be found on-chain.

我们如何验证Phala的TEE矿工符合安全要求?如何确保矿工机器没有滥竽充数的?

我们使用 ”远程验证“ 技术,评定 TEE 是否符合需求的并不是 Phala 团队,而是 TEE 的供应商(如 Intel、AMD 等,暂时我们仅支持 Intel 的 TEE)。

在 Phala 区块链上注册矿机时,PRuntime 会通过 ”远程验证“ 技术向 TEE 的供应商获取主机的认证报告,Phala 区块链会验证认证报告的真实性和有效性。

认证报告中也会包含主机中包含的硬件漏洞情况,并对主机的安全情况做出评估,由于这些安全漏洞会削弱隐私智能合约的保密性,故 Phala 会拒绝有严重安全问题的主机注册上链。

需要注意的是,安全问题是随着时间被发现的,有可能之前被评估为安全的主机,某一天突然被评估为不够安全了,
所以 Phala 会要求在线的主机定期重新获取供应商的认证报告,以更新自己的安全级别(这个过程 PRuntime 会自动处理,利用特殊手段故意阻碍会导致强制下线)。

除去极其严重的安全问题(如“熔断”、“幽灵”漏洞),大多数硬件漏洞都处于理论或者实验室层面,
Phala 提出安全级别的概念,在 Phala 网络上的隐私智能合约可以根据自身需要可以委托适当安全级别的主机执行,
最高等级为 TEE 供应商认证报告中没有包含任何安全漏洞,次一级为包含了很难被利用的安全漏洞,再次一级为包含有可能会被利用的安全漏洞(尽管仍没有被利用的案例)。

并且,当严重的安全时间发生,Phala 会强制被安全问题影响的主机下线。

如何确保矿工机器没有滥竽充数的?

原理类似波卡的验证人节点,Phala 链上会对 TEE 主机有治理能力,包含在线状况,运行状态等监控,且 TEE 必须在限定时间内响应,未响应将被判定为下线并从抵押的代币中扣除一些作为惩罚

如何确保开发团队没有在后台夹带私货?

区块链并不存在“后台”的概念,Phala 团队对区块链的一切操作都可以在链上读出。

此外,Phala 的全部代码开源,有能力的用户可以自行编译。
例外是 PRuntime,由于 PRuntime 是链下服务,为了保证 PRuntime 不被恶意修改,PRuntime 使用了特殊的数字签名(签名工具由 TEE 供应商提供),
数字签名由程序的数字签名加上 Phala 团队的签名组成,Phala 链上仅允许由 Phala 团队签名的 PRuntime 注册。

为了在技术上证明 Phala 团队发布的 PRuntime 程序不是在开源代码的基础上夹带私货,
TEE 使用的编译器拥有 “Reproductible” 能力,
也就是说,有能力的使用者可以使用跟 Phala 相同的软件环境来编译 PRuntime,可以得出跟 Phala 团队编译出的版本相同的程序的数字签名。

在 “远程认证” 时,PRuntime 的数字签名会包含在 TEE 供应商的认证报告中,
Phala 技术团队会将发布的 PRuntime 的数字签名注册到链上(PRuntime 白名单),
在链上“注册 TEE 设备”的验证报告阶段会与 PRuntime 白名单 进行比对,不同将被拒绝注册,
Phala 也通过这种方式强制过旧版本的 PRuntime 上线。

2 Likes