减少受限设备所需的根证书列表

Reduce Required Root Certificate List For Constrained Devices

我正在开发内存受限的 IoT 设备,并希望通过 MQTT 将其连接到 Google IoT Core。必须信任以允许服务器 TLS 证书验证的必需根证书列表非常长。我正在寻找适用于资源有限的 IoT 设备但不会突然停止工作的较小列表。有没有办法安全地减少所需证书的列表?

设备安全建议部分下的联机文档 (https://cloud.google.com/iot/docs/concepts/device-security) 指出:

'Use TLS 1.2 when communicating with mqtt.googleapis.com:8883 (or :443), and verify that the server certificate is valid using root certificate authorities. Read this security note for detailed TLS requirements and future compatibility.'

安全说明 (https://security.googleblog.com/2015/09/disabling-sslv3-and-rc4.html) 指出:

'At least the certificates in https://pki.google.com/roots.pem must be trusted.'

我可以清楚地看到文档指出需要完整列表,但这对于内存受限的物联网设备来说似乎是不可接受的。例如,AWS 只需要一个证书——具体取决于所选的 TLS 密码。请参阅服务器身份验证 (https://docs.aws.amazon.com/iot/latest/developerguide/managing-device-certs.html)

下的 AWS 文档

任何有关减少根证书列表的方式的帮助——例如基于 ECC 的验证与基于 RSA 的验证的淘汰——都会有所帮助。

感谢 Github 上一位乐于助人的 Google 工程师回答了问题 Clarify how trusted_RootCA_certs were chosen in the Google provided iot-device-sdk-embedded-c project, the solution is to use a long-term support (LTS) domain

根据文档,可以使用特殊域“mqtt.2030.ltsapis.goog”代替 "mqtt.googleapis.com",只需要两个根 CA 证书带有小型 ECC 256 public 密钥,而不是整个 root.pem 包 (128KB)。

这些根 CA 证书在 2030 年之前都是固定的。

所需的根 CA 是:

请注意 long-term support (LTS) domain 文档中嵌入式设备的其他要求和功能。