/external/tpm2/ |
D | CryptUtil.c | 695 TPMT_PUBLIC *publicArea, // IN/OUT: the public area template in CryptGenerateKeyedHash() argument 708 if(publicArea->nameAlg == TPM_ALG_NULL) in CryptGenerateKeyedHash() 712 scheme = &publicArea->parameters.keyedHashDetail.scheme; in CryptGenerateKeyedHash() 713 pAssert(publicArea->type == TPM_ALG_KEYEDHASH); in CryptGenerateKeyedHash() 716 hashAlg = publicArea->nameAlg; in CryptGenerateKeyedHash() 726 if(publicArea->objectAttributes.sensitiveDataOrigin == CLEAR) in CryptGenerateKeyedHash() 728 if( ( publicArea->objectAttributes.decrypt in CryptGenerateKeyedHash() 729 || publicArea->objectAttributes.sign) in CryptGenerateKeyedHash() 744 CryptComputeSymmetricUnique(publicArea->nameAlg, in CryptGenerateKeyedHash() 745 sensitive, &publicArea->unique.sym); in CryptGenerateKeyedHash() [all …]
|
D | Object_spt.c | 85 symAlg = protector->publicArea.parameters.asymDetail.symmetric.algorithm; in GetIV2BSize() 86 keyBits= protector->publicArea.parameters.asymDetail.symmetric.keyBits.sym; in GetIV2BSize() 129 symDef = &protector->publicArea.parameters.asymDetail.symmetric; in ComputeProtectionKeyParms() 312 if(ObjectDataIsStorage(&parentObject->publicArea)) in AreAttributesForParent() 347 TPMT_PUBLIC *publicArea // IN: public area of the object in SchemeChecks() argument 351 if(CryptIsAsymAlgorithm(publicArea->type)) in SchemeChecks() 354 keyScheme = &publicArea->parameters.asymDetail.scheme; in SchemeChecks() 357 if(!load && (publicArea->objectAttributes.sensitiveDataOrigin == CLEAR)) in SchemeChecks() 359 if(load && !CryptAreKeySizesConsistent(publicArea)) in SchemeChecks() 363 if( publicArea->objectAttributes.sign == SET in SchemeChecks() [all …]
|
D | LoadExternal.c | 48 if(in->inPublic.t.publicArea.authPolicy.t.size != 0 in TPM2_LoadExternal() 49 && in->inPublic.t.publicArea.authPolicy.t.size != in TPM2_LoadExternal() 50 CryptGetHashDigestSize(in->inPublic.t.publicArea.nameAlg)) in TPM2_LoadExternal() 62 if( in->inPublic.t.publicArea.objectAttributes.fixedTPM != CLEAR in TPM2_LoadExternal() 63 || in->inPublic.t.publicArea.objectAttributes.fixedParent != CLEAR in TPM2_LoadExternal() 64 || in->inPublic.t.publicArea.objectAttributes.restricted != CLEAR in TPM2_LoadExternal() 70 result = SchemeChecks(TRUE, TPM_RH_NULL, &in->inPublic.t.publicArea); in TPM2_LoadExternal() 76 ObjectComputeName(&in->inPublic.t.publicArea, &out->name); in TPM2_LoadExternal() 77 skipChecks = (in->inPublic.t.publicArea.nameAlg == TPM_ALG_NULL); in TPM2_LoadExternal() 87 result = ObjectLoad(in->hierarchy, &in->inPublic.t.publicArea, in TPM2_LoadExternal()
|
D | HMAC_Start.c | 27 TPMT_PUBLIC *publicArea; in TPM2_HMAC_Start() local 34 publicArea = &hmacObject->publicArea; in TPM2_HMAC_Start() 37 if(publicArea->type != TPM_ALG_KEYEDHASH) in TPM2_HMAC_Start() 41 if(publicArea->objectAttributes.restricted == SET) in TPM2_HMAC_Start() 45 if(publicArea->objectAttributes.sign != SET) in TPM2_HMAC_Start() 49 if(publicArea->parameters.keyedHashDetail.scheme.scheme == TPM_ALG_NULL) in TPM2_HMAC_Start() 56 = publicArea->parameters.keyedHashDetail.scheme.details.hmac.hashAlg; in TPM2_HMAC_Start()
|
D | Create.c | 72 if( (in->inPublic.t.publicArea.objectAttributes.sensitiveDataOrigin == SET) in TPM2_Create() 81 &in->inPublic.t.publicArea); in TPM2_Create() 87 > CryptGetHashDigestSize(in->inPublic.t.publicArea.nameAlg)) in TPM2_Create() 93 result = CryptCreateObject(in->parentHandle, &in->inPublic.t.publicArea, in TPM2_Create() 99 FillInCreationData(in->parentHandle, in->inPublic.t.publicArea.nameAlg, in TPM2_Create() 104 out->outPublic.t.publicArea = in->inPublic.t.publicArea; in TPM2_Create() 107 ObjectComputeName(&(out->outPublic.t.publicArea), &name); in TPM2_Create() 115 out->outPublic.t.publicArea.nameAlg, in TPM2_Create()
|
D | HMAC.c | 28 TPMT_PUBLIC *publicArea; in TPM2_HMAC() local 34 publicArea = &hmacObject->publicArea; in TPM2_HMAC() 37 if(publicArea->type != TPM_ALG_KEYEDHASH) in TPM2_HMAC() 41 if(publicArea->objectAttributes.restricted == SET) in TPM2_HMAC() 45 if(publicArea->objectAttributes.sign != SET) in TPM2_HMAC() 49 if(publicArea->parameters.keyedHashDetail.scheme.scheme == TPM_ALG_NULL) in TPM2_HMAC() 56 = publicArea->parameters.keyedHashDetail.scheme.details.hmac.hashAlg; in TPM2_HMAC()
|
D | Import.c | 86 if( in->objectPublic.t.publicArea.objectAttributes.fixedTPM == SET in TPM2_Import() 87 || in->objectPublic.t.publicArea.objectAttributes.fixedParent == SET) in TPM2_Import() 112 if(in->objectPublic.t.publicArea.objectAttributes.encryptedDuplication) in TPM2_Import() 133 if(in->objectPublic.t.publicArea.objectAttributes.encryptedDuplication) in TPM2_Import() 139 ObjectComputeName(&(in->objectPublic.t.publicArea), &name); in TPM2_Import() 144 in->objectPublic.t.publicArea.nameAlg, in TPM2_Import() 152 if(parentObject->publicArea.objectAttributes.fixedTPM == SET) in TPM2_Import() 161 &in->objectPublic.t.publicArea); in TPM2_Import() 167 result = ObjectLoad(TPM_RH_NULL, &in->objectPublic.t.publicArea, in TPM2_Import() 182 in->objectPublic.t.publicArea.nameAlg, in TPM2_Import()
|
D | NV.c | 909 attributes = nvIndex.publicArea.attributes; in NvEntityStartup() 935 memcpy(&publicAreaAttributesValue, &nvIndex.publicArea.attributes, in NvEntityStartup() 939 nvIndex.publicArea.attributes = attributes; in NvEntityStartup() 957 nvIndex.publicArea.attributes.TPMA_NV_ORDERLY = CLEAR; in NvEntityStartup() 959 nvIndex.publicArea.attributes.TPMA_NV_ORDERLY = SET; in NvEntityStartup() 1046 if(nvIndex.publicArea.attributes.TPMA_NV_PLATFORMCREATE == CLEAR) in NvIndexIsAccessible() 1065 if( nvIndex.publicArea.attributes.TPMA_NV_WRITELOCKED in NvIndexIsAccessible() 1074 if( nvIndex.publicArea.attributes.TPMA_NV_READLOCKED in NvIndexIsAccessible() 1134 result = TPMT_PUBLIC_Unmarshal(&o->publicArea, buf, size); in NvUnmarshalObject() 1268 if( nvIndex.publicArea.attributes.TPMA_NV_COUNTER == SET in NvInitialCounter() [all …]
|
D | ZGen_2Phase.c | 38 if(eccKey->publicArea.type != TPM_ALG_ECC) in TPM2_ZGen_2Phase() 42 if( eccKey->publicArea.objectAttributes.restricted == SET in TPM2_ZGen_2Phase() 43 || eccKey->publicArea.objectAttributes.decrypt != SET in TPM2_ZGen_2Phase() 49 scheme = eccKey->publicArea.parameters.asymDetail.scheme.scheme; in TPM2_ZGen_2Phase() 61 if(!CryptEccIsPointOnCurve(eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ZGen_2Phase() 65 if(!CryptEccIsPointOnCurve(eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ZGen_2Phase() 71 eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ZGen_2Phase() 79 eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ZGen_2Phase()
|
D | Object.c | 147 if(object->publicArea.nameAlg == TPM_ALG_NULL) in ObjectGetName() 166 return object->publicArea.nameAlg; in ObjectGetNameAlg() 186 if(object->publicArea.nameAlg == TPM_ALG_NULL) in ObjectGetQualifiedName() 295 TPMT_PUBLIC *publicArea, // IN: public area in ObjectLoad() argument 312 object->publicArea = *publicArea; in ObjectLoad() 319 if(!CryptObjectIsPublicConsistent(&object->publicArea)) in ObjectLoad() 358 if( publicArea->objectAttributes.stClear == SET in ObjectLoad() 364 ObjectComputeQualifiedName(&parentQN, publicArea->nameAlg, in ObjectLoad() 420 pAssert(&((*object)->auth) == &objectHash->publicArea.authPolicy); in AllocateSequenceSlot() 719 TPMT_PUBLIC *publicArea, // IN: public area of an object in ObjectComputeName() argument [all …]
|
D | CreatePrimary.c | 48 if( (in->inPublic.t.publicArea.objectAttributes.sensitiveDataOrigin == SET) in TPM2_CreatePrimary() 57 &in->inPublic.t.publicArea); in TPM2_CreatePrimary() 63 > CryptGetHashDigestSize(in->inPublic.t.publicArea.nameAlg)) in TPM2_CreatePrimary() 74 result = CryptCreateObject(in->primaryHandle, &in->inPublic.t.publicArea, in TPM2_CreatePrimary() 80 FillInCreationData(in->primaryHandle, in->inPublic.t.publicArea.nameAlg, in TPM2_CreatePrimary() 88 ObjectComputeName(&(out->outPublic.t.publicArea), &out->name); in TPM2_CreatePrimary() 96 result = ObjectLoad(in->primaryHandle, &in->inPublic.t.publicArea, &sensitive, in TPM2_CreatePrimary()
|
D | NV_Write.c | 45 if( nvIndex.publicArea.attributes.TPMA_NV_COUNTER == SET in TPM2_NV_Write() 46 || nvIndex.publicArea.attributes.TPMA_NV_BITS == SET in TPM2_NV_Write() 47 || nvIndex.publicArea.attributes.TPMA_NV_EXTEND == SET) in TPM2_NV_Write() 51 if((in->data.t.size + in->offset) > nvIndex.publicArea.dataSize) in TPM2_NV_Write() 56 if( nvIndex.publicArea.attributes.TPMA_NV_WRITEALL == SET in TPM2_NV_Write() 57 && in->data.t.size < nvIndex.publicArea.dataSize) in TPM2_NV_Write()
|
D | ECDH_ZGen.c | 35 if( eccKey->publicArea.type != TPM_ALG_ECC) in TPM2_ECDH_ZGen() 38 if( eccKey->publicArea.objectAttributes.restricted == SET in TPM2_ECDH_ZGen() 39 || eccKey->publicArea.objectAttributes.decrypt != SET in TPM2_ECDH_ZGen() 44 if( eccKey->publicArea.parameters.eccDetail.scheme.scheme != TPM_ALG_ECDH in TPM2_ECDH_ZGen() 45 && eccKey->publicArea.parameters.eccDetail.scheme.scheme != TPM_ALG_NULL) in TPM2_ECDH_ZGen() 52 eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ECDH_ZGen()
|
D | ECDH_KeyGen.c | 33 if( eccKey->publicArea.type != TPM_ALG_ECC) in TPM2_ECDH_KeyGen() 36 if( eccKey->publicArea.objectAttributes.restricted == SET in TPM2_ECDH_KeyGen() 37 || eccKey->publicArea.objectAttributes.decrypt != SET in TPM2_ECDH_KeyGen() 45 CryptNewEccKey(eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ECDH_KeyGen() 53 eccKey->publicArea.parameters.eccDetail.curveID, in TPM2_ECDH_KeyGen() 54 &sensitive, &eccKey->publicArea.unique.ecc); in TPM2_ECDH_KeyGen()
|
D | Load.c | 57 if(parentObject->publicArea.objectAttributes.fixedTPM) in TPM2_Load() 63 if(in->inPublic.t.publicArea.objectAttributes.fixedTPM == SET) in TPM2_Load() 71 &in->inPublic.t.publicArea); in TPM2_Load() 77 ObjectComputeName(&in->inPublic.t.publicArea, &out->name); in TPM2_Load() 83 in->inPublic.t.publicArea.nameAlg, in TPM2_Load() 96 result = ObjectLoad(hierarchy, &in->inPublic.t.publicArea, &sensitive, in TPM2_Load()
|
D | NV_Extend.c | 45 if(nvIndex.publicArea.attributes.TPMA_NV_EXTEND != SET) in TPM2_NV_Extend() 50 if( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == CLEAR in TPM2_NV_Extend() 51 || nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_Extend() 63 oldDigest.t.size = CryptGetHashDigestSize(nvIndex.publicArea.nameAlg); in TPM2_NV_Extend() 65 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == SET) in TPM2_NV_Extend() 75 newDigest.t.size = CryptStartHash(nvIndex.publicArea.nameAlg, &hashState); in TPM2_NV_Extend()
|
D | NV_spt.c | 48 if(! nvIndex.publicArea.attributes.TPMA_NV_OWNERREAD) in NvReadAccessChecks() 54 if(!nvIndex.publicArea.attributes.TPMA_NV_PPREAD) in NvReadAccessChecks() 64 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in NvReadAccessChecks() 106 if(! nvIndex.publicArea.attributes.TPMA_NV_OWNERWRITE) in NvWriteAccessChecks() 112 if(!nvIndex.publicArea.attributes.TPMA_NV_PPWRITE) in NvWriteAccessChecks()
|
D | EncryptDecrypt.c | 37 if( symKey->publicArea.type != TPM_ALG_SYMCIPHER in TPM2_EncryptDecrypt() 43 in->mode = symKey->publicArea.parameters.symDetail.sym.mode.sym; in TPM2_EncryptDecrypt() 47 if( symKey->publicArea.objectAttributes.restricted == SET in TPM2_EncryptDecrypt() 48 && symKey->publicArea.parameters.symDetail.sym.mode.sym != in->mode) in TPM2_EncryptDecrypt() 61 keySize = symKey->publicArea.parameters.symDetail.sym.keyBits.sym; in TPM2_EncryptDecrypt() 62 alg = symKey->publicArea.parameters.symDetail.sym.algorithm; in TPM2_EncryptDecrypt()
|
D | Unseal.c | 31 if(object->publicArea.type != TPM_ALG_KEYEDHASH) in TPM2_Unseal() 33 if( object->publicArea.objectAttributes.decrypt == SET in TPM2_Unseal() 34 || object->publicArea.objectAttributes.sign == SET in TPM2_Unseal() 35 || object->publicArea.objectAttributes.restricted == SET) in TPM2_Unseal()
|
D | NV_SetBits.c | 44 if(nvIndex.publicArea.attributes.TPMA_NV_BITS != SET) in TPM2_NV_SetBits() 48 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_SetBits() 59 if( ( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == CLEAR in TPM2_NV_SetBits() 61 || nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_SetBits()
|
D | MakeCredential.c | 38 if( !CryptIsAsymAlgorithm(object->publicArea.type) in TPM2_MakeCredential() 39 || object->publicArea.objectAttributes.decrypt == CLEAR in TPM2_MakeCredential() 40 || object->publicArea.objectAttributes.restricted == CLEAR in TPM2_MakeCredential() 46 if(in->credential.t.size > CryptGetHashDigestSize(object->publicArea.nameAlg)) in TPM2_MakeCredential()
|
D | Duplicate.c | 46 if(object->publicArea.objectAttributes.fixedParent == SET) in TPM2_Duplicate() 50 if(object->publicArea.nameAlg == TPM_ALG_NULL) in TPM2_Duplicate() 60 if(object->publicArea.objectAttributes.encryptedDuplication == SET) in TPM2_Duplicate() 111 object->publicArea.nameAlg, (TPM2B_SEED *) &data, in TPM2_Duplicate()
|
D | ReadPublic.c | 36 out->outPublic.t.size = TPMT_PUBLIC_Marshal(&object->publicArea, NULL, NULL); in TPM2_ReadPublic() 39 out->outPublic.t.publicArea = object->publicArea; in TPM2_ReadPublic()
|
D | NV_WriteLock.c | 48 if( nvIndex.publicArea.attributes.TPMA_NV_WRITEDEFINE == CLEAR in TPM2_NV_WriteLock() 49 && nvIndex.publicArea.attributes.TPMA_NV_WRITE_STCLEAR == CLEAR) in TPM2_NV_WriteLock() 64 nvIndex.publicArea.attributes.TPMA_NV_WRITELOCKED = SET; in TPM2_NV_WriteLock()
|
D | NV_Increment.c | 40 if(nvIndex.publicArea.attributes.TPMA_NV_COUNTER != SET) in TPM2_NV_Increment() 46 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_Increment() 58 if( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == SET in TPM2_NV_Increment()
|