Tspi_Data_Seal(3)
π Tspi_Data_Seal(3) π
okay bestie, welcome to the TCG Software Stack Developer's Reference β this one's a classic, let's get into it π«Ά
β¨ NAME β¨
Tspi_Data_Seal β encrypts a data blob in a way that only Tspi_Data_Unseal can decrypt it, and only on the same system. no cap, it's locked to that machine π
πΈ 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_Seal(TSS_HENCDATA hEncData, TSS_HKEY hEncKey,
UINT32 ulDataLength, BYTE* rgbDataToSeal,
TSS_HPCRS hPcrComposite);
π¦ DESCRIPTION π¦
Tspi_Data_Seal takes a data blob and encrypts it in a way that it can only be decrypted by Tspi_Data_Unseal, and only on the same system. literally tied to the machine, it's giving exclusive π
The way it works? The blob gets encrypted with a public key operation</>, using the nonmigratable key that the given encryption key object points at. that key is not going anywhere, bestie, and neither is your data π₯
π PARAMETERS π
hEncData
The handle of the data object β and guess what, on successful completion of the command this is where your sealed data lives π so yeah, kind of a big deal.
hEncKey
The handle to the key object that addresses the nonmigratable key used to encrypt the data. π
ulDataLength
The length, in bytes, of the rgbDataToSeal parameter. numbers matter, periodt.
rgbDataToSeal
A pointer to the memory holding the data you wanna encrypt. π
hPcrComposite
The handle of the PCR Composite object that specifies which PCRs are part of the sealed data blob. β¨
set this to NULL if you want the encrypted data to only be bound to the system and PCRs are just not it for you π
β RETURN CODES β
Tspi_Data_Seal returns TSS_SUCCESS when everything slays, otherwise one of these little guys shows up:
TSS_E_INVALID_HANDLEβ one of the following parameters is invalid:hEncData,hEncKey,rgbDataToSeal. πTSS_E_INTERNAL_ERRORβ something went wrong internal to the TSS. not our fault, it's giving mystery π
π CONFORMING TO π
Tspi_Data_Seal conforms to the Trusted Computing Group Software Specification version 1.1 Golden. iconic behavior, honestly.
π SEE ALSO π
Tspi_Data_Unseal(3)β the other half of this situationship, go read it π
and that's the whole page, bestie!! this one's from TSS 1.1, dated 2004-05-26 β vintage but still ate πβ¨ bye ilysm π«Ά
π¦ 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