This won't work because the SRK cannot decrypt.

What you should do is create a new TPM key of type legacy. Read its
modulus and exponent and set them into the n and e fields of an
OpenSSL RSA object. Then there is an OpenSSL call to write the RSA
object in PEM format.

Hal Finney

On Monday, November 22, 2010, Evgeny Bronnikov <[email protected]> wrote:
> Hello!
>
> I'm trying to save SRK in PEM format, but still unsuccessfull.  Here is my 
> code:
>
> BYTE* srk_buf = NULL;
> UINT32 srk_buf_len = 0;
> result = Tspi_TPM_OwnerGetSRKPubKey(hTPM, &srk_buf_len, &srk_buf);
> //srk_buf contains some 284 bytes data
>
> TCPA_PUBKEY srk_pub;
> memset(&srk_pub, 0, sizeof(TCPA_PUBKEY));
> UINT64 offset = 0;
> Trspi_LoadBlob_PUBKEY(&offset, srk_buf, &srk_pub);
> // here I have empty srk_pub. all fields of TCPA_PUBKEY are zero
>
>
> Is it possible to save SRK public to PEM format? I want to use this
> public key to encrypt some data on the remote server, and then decrypt
> this data by TPM on local machine.
> I'm not shure if SRK public is accessable outside the TPM. If not,
> please suggest how to create RSA key inside TPM and export its public
> part as PEM: just a "BEGIN PUBLIC KEY", but not  "BEGIN TSS KEY BLOB".
>
> Thank you very much in advance.
> Evgeny
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> TrouSerS-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/trousers-users
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users

Reply via email to