Is there any API to get public part of Endorsement Key(EK) of TPM?

Rahul K 51 Reputation points
2021-12-30T13:23:01.473+00:00
  1. How to get EK or public EK of TPM?
  2. We are able to get the public key hash using powershell command: get-tpmendorsementkeyinfo -hash "Sha256"
  3. Is there any API in C# or C++ to get public key hash of EK.

We are planning to use this EK to uniquely identify a device, as each device has a unique EK.

reference: Stackoverflow question about using TPM as a device fingerprint

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,430 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,311 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,545 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,767 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2021-12-30T22:32:34.157+00:00

  2. Sander van de Velde 29,286 Reputation points MVP
    2022-01-02T22:53:41.703+00:00

    Hello anonymous user-5396 ,

    The TPM is supported for securing the IoT connection with the Azure Device provisioning service resource.

    A programming sample in C# for this communication solution is seen here.

    This is part of a bigger story of course (where the Azure IoT Edge runtime will complete the full enrollment circle).

    Still, this could be your starting point for getting an endorsement key.