Hi,
I'm trying to create a program to authenticate a TPM. One TPM call the
method Quote and sends the result, which pcrs have been quote and the value
of these pcrs to a challenging party.
I'm trying to validate the TCPA_QUOTE_INFO structure returned. It is
composed of a serialized TCPA_PCR_COMPOSITE structure that is hash.
In my example I want to quote only PCR0. Could you tell me what is wrong in
my program ?
connect_load_all(&hContext, &hSRK,&hTPM);
result = Tspi_TPM_PcrRead(hTPM,0,&pcrLength,&pcrValue);
BYTE pcrComp [29];
// 2bytes for the number of PCRs
pcrComp[0] = 0;
pcrComp[1] = 3;
//3 bytes (number of PCRs bits) for the map, here select pcr 0
pcrComp[2] = 1<<7;
pcrComp[3] = 0;
pcrComp[4] = 0;
//4bytes for the length of PCR data ( 20*number of PCRs signed)
pcrComp[5] = 0;
pcrComp[6] = 0;
pcrComp[7] = 0;
pcrComp[8] = 20;
//PCR data in the right order
for(i=0;i<pcrLength;i++){
pcrComp[9 + i] = pcrValue[i];
}
digest = (BYTE*) malloc (20 * sizeof(BYTE));
result = TestSuite_Hash(TSS_HASH_SHA1,29,pcrComp,digest);
Thanks,
Chloé
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users