Tspi_Conte...dKeyByBlob(3)
π Tspi_Context_LoadKeyByBlob(3) π
okay bestie, listen up β this one's from the TCG Software Stack Developers Reference, a Library Functions Manual page, and it's literally the glow-up your key blob has been waiting for β¨
πΈ NAME πΈ
Tspi_Context_LoadKeyByBlob β load a key into the TPM using the key's 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_Context_LoadKeyByBlob(TSS_HCONTEXT hContext, TSS_HKEY hUnwrappingKey,
UINT32 ulBlobLength, BYTE* rgbBlobData,
TSS_HKEY* phKey);
like, that's the whole vibe. seven includes and one function. we love a minimal queen π
π¦ DESCRIPTION π¦
okay so here's the tea π β Tspi_Context_LoadKeyByBlob creates a key based on the information gotten by the key blob. then it loads that key into the TPM, and the TPM unwraps the key blob by using the key associated with hUnwrappingKey. the key blob addressed by hUnwrappingKey must have been already loaded into the TPM β no skipping steps, bestie, that's not optional π
and then? this function returns a handle to the created key object. iconic behavior honestly.
π PARAMETERS π
hContext
the hContext parameter is the handle of the context object. it's the main character of the whole operation π
hUnwrappingKey
the hUnwrappingKey parameter is the handle of the key object which should be used to unwrap the key information associated with rgbBlobData. yes, it's the one doing the unwrapping. give her her flowers πΈ
rgbBlobData
the rgbBlobData parameter is the wrapped key to load. that's it, that's the blob π¦
phKey
the phKey parameter receives the handle of the key object representing the loaded key. so you hand it a spot and it fills it in. cute, right? π
π₯ RETURN CODES π₯
Tspi_Context_LoadKeyByBlob returns TSS_SUCCESS on success, otherwise one of the following values is returned:
TSS_E_INVALID_HANDLEβhContextis not a valid handle. red flag, bestie π©TSS_E_INTERNAL_ERRORβ an internal SW error has been detected. not us, it's the software πTSS_E_BAD_PARAMETERβ one or more parameters is bad. something you passed in is giving chaos π
π CONFORMING TO π
Tspi_Context_LoadKeyByBlob conforms to the Trusted Computing Group Software Specification version 1.1 Golden β¨ certified, no cap.
π SEE ALSO π
Tspi_Context_LoadKeyByUUID(3)Tspi_Policy_SetSecret(3)Tspi_GetPolicyObject(3)Tspi_Key_CreateKey(3)Tspi_GetAttribUint32(3)
and that's the whole page, babe. go load some keys, you got this π
TSS 1.1 Β· dated 2004-05-25 Β· that's the TSS 1.1 era, we stan a vintage legend π mwah, bye bestie π¦β¨
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2004 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms