Tspi_Data_Unbind(3)

πŸ’– Tspi_Data_Unbind(3) πŸ’–

okay bestie, welcome to the TCG Software Stack Developer's Reference ✨ this is the Library Functions Manual page for Tspi_Data_Unbind(3) and we are gonna get you UNBOUND, literally πŸ¦‹


🌸 NAME 🌸

Tspi_Data_Unbind β€” decrypts data that has been bound to a 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_Data_Unbind(TSS_HENCDATA hEncData,             TSS_HKEY hEncKey,
                            UINT32*      pulUnboundDataLength, BYTE**   prgbUnboundData);

πŸŽ€ DESCRIPTION πŸŽ€

so Tspi_Data_Unbind decrypts the encrypted data blob that got exported from the data object you used over in Tspi_Data_Bind. 🫢

but listen β€” before you even think about calling this, that encrypted data blob has got to be imported into the object addressed by Tspi_SetAttribData. no import, no unbind, periodt πŸ’…


🧚 PARAMETERS 🧚

πŸ’œ hEncData

the handle of the data object that's holding your encrypted data. that's the one. πŸ‘‘

πŸ’œ hEncKey

handle to the key object that addresses the private key used to decrypt the data. the key to the whole situation, honestly πŸ”‘

πŸ’œ pulDataLength

receives the length of the data over at the parameter prgbUnboundData. it's giving "how much stuff is coming" πŸ“

πŸ’œ prgbUnboundData

receives a pointer to a buffer containing the plaintext data. that's the goods, bestie 🌈


πŸ”₯ RETURN CODES πŸ”₯

Tspi_Data_Unbind returns TSS_SUCCESS on success β€” slay β€” otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hEncData or hEncKey is not a valid handle. bestie those handles are fake πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. not our fault, not your fault, it's just vibes 😭
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. rude, but okay πŸ™ˆ
  • TSS_E_INVALID_ENCSCHEME β€” invalid encryption scheme. wrong scheme, wrong energy ⚠️
  • TSS_E_ENC_INVALID_LENGTH β€” invalid length of data to be encypted. the length said no βœ‹
  • TSS_E_ENC_NO_DATA β€” no data to encrypt. there's literally nothing here πŸ“
  • TSS_E_ENC_INVALID_TYPE β€” invalid encryption type. not the type we were looking for πŸ’…

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Data_Unbind conforms to the Trusted Computing Group Software Specification version 1.1 Golden. iconic behavior, no cap ⭐


🌈 SEE ALSO 🌈

Tspi_Data_Bind(3), Tspi_Data_Unseal(3), Tspi_Data_Seal(3).


and that's the whole page, bestie! this one's from TSS 1.1, dated 2004-05-25 β€” old but still serving πŸ’– go unbind something, ily, bye πŸŽ€