/external/ms-tpm-20-ref/TPMCmd/tpm/src/crypt/ |
D | CryptHash.c | 317 PHASH_STATE hashState, // IN: the hash state in HashEnd() argument 323 if((hashState->hashAlg == TPM_ALG_NULL) in HashEnd() 324 || (hashState->type != HASH_STATE_HASH)) in HashEnd() 328 hashState->def = CryptGetHashDef(hashState->hashAlg); in HashEnd() 330 dOutSize = MIN(dOutSize, hashState->def->digestSize); in HashEnd() 332 HASH_END(hashState, temp); in HashEnd() 338 hashState->type = HASH_STATE_EMPTY; in HashEnd() 359 PHASH_STATE hashState, // OUT: the running hash state in CryptHashStart() argument 367 hashState->hashAlg = hashAlg; in CryptHashStart() 374 hashState->def = CryptGetHashDef(hashAlg); in CryptHashStart() [all …]
|
D | Ticket.c | 109 CryptDigestUpdate2B(&hmacState.hashState, &digest->b); in TicketComputeVerified() 111 CryptDigestUpdate2B(&hmacState.hashState, &keyName->b); in TicketComputeVerified() 165 CryptDigestUpdate2B(&hmacState.hashState, &cpHashA->b); in TicketComputeAuth() 167 CryptDigestUpdate2B(&hmacState.hashState, &policyRef->b); in TicketComputeAuth() 169 CryptDigestUpdate2B(&hmacState.hashState, &entityName->b); in TicketComputeAuth() 175 CryptDigestUpdateInt(&hmacState.hashState, sizeof(CLOCK_NONCE), in TicketComputeAuth() 179 CryptDigestUpdateInt(&hmacState.hashState, sizeof(gp.totalResetCount), in TicketComputeAuth() 226 CryptDigestUpdate2B(&hmacState.hashState, &digest->b); in TicketComputeHashCheck() 270 CryptDigestUpdate2B(&hmacState.hashState, &name->b); in TicketComputeCreation() 272 CryptDigestUpdate2B(&hmacState.hashState, &creation->b); in TicketComputeCreation()
|
D | CryptEccCrypt.c | 97 HASH_STATE hashState; in CryptEccEncrypt() local 128 if (0 == CryptHashStart(&hashState, scheme->details.mgf1.hashAlg)) in CryptEccEncrypt() 130 CryptDigestUpdate2B(&hashState, &p2.x.b); in CryptEccEncrypt() 131 CryptDigestUpdate2B(&hashState, &plainText->b); in CryptEccEncrypt() 132 CryptDigestUpdate2B(&hashState, &p2.y.b); in CryptEccEncrypt() 133 c3->t.size = CryptHashEnd(&hashState, sizeof(c3->t.buffer), c3->t.buffer); in CryptEccEncrypt() 175 HASH_STATE hashState; in CryptEccDecrypt() local 187 if (0 == CryptHashStart(&hashState, scheme->details.mgf1.hashAlg)) in CryptEccDecrypt() 189 CryptDigestUpdate2B(&hashState, &p2.x.b); in CryptEccDecrypt() 203 CryptDigestUpdate2B(&hashState, &plainText->b); in CryptEccDecrypt() [all …]
|
D | CryptSmac.c | 97 return CryptSmacStart(&state->hashState, keyParameters, macAlg, key); in CryptMacStart() 113 if(state->hashState.type == HASH_STATE_SMAC) in CryptMacEnd() 114 retVal = (state->hashState.state.smac.smacMethods.end)( in CryptMacEnd() 115 &state->hashState.state.smac.state, size, buffer); in CryptMacEnd() 116 else if(state->hashState.type == HASH_STATE_HMAC) in CryptMacEnd() 118 state->hashState.type = HASH_STATE_EMPTY; in CryptMacEnd()
|
/external/ms-tpm-20-ref/TPMCmd/tpm/src/command/AttachedComponent/ |
D | Policy_AC_SendSelect.c | 52 HASH_STATE hashState; in TPM2_Policy_AC_SendSelect() local 68 session->u1.cpHash.t.size = CryptHashStart(&hashState, session->authHashAlg); in TPM2_Policy_AC_SendSelect() 71 CryptDigestUpdate2B(&hashState, &in->objectName.b); in TPM2_Policy_AC_SendSelect() 74 CryptDigestUpdate2B(&hashState, &in->authHandleName.b); in TPM2_Policy_AC_SendSelect() 77 CryptDigestUpdate2B(&hashState, &in->acName.b); in TPM2_Policy_AC_SendSelect() 80 CryptHashEnd2B(&hashState, &session->u1.cpHash.b); in TPM2_Policy_AC_SendSelect() 86 = CryptHashStart(&hashState, session->authHashAlg); in TPM2_Policy_AC_SendSelect() 88 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_Policy_AC_SendSelect() 91 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_Policy_AC_SendSelect() 95 CryptDigestUpdate2B(&hashState, &in->objectName.b); in TPM2_Policy_AC_SendSelect() [all …]
|
/external/ms-tpm-20-ref/TPMCmd/tpm/src/command/EA/ |
D | PolicyDuplicationSelect.c | 53 HASH_STATE hashState; in TPM2_PolicyDuplicationSelect() local 72 session->u1.cpHash.t.size = CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyDuplicationSelect() 75 CryptDigestUpdate2B(&hashState, &in->objectName.b); in TPM2_PolicyDuplicationSelect() 78 CryptDigestUpdate2B(&hashState, &in->newParentName.b); in TPM2_PolicyDuplicationSelect() 81 CryptHashEnd2B(&hashState, &session->u1.cpHash.b); in TPM2_PolicyDuplicationSelect() 87 = CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyDuplicationSelect() 89 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyDuplicationSelect() 92 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyDuplicationSelect() 96 CryptDigestUpdate2B(&hashState, &in->objectName.b); in TPM2_PolicyDuplicationSelect() 99 CryptDigestUpdate2B(&hashState, &in->newParentName.b); in TPM2_PolicyDuplicationSelect() [all …]
|
D | PolicyCounterTimer.c | 61 HASH_STATE hashState; in TPM2_PolicyCounterTimer() local 100 argHash.t.size = CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyCounterTimer() 102 CryptDigestUpdate2B(&hashState, &in->operandB.b); in TPM2_PolicyCounterTimer() 104 CryptDigestUpdateInt(&hashState, sizeof(UINT16), in->offset); in TPM2_PolicyCounterTimer() 106 CryptDigestUpdateInt(&hashState, sizeof(TPM_EO), in->operation); in TPM2_PolicyCounterTimer() 108 CryptHashEnd2B(&hashState, &argHash.b); in TPM2_PolicyCounterTimer() 112 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyCounterTimer() 115 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyCounterTimer() 118 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyCounterTimer() 121 CryptDigestUpdate2B(&hashState, &argHash.b); in TPM2_PolicyCounterTimer() [all …]
|
D | PolicyNV.c | 65 HASH_STATE hashState; in TPM2_PolicyNV() local 107 argHash.t.size = CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyNV() 110 CryptDigestUpdate2B(&hashState, &in->operandB.b); in TPM2_PolicyNV() 113 CryptDigestUpdateInt(&hashState, sizeof(UINT16), in->offset); in TPM2_PolicyNV() 116 CryptDigestUpdateInt(&hashState, sizeof(TPM_EO), in->operation); in TPM2_PolicyNV() 119 CryptHashEnd2B(&hashState, &argHash.b); in TPM2_PolicyNV() 123 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyNV() 126 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyNV() 129 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyNV() 132 CryptDigestUpdate2B(&hashState, &argHash.b); in TPM2_PolicyNV() [all …]
|
D | PolicyPCR.c | 59 HASH_STATE hashState; in TPM2_PolicyPCR() local 97 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyPCR() 100 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPCR() 103 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyPCR() 108 CryptDigestUpdate(&hashState, pcrSize, pcrs); in TPM2_PolicyPCR() 111 CryptDigestUpdate2B(&hashState, &pcrDigest.b); in TPM2_PolicyPCR() 114 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPCR()
|
D | PolicyCommandCode.c | 54 HASH_STATE hashState; in TPM2_PolicyCommandCode() local 70 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyCommandCode() 73 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyCommandCode() 76 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyCommandCode() 79 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), in->code); in TPM2_PolicyCommandCode() 82 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyCommandCode()
|
D | PolicyNvWritten.c | 52 HASH_STATE hashState; in TPM2_PolicyNvWritten() local 78 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyNvWritten() 81 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyNvWritten() 84 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyNvWritten() 87 CryptDigestUpdateInt(&hashState, sizeof(TPMI_YES_NO), in->writtenSet); in TPM2_PolicyNvWritten() 90 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyNvWritten()
|
D | PolicyNameHash.c | 54 HASH_STATE hashState; in TPM2_PolicyNameHash() local 79 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyNameHash() 82 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyNameHash() 85 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyNameHash() 88 CryptDigestUpdate2B(&hashState, &in->nameHash.b); in TPM2_PolicyNameHash() 91 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyNameHash()
|
D | Policy_spt.c | 110 HASH_STATE hashState; in PolicyContextUpdate() local 113 CryptHashStart(&hashState, session->authHashAlg); in PolicyContextUpdate() 121 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in PolicyContextUpdate() 124 CryptDigestUpdateInt(&hashState, sizeof(commandCode), commandCode); in PolicyContextUpdate() 128 CryptDigestUpdate2B(&hashState, &name->b); in PolicyContextUpdate() 131 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in PolicyContextUpdate() 138 CryptHashStart(&hashState, session->authHashAlg); in PolicyContextUpdate() 141 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in PolicyContextUpdate() 144 CryptDigestUpdate2B(&hashState, &ref->b); in PolicyContextUpdate() 147 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in PolicyContextUpdate()
|
D | PolicyTemplate.c | 56 HASH_STATE hashState; in TPM2_PolicyTemplate() local 82 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyTemplate() 85 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyTemplate() 88 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyTemplate() 91 CryptDigestUpdate2B(&hashState, &in->templateHash.b); in TPM2_PolicyTemplate() 94 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyTemplate()
|
D | PolicyCpHash.c | 56 HASH_STATE hashState; in TPM2_PolicyCpHash() local 82 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyCpHash() 85 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyCpHash() 88 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyCpHash() 91 CryptDigestUpdate2B(&hashState, &in->cpHashA.b); in TPM2_PolicyCpHash() 94 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyCpHash()
|
D | PolicyOR.c | 69 HASH_STATE hashState; in TPM2_PolicyOR() local 74 = CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyOR() 78 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyOR() 81 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyOR() 87 CryptDigestUpdate2B(&hashState, &in->pHashList.digests[i].b); in TPM2_PolicyOR() 90 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyOR()
|
D | PolicyPhysicalPresence.c | 51 HASH_STATE hashState; in TPM2_PolicyPhysicalPresence() local 61 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyPhysicalPresence() 64 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPhysicalPresence() 67 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyPhysicalPresence() 70 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPhysicalPresence()
|
D | PolicyLocality.c | 56 HASH_STATE hashState; in TPM2_PolicyLocality() local 115 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyLocality() 118 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyLocality() 121 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyLocality() 124 CryptDigestUpdate(&hashState, marshalSize, marshalBuffer); in TPM2_PolicyLocality() 127 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyLocality()
|
D | PolicyPassword.c | 53 HASH_STATE hashState; in TPM2_PolicyPassword() local 63 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyPassword() 66 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPassword() 69 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyPassword() 72 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyPassword()
|
D | PolicyAuthValue.c | 53 HASH_STATE hashState; in TPM2_PolicyAuthValue() local 63 CryptHashStart(&hashState, session->authHashAlg); in TPM2_PolicyAuthValue() 66 CryptDigestUpdate2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyAuthValue() 69 CryptDigestUpdateInt(&hashState, sizeof(TPM_CC), commandCode); in TPM2_PolicyAuthValue() 72 CryptHashEnd2B(&hashState, &session->u2.policyDigest.b); in TPM2_PolicyAuthValue()
|
D | PolicySigned.c | 64 HASH_STATE hashState; in TPM2_PolicySigned() local 102 authHash.t.size = CryptHashStart(&hashState, in TPM2_PolicySigned() 111 CryptDigestUpdate2B(&hashState, &in->nonceTPM.b); in TPM2_PolicySigned() 114 CryptDigestUpdateInt(&hashState, sizeof(UINT32), in->expiration); in TPM2_PolicySigned() 117 CryptDigestUpdate2B(&hashState, &in->cpHashA.b); in TPM2_PolicySigned() 120 CryptDigestUpdate2B(&hashState, &in->policyRef.b); in TPM2_PolicySigned() 123 CryptHashEnd2B(&hashState, &authHash.b); in TPM2_PolicySigned()
|
D | PolicyAuthorize.c | 58 HASH_STATE hashState; in TPM2_PolicyAuthorize() local 93 authHash.t.size = CryptHashStart(&hashState, hashAlg); in TPM2_PolicyAuthorize() 96 CryptDigestUpdate2B(&hashState, &in->approvedPolicy.b); in TPM2_PolicyAuthorize() 99 CryptDigestUpdate2B(&hashState, &in->policyRef.b); in TPM2_PolicyAuthorize() 102 CryptHashEnd2B(&hashState, &authHash.b); in TPM2_PolicyAuthorize()
|
/external/ms-tpm-20-ref/TPMCmd/tpm/include/Ltc/ |
D | TpmToLtcHash.h | 83 #define HASH_START(hashState) \ argument 84 ((hashState)->def->method.start)(&(hashState)->state) 91 #define HASH_DATA(hashState, dInSize, dIn) \ argument 92 ((hashState)->def->method.data)(&(hashState)->state, dIn, dInSize) 99 #define HASH_END(hashState, buffer) \ argument 100 ((hashState)->def->method.end)(&(hashState)->state, buffer)
|
/external/ms-tpm-20-ref/TPMCmd/tpm/include/Wolf/ |
D | TpmToWolfHash.h | 109 #define HASH_START(hashState) \ argument 110 ((hashState)->def->method.start)(&(hashState)->state); 117 #define HASH_DATA(hashState, dInSize, dIn) \ argument 118 ((hashState)->def->method.data)(&(hashState)->state, dIn, dInSize) 123 #define HASH_END(hashState, buffer) \ argument 124 ((hashState)->def->method.end)(&(hashState)->state, buffer)
|
/external/ms-tpm-20-ref/TPMCmd/tpm/include/Ossl/ |
D | TpmToOsslHash.h | 115 #define HASH_START(hashState) \ argument 116 ((hashState)->def->method.start)(&(hashState)->state); 123 #define HASH_DATA(hashState, dInSize, dIn) \ argument 124 ((hashState)->def->method.data)(&(hashState)->state, dIn, dInSize) 129 #define HASH_END(hashState, buffer) \ argument 130 ((hashState)->def->method.end)(buffer, &(hashState)->state)
|