TSPI_KEY_WRAPKEY(3)
π Tspi_Key_WrapKey(3) π
okay bestie, welcome to the TCG Software Stack Developer's Reference π this one's a 3-section page (that means it's a library call, iykyk) and it's all about wrapping keys. yes, wrapping. like a lil gift. but cryptographic. let's go β¨
πΈ NAME πΈ
Tspi_Key_WrapKey β wrap a key with the key addressed by hWrappingKey.
π¦ 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_WrapKey(TSS_HKEY hKey, TSS_HKEY hWrappingKey,
TSS_HPCRS hPcrComposite);
β¨ DESCRIPTION β¨
so TSS_Key_WrapKey wraps the private key hKey using the public key addressed by hWrappingKey. that's the whole vibe π
if hPcrComposite is not set to NULL (that's 0, bestie), then the key blob it creates gets bound to its PCR values. no cap.
the key object addressed by hKey must contain the key information needed for the creation. periodt.
on a successful return from this call, hKey can be loaded into a TPM π₯
and listen β hKey must have been created as a migratable key, and it should have its usage and migrations secrets set using Tspi_Policy_SetSecret(3). also, hKey should have had its private key set to either RSA private component, p or q. the way that's a whole checklist, I know, but that's just how it is π«Ά
π PARAMETERS π
hKey
the handle of the key object that is wrapped.
hWrappingKey
the handle to the key used to wrap the newly created key.
hPcrComposite
the handle to an object β if the value of the handle doesn't equal NULL, the newly created key will be bound to the PCR values described with this object.
β RETURN CODES β
Tspi_Key_WrapKey returns TSS_SUCCESS on success π otherwise one of these lil guys comes back at you:
TSS_E_INVALID_HANDLEβ eitherhKey,hWrappingKeyorhPcrCompositeare invalid handles.TSS_E_INTERNAL_ERRORβ an error occurred internal to the TSS. π
π CONFORMING TO π
Tspi_Key_WrapKey conforms to the Trusted Computing Group Software Specification version 1.1 Golden. iconic. π
π SEE ALSO π
Tspi_Key_CreateKey(3)Tspi_Key_CertifyKey(3)Tspi_Key_RegisterKey(3)
π«Ά that's the whole page, bestie. go wrap some keys responsibly. π§
TSS 1.1 Β· 2004-05-26 β yeah she's an old queen but she still slays π β¨ bye bb!! πππ¦
π¦ 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) 2006 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms