TSPI_TPM_CREATEENDORSEMENTKEY(3)

πŸ’– Tspi_TPM_CreateEndorsementKey β€” Library Functions Manual πŸ’–

okay bestie, welcome to the TCG Software Stack Developer's Reference 🫢 this one lives in section 3 of the Library Functions Manual and it's giving very "trusted computing, but make it cute" energy. let's get into it ✨


✨ NAME ✨

Tspi_TPM_CreateEndorsementKey β€” create the endorsement key πŸ‘‘


🌸 SYNOPSIS 🌸

#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>

TSS_RESULT Tspi_TPM_CreateEndorsementKey(TSS_HTPM        hTPM, TSS_HKEY hKey,
                                         TSS_VALIDATION* pValidationData);

like, seven includes, one function call. the way that header list just keeps going?? iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Tspi_TPM_CreateEndorsementKey creates an endorsement key. πŸ’–

⚠️ but bestie, real talk: this function is currently not implemented. it's literally just vibing in the header file, manifesting. don't build your whole personality around it working, fr fr. 😭

before this method is called, the key information for creating the key must be set in the key object by Tspi_SetAttribData. so like, you gotta prep the key first, no skipping steps. πŸŽ€

on return, the public endorsement key can be retrieved by Tspi_GetAttribData from the key object. so the flow is: set attribs β†’ (theoretically) create β†’ get attribs. lowkey a whole journey. ✨


🌈 PARAMETERS 🌈

πŸ’œ hTPM

the hTPM parameter is used to specify the handle of the TPM object. it's your TPM's little name tag 🏷️

πŸ’œ hKey

the hKey parameter is the handle of the key specifying the attributes of the endorsement key to create. this is the key that knows what kind of endorsement key we're cooking up πŸ”₯

πŸ’œ pValidationData

the pValidationData parameter is a validation data structure. it provides external information required to compute the signature. πŸ–ŠοΈ

once the command is completed, the structure provides a buffer containing the validation data and a buffer containing the data the validation data was computed from. two buffers, one struct, main character energy tbh. πŸ‘‘


πŸ”₯ RETURN CODES πŸ”₯

Tspi_TPM_CreateEndorsementKey returns TSS_SUCCESS on success, otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hTPM or hKey is not a valid handle. πŸ’€ something's fake in the group chat.
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. not us, it's the internals. πŸ™ˆ
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. bestie behaved badly. 😭

🧚 CONFORMING TO 🧚

Tspi_TPM_CreateEndorsementKey conforms to the Trusted Computing Group Software Specification version 1.1 Golden. ✨ certified, no cap.


πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, iykyk πŸ’…


and that's the whole page, bestie! this one's from TSS 1.1, dated 2004-05-25, served up from the Library Functions Manual πŸ’– mwah, go forth and set those attribs πŸŽ€πŸ¦‹βœ¨