TSPI_KEY_CONVERTMIGRATIONBLOB(3)

πŸ’– Tspi_Key_ConvertMigrationBlob β€” bestie edition πŸ’–

okay so welcome to the TCG Software Stack Developer's Reference ✨ this one lives in section 3 of the library functions manual, and it's genuinely one of the cutest little glue functions in the whole TSS lineup. no cap.


🌸 NAME 🌸

Tspi_Key_ConvertMigrationBlob β€” create a wrapped key from a migration blob πŸŽ€


✨ 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_Key_ConvertMigrationBlob(TSS_HKEY hKeyToMigrate,         TSS_HKEY hParentKey,
                                         UINT32   ulRandomLength,        BYTE*    rgbRandom,
                                         UINT32   ulMigrationBlobLength, BYTE*    rgbMigrationBlob);

like yes she's a long signature but she's worth it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• Tspi_Key_ConvertMigrationBlob takes the migration blob that was built by Tspi_Key_CreateMigrationBlob using the migration scheme TSS_MS_MIGRATE, and turns it into a normal wrapped key. it's giving glow-up. it's giving transformation arc. πŸ‘‘

the resulting normal wrapped key blob gets stored in the instance associated with hKeyToMigrate, and you can pull it back out of that instance later using Tspi_GetAttribData. literally so convenient, i'm obsessed 🫢


πŸŽ€ PARAMETERS πŸŽ€

hKeyToMigrate

the handle of the key object you wanna convert. main character of this whole operation tbh πŸ’–

hParentKey

handle to the parent key related to the key addressed by hKeyToMigrate. yes bestie, family matters here.

ulRandomLength

the length of the random data you're providing at the parameter rgbRandom.

rgbRandom

random data as returned together with the migration blob by the method Tspi_Key_CreateMigrationBlob. don't lose this, she's important πŸ₯Ί

ulMigrationBlobLength

the length of the migration blob data provided at the parameter rgbMigrationBlob.

rgbMigrationBlob

migration blob data as returned by a previously called method Tspi_Key_CreateMigrationBlob. yep, you gotta have called that one first β€” this is the sequel, not a standalone 🌈


πŸ’€ RETURN CODES πŸ’€

Tspi_Key_ConvertMigrationBlob returns TSS_SUCCESS on success, otherwise one of these lil guys shows up:

  • TSS_E_INVALID_HANDLE β€” hKeyToMigrate or hParentKey is not a valid handle. not me passing a fake handle 😭
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. something broke deep inside and honestly, same.
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. vibe check failed fr fr πŸ™ˆ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Key_ConvertMigrationBlob conforms to the Trusted Computing Group Software Specification version 1.1 Golden. periodt. πŸ’…βœ¨


πŸ”₯ 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 β€” vintage but iconic, like a limited edition πŸ“ thanks for reading, mwah πŸ’œ