簡體   English   中英

C# 和 TPM 功能

[英]C# and TPM Functions

我一直在無休止地在互聯網上尋找答案,但不幸的是似乎在任何地方都找不到。

我正在嘗試在 C# 中運行此 PowerShell 命令的等效命令,但不必將 PowerShell 庫導入我的代碼:

獲取-TpmEndorsementKeyInfo -hashalgorithm sha256

基本上,我想要得到的只是我的 TPM EK 的 SHA256 表示。 如果可能,我還想檢索相同的指紋,因為 PowerShell 命令在運行時給出。

我試過使用 Limpet ( https://github.com/ms-iot/security/tree/master/Limpet/Limpet.NET ) 但無濟於事。

為什么我需要這個? 我試圖使用 TPM 作為一種機制來證明 PC 是獨一無二的,然后我可以使用這台計算機的 TPM 設備獨有的 hash 來執行其他功能,包括可能的許可。 無論哪種方式,我都試圖在 C# 中執行此操作。

理想情況下,我還找到了一種使用 C# 和 TPM 簽署消息的方法,但我會繼續尋找。

有什么線索嗎?

I know the class is defined in an assembly that is in an Azure SDK, but you could have a look at the SecurityProviderTpmHsm class which is defined in the Microsoft.Azure.Devices.Provisioning.Security.Tpm package.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM