Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
TPM_IO_Hash_Start(3)					    TPM_IO_Hash_Start(3)

NAME
     TPM_IO_Hash_Start	 - indicate the beginging of a TPM TIS hash operation

     TPM_IO_Hash_Data	 - hash the provided data

     TPM_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
     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.  The TPM_IO_Hash_Data() function is
     used to send the data to be hashed to the TPM.  The TPM_IO_Hash_End() func-
     tion calculates the final hash and stores it in the locality 4 PCR.  The 3
     functions must be called in the order they were explained.

     The implementation of the above functions handles all TPM-internal actions
     such as the setting and clearing of permanent flags and PCRs and the calcu-
     lation 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.

ERRORS
     TPM_SUCCESS
	 The function completed successfully.

     TPM_FAIL
	 General failure.

     TPM_INVALID_POSTINIT
	 The TPM_IO_Hash_Start() function was called before the TPM received a
	 TPM_Startup command.

     TPM_SHA_THREAD
	 The TPM_IO_Hash_Data() or TPM_IO_Hash_End() functions were called be-
	 fore the TPM_IO_Hash_Start() function.

     For a complete list of TPM error codes please consult the include file
     libtpms/tpm_error.h

SEE ALSO
     TPMLIB_MainInit(3), TPMLIB_Terminate(3), TPMLIB_RegisterCallbacks(3), TPM-
     LIB_Process(3)

libtpms 			   2026-01-02		    TPM_IO_Hash_Start(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=TPM_IO_Hash_Start&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help