Tspi_TPM_O...tSRKPubKey(3)

🌸 Tspi_TPM_OwnerGetSRKPubKey πŸ’…

okay bestie, so this one lives in the TCG Software Stack Developer's Reference, and it's genuinely one of the cuter little calls in the TSS 1.1 era, iykyk. Buckle up, we're getting a public key πŸ¦‹


✨ NAME ✨

Tspi_TPM_OwnerGetSRKPubKey β€” get public key of the SRK


✨ SYNOPSIS ✨

#include <tss/tspi.h>

TSS_RESULT Tspi_TPM_OwnerGetSRKPubKey(TSS_HTPM hTPM,
                                      UINT32*  pulPubKeyLength,
                                      BYTE**   prgbPubKey);

✨ DESCRIPTION ✨

so basically Tspi_TPM_OwnerGetSRKPubKey returns the public key of the key object, and it does that using owner authorization. main character energy fr fr πŸ”₯

but okay, important: this can only be used on 1.2 TPMs, and it can only be used to return the public key of the SRK. That's it. That's the whole vibe. No other key, no other TPM version, no exceptions, periodt πŸ’€


✨ PARAMETERS ✨

hTPM

the hTPM parameter is used to specify the handle of the TPM object. it's giving "which TPM are we even talking to" 🫢

pulPubKeyLength

the pulPubKeyLength parameter is the length (in bytes) of the prgbPubKey parameter. it's the lil size tag on the blob, ngl πŸ“

prgbPubKey

the prgbPubKey parameter is the pointer to the memory block containing the public key blob retrieved for the key object referenced by hKey. yes bestie, it says hKey right there in the original, we don't ask questions, we just pass it along πŸ’–


✨ RETURN CODES ✨

Tspi_TPM_OwnerGetSRKPubKey returns TSS_SUCCESS on success 🌈 otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle. bestie the handle is fake 😭
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. not bad as in "bad bitch", bad as in broken πŸ™ˆ
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. something deep inside said no πŸ’€
  • TSS_E_TPM_UNSUPPORTED β€” the TPM is not version 1.2 or later - (Note: still unimplemented) ⭐
heads up: that last one literally comes with the note that it's still unimplemented. the source said it, so we say it. no cap.

✨ CONFORMING TO ✨

Tspi_TPM_OwnerGetSRKPubKey conforms to the Trusted Computing Group Software Specification version 1.2 πŸ‘‘


✨ SEE ALSO ✨

go read those too, they're part of the lore 🧚


and that's the whole page, bestie!! this one comes to you from TSS 1.1, dated 2007-07-19 β€” yes, an elder, but she ate and left no crumbs πŸ’…βœ¨ take care of your SRK and she'll take care of you πŸŽ€πŸ¦‹