Hello. my name is Donald Small and I am doing research at Johns Hopkins
University This summer. I am currently working with the TPM and having a
few difficulties.

I have a system based on the XEN hypervisor in which Dom0 works as a
trusted forwarder. One or more virtual machines contact Dom0 which signs
messages with the TPM and sends out to other clients on the network.

The problem I am facing is I want to use a custom hash function that can be
shared between the virtual machines and Dom0 because the virtual machines
have no access to the TPM. I have been following the documentation created
by IBM called "A Practical Guide to Trusted Computing" and I have installed
Trouser software and tpm-tools for Ubuntu 12.04.

After running the following code I get a TSS_E_BAD_PARAMETER error, "Error
in Tspi_Hash_Sign: One or more parameter is bad".

        BYTE *digest = "b2cad21e87dbd57f1a1928e4013b56fb553bb82a";
        UINT32  digestLen =  sizeof(digest);

/* Create a hash object as type other */
        result = Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_HASH,
TSS_HASH_OTHER, &hHash);

/* Set the hash value */
        result = Tspi_Hash_SetHashValue(hHash, digestLen,digest);

/* Sign the hash */
        result = Tspi_Hash_Sign(hHash, hKey, &signatureLen, &signature);


I also tried the approach to set the OID of the hash function and still had
the same error. I am attempting to use the md5 hash algorithm.


BYTE   *oid = "1.2.840.113549.2.5"; //md5
        UINT32  idLen = sizeof(oid);

/* Set the hash algorithm type */
        Tspi_SetAttribData(hHash, TSS_TSPATTRIB_ALG_IDENTIFIER, 0, oidLen,
oid);
        print_error(result, "Tspi_SetAttribData");


I would greatly appreciate if you could advise me to where I may be having
a problem.

Thank you in advance. Best Regards,

Donald Small Jr.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users

Reply via email to