123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 |
- .TH "esys_int" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- esys_int
- .SH SYNOPSIS
- .br
- .PP
- .SS "Data Structures"
- .in +1c
- .ti -1c
- .RI "struct \fBRSRC_NODE_T\fP"
- .br
- .ti -1c
- .RI "struct \fBESYS_CONTEXT\fP"
- .br
- .ti -1c
- .RI "struct \fBIESYS_SESSION\fP"
- .br
- .ti -1c
- .RI "union \fBIESYS_RSRC_UNION\fP"
- .br
- .ti -1c
- .RI "struct \fBIESYS_RESOURCE\fP"
- .br
- .ti -1c
- .RI "struct \fBIESYS_METADATA\fP"
- .br
- .ti -1c
- .RI "struct \fBIESYS_CONTEXT_DATA\fP"
- .br
- .in -1c
- .SS "Macros"
- .in +1c
- .ti -1c
- .RI "#define \fB_ESYS_MAX_SUBMISSIONS\fP 5"
- .br
- .ti -1c
- .RI "#define \fB_ESYS_ASSERT_NON_NULL\fP(x)"
- .br
- .ti -1c
- .RI "#define \fBIESYSC_KEY_RSRC\fP 1"
- .br
- .ti -1c
- .RI "#define \fBIESYSC_NV_RSRC\fP 2"
- .br
- .ti -1c
- .RI "#define \fBIESYSC_SESSION_RSRC\fP 3"
- .br
- .ti -1c
- .RI "#define \fBIESYSC_WITHOUT_MISC_RSRC\fP 0"
- .br
- .ti -1c
- .RI "#define \fBENCRYPT\fP 1"
- .br
- .ti -1c
- .RI "#define \fBNO_ENCRYPT\fP 0"
- .br
- .ti -1c
- .RI "#define \fBDECRYPT\fP 1"
- .br
- .ti -1c
- .RI "#define \fBNO_DECRYPT\fP 0"
- .br
- .ti -1c
- .RI "#define \fBPOLICY_PASSWORD\fP 2"
- .br
- .ti -1c
- .RI "#define \fBPOLICY_AUTH\fP 1"
- .br
- .ti -1c
- .RI "#define \fBNO_POLICY_AUTH\fP 0"
- .br
- .in -1c
- .SS "Typedefs"
- .in +1c
- .ti -1c
- .RI "typedef struct \fBRSRC_NODE_T\fP \fBRSRC_NODE_T\fP"
- .br
- .ti -1c
- .RI "typedef UINT32 \fBIESYSC_RESOURCE_TYPE_CONSTANT\fP"
- .br
- .ti -1c
- .RI "typedef UINT32 \fBIESYSC_PARAM_ENCRYPT\fP"
- .br
- .ti -1c
- .RI "typedef UINT32 \fBIESYSC_PARAM_DECRYPT\fP"
- .br
- .ti -1c
- .RI "typedef UINT32 \fBIESYSC_TYPE_POLICY_AUTH\fP"
- .br
- .ti -1c
- .RI "typedef UINT32 \fBIESYSC_RESOURCE_TYPE\fP"
- .br
- .in -1c
- .SS "Enumerations"
- .in +1c
- .ti -1c
- .RI "enum \fB_ESYS_STATE\fP { \fB_ESYS_STATE_INIT\fP = 0, \fB_ESYS_STATE_SENT\fP, \fB_ESYS_STATE_RESUBMISSION\fP, \fB_ESYS_STATE_INTERNALERROR\fP }"
- .br
- .in -1c
- .SH "Detailed Description"
- .PP
- The ESAPI implementation requires a set of internal type definitions\&.
- .SH "Data Structure Documentation"
- .PP
- .SH "struct RSRC_NODE_T"
- .PP
- Linked list type for object meta data\&.
- .PP
- This structure represents a linked list to store meta data information of type \fBIESYS_RESOURCE\fP\&.
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "\fBESYS_TR\fP \fBesys_handle\fP"
- .br
- .ti -1c
- .RI "TPM2B_AUTH \fBauth\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_RESOURCE\fP \fBrsrc\fP"
- .br
- .ti -1c
- .RI "struct \fBRSRC_NODE_T\fP * \fBnext\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "TPM2B_AUTH auth"
- The authValue for this resource object\&.
- .SS "\fBESYS_TR\fP esys_handle"
- The ESYS_TR handle used by the application to reference this entry\&.
- .SS "struct \fBRSRC_NODE_T\fP* next"
- The next object in the linked list\&.
- .SS "\fBIESYS_RESOURCE\fP rsrc"
- The meta data for this resource object\&.
- .SH "struct ESYS_CONTEXT"
- .PP
- The data structure holding internal state information\&.
- .PP
- Each \fBESYS_CONTEXT\fP respresents a logically independent connection to the TPM\&. It stores meta data information about object in order to calculate session auths and similar things\&.
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "enum \fB_ESYS_STATE\fP \fBstate\fP"
- .br
- .ti -1c
- .RI "TSS2_SYS_CONTEXT * \fBsys\fP"
- .br
- .ti -1c
- .RI "\fBESYS_TR\fP \fBesys_handle_cnt\fP"
- .br
- .ti -1c
- .RI "\fBRSRC_NODE_T\fP * \fBrsrc_list\fP"
- .br
- .ti -1c
- .RI "int32_t \fBtimeout\fP"
- .br
- .ti -1c
- .RI "\fBESYS_TR\fP \fBsession_type\fP [3]"
- .br
- .ti -1c
- .RI "\fBRSRC_NODE_T\fP * \fBsession_tab\fP [3]"
- .br
- .ti -1c
- .RI "int \fBencryptNonceIdx\fP"
- .br
- .ti -1c
- .RI "TPM2B_NONCE * \fBencryptNonce\fP"
- .br
- .ti -1c
- .RI "int \fBauthsCount\fP"
- .br
- .ti -1c
- .RI "int \fBsubmissionCount\fP"
- .br
- .ti -1c
- .RI "TPM2B_DATA \fBsalt\fP"
- .br
- .ti -1c
- .RI "IESYS_CMD_IN_PARAM \fBin\fP"
- .br
- .ti -1c
- .RI "\fBESYS_TR\fP \fBesys_handle\fP"
- .br
- .ti -1c
- .RI "TSS2_TCTI_CONTEXT * \fBtcti_app_param\fP"
- .br
- .ti -1c
- .RI "void * \fBdlhandle\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_SESSION\fP * \fBenc_session\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "int authsCount"
- The number of session provided during the command\&.
- .SS "void* dlhandle"
- The handle of dlopen if the tcti was automatically loaded\&.
- .SS "\fBIESYS_SESSION\fP* enc_session"
- Ptr to the enc param session\&. Used to restore session attributes
- .SS "TPM2B_NONCE* encryptNonce"
- The nonce of the encrypt session, or NULL if no encrypt session exists\&.
- .SS "int encryptNonceIdx"
- The index of the encrypt session\&.
- .SS "\fBESYS_TR\fP esys_handle"
- Temporary storage for the object's TPM handle during Esys_TR_FromTPMPublic\&.
- .SS "\fBESYS_TR\fP esys_handle_cnt"
- The next free ESYS_TR number\&.
- .SS "IESYS_CMD_IN_PARAM in"
- Temporary storage for Input parameters needed in corresponding _Finish function
- .SS "\fBRSRC_NODE_T\fP* rsrc_list"
- The linked list of all ESYS_TR objects\&.
- .SS "TPM2B_DATA salt"
- The salt used during a StartAuthSession\&.
- .SS "\fBRSRC_NODE_T\fP* session_tab[3]"
- The list of TPM session meta data in the current command execution\&.
- .SS "\fBESYS_TR\fP session_type[3]"
- The list of TPM session handles in the current command execution\&.
- .SS "enum \fB_ESYS_STATE\fP state"
- The current state of the ESAPI context\&.
- .SS "int submissionCount"
- The current number of submissions of this command to the TPM\&.
- .SS "TSS2_SYS_CONTEXT* sys"
- The SYS context used internally to talk to the TPM\&.
- .SS "TSS2_TCTI_CONTEXT* tcti_app_param"
- The TCTI context provided by the application during \fBEsys_Initialize()\fP to be returned from \fBEsys_GetTcti()\fP\&.
- .SS "int32_t timeout"
- The timeout to be used during Tss2_Sys_ExecuteFinish\&.
- .SH "struct IESYS_SESSION"
- .PP
- Type for representing TPM-Session
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "TPM2B_NAME \fBbound_entity\fP"
- .br
- .ti -1c
- .RI "TPM2B_ENCRYPTED_SECRET \fBencryptedSalt\fP"
- .br
- .ti -1c
- .RI "TPM2B_DATA \fBsalt\fP"
- .br
- .ti -1c
- .RI "TPMT_SYM_DEF \fBsymmetric\fP"
- .br
- .ti -1c
- .RI "TPMI_ALG_HASH \fBauthHash\fP"
- .br
- .ti -1c
- .RI "TPM2B_DIGEST \fBsessionKey\fP"
- .br
- .ti -1c
- .RI "TPM2_SE \fBsessionType\fP"
- .br
- .ti -1c
- .RI "TPMA_SESSION \fBsessionAttributes\fP"
- .br
- .ti -1c
- .RI "TPMA_SESSION \fBorigSessionAttributes\fP"
- .br
- .ti -1c
- .RI "TPM2B_NONCE \fBnonceCaller\fP"
- .br
- .ti -1c
- .RI "TPM2B_NONCE \fBnonceTPM\fP"
- .br
- .ti -1c
- .RI "\fBIESYSC_PARAM_ENCRYPT\fP \fBencrypt\fP"
- .br
- .ti -1c
- .RI "\fBIESYSC_PARAM_DECRYPT\fP \fBdecrypt\fP"
- .br
- .ti -1c
- .RI "\fBIESYSC_TYPE_POLICY_AUTH\fP \fBtype_policy_session\fP"
- .br
- .ti -1c
- .RI "UINT16 \fBsizeSessionValue\fP"
- .br
- .ti -1c
- .RI "BYTE \fBsessionValue\fP [2 *sizeof(TPMU_HA)]"
- .br
- .ti -1c
- .RI "UINT16 \fBsizeHmacValue\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "TPMI_ALG_HASH authHash"
- Hashalg used for authorization
- .SS "TPM2B_NAME bound_entity"
- Entity to which the session is bound
- .SS "\fBIESYSC_PARAM_DECRYPT\fP decrypt"
- Indicate parameter decryption by the TPM
- .SS "\fBIESYSC_PARAM_ENCRYPT\fP encrypt"
- Indicate parameter encryption by the TPM
- .SS "TPM2B_ENCRYPTED_SECRET encryptedSalt"
- Encrypted salt which can be provided by application
- .SS "TPM2B_NONCE nonceCaller"
- Nonce computed by the ESAPI for every session call
- .SS "TPM2B_NONCE nonceTPM"
- Nonce which is returned by the TPM for every session call
- .SS "TPMA_SESSION origSessionAttributes"
- Copy of flags which define the session behaviour
- .SS "TPM2B_DATA salt"
- Salt computed if no encrypted salt is provided
- .SS "TPMA_SESSION sessionAttributes"
- Flags which define the session behaviour
- .SS "TPM2B_DIGEST sessionKey"
- sessionKey used for KDFa to compute symKey
- .SS "TPM2_SE sessionType"
- Type of the session (HMAC, Policy)
- .SS "BYTE sessionValue[2 *sizeof(TPMU_HA)]"
- sessionKey || AuthValue
- .SS "UINT16 sizeHmacValue"
- Size of sessionKey plus optionally authValue
- .SS "UINT16 sizeSessionValue"
- Size of sessionKey plus optionally authValue
- .SS "TPMT_SYM_DEF symmetric"
- Algorithm selection for parameter encryption
- .SS "\fBIESYSC_TYPE_POLICY_AUTH\fP type_policy_session"
- Field to store markers for policy sessions
- .SH "union IESYS_RSRC_UNION"
- .PP
- Type for representing public info of a TPM-Resource
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "TPM2B_PUBLIC \fBrsrc_key_pub\fP"
- .br
- .ti -1c
- .RI "TPM2B_NV_PUBLIC \fBrsrc_nv_pub\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_SESSION\fP \fBrsrc_session\fP"
- .br
- .ti -1c
- .RI "TPMS_EMPTY \fBrsrc_empty\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "TPMS_EMPTY rsrc_empty"
- no specialized date for resource
- .SS "TPM2B_PUBLIC rsrc_key_pub"
- Public info for key objects
- .SS "TPM2B_NV_PUBLIC rsrc_nv_pub"
- Public info for NV ram objects
- .SS "\fBIESYS_SESSION\fP rsrc_session"
- Internal esapi session information
- .SH "struct IESYS_RESOURCE"
- .PP
- Type for representing TPM-Resource
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "TPM2_HANDLE \fBhandle\fP"
- .br
- .ti -1c
- .RI "TPM2B_NAME \fBname\fP"
- .br
- .ti -1c
- .RI "\fBIESYSC_RESOURCE_TYPE\fP \fBrsrcType\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_RSRC_UNION\fP \fBmisc\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "TPM2_HANDLE handle"
- Handle used by TPM
- .SS "\fBIESYS_RSRC_UNION\fP misc"
- Resource specific information
- .SS "TPM2B_NAME name"
- TPM name of the object
- .SS "\fBIESYSC_RESOURCE_TYPE\fP rsrcType"
- Selector for resource type
- .SH "struct IESYS_METADATA"
- .PP
- Esys resource with size field
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "UINT16 \fBsize\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_RESOURCE\fP \fBdata\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "\fBIESYS_RESOURCE\fP data"
- Esys resource data
- .SS "UINT16 size"
- size of the operand buffer
- .SH "struct IESYS_CONTEXT_DATA"
- .PP
- Type for representing ESYS metadata
- .PP
- .in -1c
- .RI "\fBData Fields\fP"
- .in +1c
- .in +1c
- .ti -1c
- .RI "UINT32 \fBreserved\fP"
- .br
- .ti -1c
- .RI "TPM2B_CONTEXT_DATA \fBtpmContext\fP"
- .br
- .ti -1c
- .RI "\fBIESYS_METADATA\fP \fBesysMetadata\fP"
- .br
- .in -1c
- .SH "Field Documentation"
- .PP
- .SS "\fBIESYS_METADATA\fP esysMetadata"
- Meta data of the ESY_TR object
- .SS "UINT32 reserved"
- Must allways be zero
- .SS "TPM2B_CONTEXT_DATA tpmContext"
- Context information computed by tpm
- .SH "Macro Definition Documentation"
- .PP
- .SS "#define _ESYS_ASSERT_NON_NULL(x)"
- \fBValue:\fP
- .PP
- .nf
- if (x == NULL) { \
- LOG_ERROR(str(x) " == NULL\&."); \
- return TSS2_ESYS_RC_BAD_REFERENCE; \
- }
- .fi
- Makro testing parameters against null\&.
- .SS "#define _ESYS_MAX_SUBMISSIONS 5"
- The number of authomatic resubmissions\&.
- .PP
- The number of resubmissions before a TPM's TPM2_RC_YIELDED is forwarded to the application\&.
- .SS "#define DECRYPT 1"
- Parameter decryption by TPM
- .SS "#define ENCRYPT 1"
- Parameter encryption by TPM
- .SS "#define IESYSC_KEY_RSRC 1"
- Tag for key resource
- .SS "#define IESYSC_NV_RSRC 2"
- Tag for NV Ram resource
- .SS "#define IESYSC_SESSION_RSRC 3"
- Tag for session resources
- .SS "#define IESYSC_WITHOUT_MISC_RSRC 0"
- Tag for other resources, e\&.g\&. PCR register, hierarchies
- .SS "#define NO_DECRYPT 0"
- No parameter decryption by TPM
- .SS "#define NO_ENCRYPT 0"
- No parameter encryption by TPM
- .SS "#define NO_POLICY_AUTH 0"
- no special handling
- .SS "#define POLICY_AUTH 1"
- Marker to include the auth value in the HMAC key
- .SS "#define POLICY_PASSWORD 2"
- Marker to include auth value of the authorized object
- .SH "Typedef Documentation"
- .PP
- .SS "\fBIESYSC_PARAM_DECRYPT\fP"
- Type to indicate parameter decryption (by TPM)
- .SS "\fBIESYSC_PARAM_ENCRYPT\fP"
- Type to indicate parameter encryption (by TPM)
- .SS "\fBIESYSC_RESOURCE_TYPE\fP"
- Selector type for esys resources
- .SS "\fBIESYSC_RESOURCE_TYPE_CONSTANT\fP"
- Type of resource
- .SS "\fBIESYSC_TYPE_POLICY_AUTH\fP"
- Type of policy authorization
- .SS "\fBRSRC_NODE_T\fP"
- Linked list type for object meta data\&.
- .PP
- This structure represents a linked list to store meta data information of type \fBIESYS_RESOURCE\fP\&.
- .SH "Enumeration Type Documentation"
- .PP
- .SS "enum \fB_ESYS_STATE\fP"
- The states for the ESAPI's internal state machine
- .SH "Author"
- .PP
- Generated automatically by Doxygen for tpm2-tss from the source code\&.
|