TPM_IO_Hash_Start(3)
okay so this is the TPM_IO_Hash_Start(3) page from the libtpms manual, and bestie, we are getting into TPM TIS hash vibes. Buckle up, it's giving low-level but iconic π
β¨
πΈ NAME πΈ
TPM_IO_Hash_Startβ indicate the beginging of a TPM TIS hash operationTPM_IO_Hash_Dataβ hash the provided dataTPM_IO_Hash_Endβ indicate the end of a TPM TIS hash operation
π LIBRARY π
TPM library (libtpms, -ltpms)
β¨ SYNOPSIS β¨
#include <libtpms/tpm_types.h>
#include <libtpms/tpm_tis.h>
#include <libtpms/tpm_error.h>
TPM_RESULT TPM_IO_Hash_Start(void);
TPM_RESULT TPM_IO_Hash_Data(const unsigned char *data,
uint32_t data_length);
TPM_RESULT TPM_IO_Hash_End(void);
π§ DESCRIPTION π§
So the TPM_IO_Hash_Start() function can be used by an implementation of the TPM TIS hardware interface to indicate the beginning of a hash operation. Following the TPM TIS interface specification, it resets several PCRs and terminates existing transport sessions. That's the main character move.
Then TPM_IO_Hash_Data() is used to send the data to be hashed to the TPM. And TPM_IO_Hash_End() calculates the final hash and stores it in the locality 4 PCR. The 3 functions must be called in the order they were explained β no skipping ahead, bestie.
The implementation of the above functions handles all TPM-internal actions such as the setting and clearing of permanent flags and PCRs and the calculation of the hash. Any functionality related to the TPM's TIS interface and the handling of flags, locality and state has to be implemented by the caller. So yes, the caller has to handle that part themselves β that's the vibe check.
π ERRORS π
TPM_SUCCESSβ The function completed successfully.TPM_FAILβ General failure.TPM_INVALID_POSTINITβ TheTPM_IO_Hash_Start()function was called before the TPM received aTPM_Startupcommand.TPM_SHA_THREADβ TheTPM_IO_Hash_Data()orTPM_IO_Hash_End()functions were called before theTPM_IO_Hash_Start()function.
For a complete list of TPM error codes please consult the include file libtpms/tpm_error.h.
π¦ SEE ALSO π¦
okay final sign-off bestie: source/version is libtpms, dated 2026-01-02 β that's the page, slay and stay local π
π«Ά
π¦ where this page comes from
- alpine 3.24: libtpms-doc 0.10.2-r0 Β· BSD-3-Clause
- arch rolling: libtpms 0.10.2-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms