Hi Ravi,

On Fri, Mar 22, 2013 at 5:54 AM, ravi kiran <[email protected]> wrote:
> Hi
>
> Thanks for your reply.I have looked at the data structures defined in TPM
> Spec Part 2.
> Is there any library available to pull out public and private keys from
> these data structures?
>
> It would be very helpful if you could point out me a sample code.

You can use this TSS call to get the rsa modulus:

        result = Tspi_GetAttribData(hKey,
                        TSS_TSPATTRIB_RSAKEY_INFO,
                        TSS_TSPATTRIB_KEYINFO_RSA_MODULUS,
                        &modLength, &modulus);

Full sample code can be found here:

http://trousers.git.sourceforge.net/git/gitweb.cgi?p=trousers/testsuite;a=blob;f=tcg/tspi/Tspi_GetAttribData12.c

Kent

>
> Date: Thu, 21 Mar 2013 09:50:50 -0400
> From: Ken Goldman <[email protected]>
> Subject: Re: [TrouSerS-users] Format of TPM Keys
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> Coming off the TPM, the format is a TCG specific binary blob, not ASN1,
> base64, or any other standard.
>
> You can find the structure in the TPM spec Part 2.  The private part is
> encrypted by the parent key.The public key can be unmarshalled if you
> like.  I can point you to sample code.
>
> The intent of the TSS is to insulate you from those details.
>
> On 3/21/2013 2:31 AM, ravi kiran wrote:
>> sorry the previous message was broken.
>>
>> Can someone tell me the format of public and private key blobs exported
>> by TPM? I am using trousers 0.3.10 for accessing the TPM.When I use the
>> GetPrivateKey or PublicKey option (Tspi_GetAttribData()) the key that is
>> returned is a binary blob that is not ASN1 decodable.I have tried with
>> both openssl asn1parse and bouncycastle jar.Also, the openssl-tpm-engine
>> extracts the public key element by element. Is that the only way to
>> handle this?I have just started working with TPMs and am thoroughly
>> confused.
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> TrouSerS-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/trousers-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users

Reply via email to