Need Help to parse AK public key
chenxiz at fb.com
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
Steffen Schwebel
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
Quoted 23 lines · chenxiz(a)fb.com
Hi,
I created a 2048 RSA AK by using the command below :
tpm2_createak-C0x81010001-c ak.ctx -u ak.pub -r ak.priv -n ak.name -P dummypwd -p dummypwdak.pub file size = 282 bytes.
$stat --printf="%s" ak.pub
282I 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.2Thanks,
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
chenxiz at fb.com
Thanks Steffen, It helps!
thanks,
Chenxi
nicolasoliver03 at gmail.com
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
Chenxi Z
thanks. It is even better.