All of lore.kernel.org
 help / color / mirror / Atom feed
* [tpm2] Re: Need Help to parse AK public key
@ 2020-02-19 23:52 Chenxi Z
  0 siblings, 0 replies; 4+ messages in thread
From: Chenxi Z @ 2020-02-19 23:52 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

thanks. It is even better.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tpm2] Re: Need Help to parse AK public key
@ 2020-02-19 23:24 nicolasoliver03
  0 siblings, 0 replies; 4+ messages in thread
From: nicolasoliver03 @ 2020-02-19 23:24 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

You can also use tpm2_readpublic for an already created one!

tpm2_readpublic -c ak.ctx -f PEM -o ak.pem

tpm2_readpublic -c 0x81010001 -f PEM -o ak.pem

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tpm2] Re: Need Help to parse AK public key
@ 2020-02-19 23:05 chenxiz
  0 siblings, 0 replies; 4+ messages in thread
From: chenxiz @ 2020-02-19 23:05 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 44 bytes --]

Thanks Steffen, It helps!

thanks,
Chenxi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tpm2] Re: Need Help to parse AK public key
@ 2020-02-19 22:38 Steffen Schwebel
  0 siblings, 0 replies; 4+ messages in thread
From: Steffen Schwebel @ 2020-02-19 22:38 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hello,

you can specify a format via the -f switch.

Use -f pem

tpm2_createak -C 0x81010001 -c ak.ctx -u ak.pub -r ak.priv -n ak.name -P
dummypwd -p dummypwd -f pem

regards,
Steffen Schwebel

On 2/19/20 11:32 PM, chenxiz(a)fb.com wrote:
> Hi,
>
> I created a 2048 RSA AK by using the command below :
> tpm2_createak -C 0x81010001 -c ak.ctx -u ak.pub -r ak.priv -n ak.name -P dummypwd -p dummypwd
>
> ak.pub file size = 282 bytes.
> $stat --printf="%s" ak.pub
> 282
>
> I would like to parse the RSA public key, i.e., e and n, Can anyone help me elaborate the ak.pub format or is there any tool I can use to parse it?
>
> TPM2 tools version (all are the latest):
> tpm2-tools-4.1.1
> tpm2-abrmd-2.3.1
> tpm2-tss-2.3.2
>
>
> Thanks,
> Chenxi
> _______________________________________________
> tpm2 mailing list -- tpm2(a)lists.01.org
> To unsubscribe send an email to tpm2-leave(a)lists.01.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-19 23:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 23:52 [tpm2] Re: Need Help to parse AK public key Chenxi Z
  -- strict thread matches above, loose matches on Subject: below --
2020-02-19 23:24 nicolasoliver03
2020-02-19 23:05 chenxiz
2020-02-19 22:38 Steffen Schwebel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.