Azure IoT 设备配置 - 认可密钥无效或与注册不匹配

Azure IoT Device Provisioning - Endorsement key is invalid, or does not match the Enrollment

我正在尝试使用设备的 TPM 添加手动注册。

我已经从设备 运行 Linux 中获取了认可密钥。

现在,当我在 Azure 门户中保存配置时,它 returns 一个 400 Bad Request 消息指出 Endorsement key is invalid, or does not match the Enrollment:

我错过了什么?

如果您确定从您的设备正确获取 TPM 信息,请确保您具有正确的 IoT 中心设备 ID,如果未指定,则考虑注册 ID。

注意: endorsementKey

The endorsement key is an encryption key that is permanently embedded in the Trusted Platform Module (TPM) security hardware, generally at the time of manufacture. This private portion of the endorsement key is never released outside of the TPM. The public portion of the endorsement key helps to recognize a genuine TPM. The endorsement key is a base64 encoded value.

参考:Create a TPM individual enrollment

使用 Intel 的固件 TPM 时,认可密钥被篡改。

这可能是由 TSS.NET 库引起的(我对此表示怀疑)。或者它可能是由原型本身引起的,原型本身以某种方式请求 RSA 密钥导致 EK 发生更改。或者问题可能出在固件本身。

在任何情况下,我使用的 EK 都是无效的(与有效 EK 相比,它短了很多 -80 字节),我认为这就是 Dps 抛出错误的原因。