Okay, I figured out this one. Had to wrap the data into TPM_BOUND_DATA structure and use a custom padding.
----- Original Message ----- > From: "Dmitri Toubelis" <[email protected]> > To: [email protected] > Sent: Monday, March 25, 2013 8:22:32 PM > Subject: [TrouSerS-users] Tspi_Data_Unbind() fails with third party > encryption > > Hi, > > I'm trying to use TSS in the following way: > > - generate a bind key within a TPM > - extract public modulus and exponent > - encrypt about 40 bytes of data with OpenSSL using: (a) identical > encryption scheme/padding, (b) modulus and exponent from the step > above. > - then use Tspi_Data_Unbind() to decrypt the resulting blob with > private key stored in TPM. > > The decryption fails with code 0x21 (TPM_E_DECRYPT_ERROR: The > decryption process did not complete.) > > The process works fine if I encrypt data using Tspi_Data_Bind(). The > need for this use case is remote authentication of client device to > an authorization server that doesn't have TPM and rather uses HSM > for cryptographic operations. My question is if this is possible? Is > it the right way to do it? What am I doing it wrong? > > Regards, > Dmitri > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > TrouSerS-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/trousers-users > ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ TrouSerS-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-users
