Re: tpm2-tools port to windows
by Desai, Imran
@Arun, Thanks for working on this. If you have a markdown along with the vcxproj and .sln file I can help you put it on the tools wiki.
________________________________________
From: tpm2-request(a)lists.01.org [tpm2-request(a)lists.01.org]
Sent: Friday, October 11, 2019 12:00 AM
To: tpm2(a)lists.01.org
Subject: tpm2 Digest, Vol 28, Issue 6
Send tpm2 mailing list submissions to
tpm2(a)lists.01.org
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
tpm2-request(a)lists.01.org
You can reach the person managing the list at
tpm2-owner(a)lists.01.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of tpm2 digest..."
Today's Topics:
1. tpm2-tools port to windows (Arun Sudhir)
2. Re: tpm2-tools port to windows (Roberto Carvalho)
3. Re: tpm2-tools port to windows (Arun Sudhir)
4. [RELEASE] tpm2-tools 3.2.1 (Roberts, William C)
5. list link dead (Roberts, William C)
----------------------------------------------------------------------
Date: Thu, 10 Oct 2019 13:31:31 -0700
From: Arun Sudhir <arunsudhir19(a)gmail.com>
Subject: [tpm2] tpm2-tools port to windows
To: tpm2(a)lists.01.org
Message-ID:
<CAJLNp_X21ShovGDcRo9JKGYUAvZghn18tLL=oKqmWqDvUUe1+w(a)mail.gmail.com>
Content-Type: multipart/alternative;
boundary="0000000000000151500594944a42"
--0000000000000151500594944a42
Content-Type: text/plain; charset="UTF-8"
I have been workig on porting tpm2-tools to build on windows and have got
it to build successfully and run commands like tpm2_startup,
tpm2_getrandom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol ,
tpm2_makecredential etc. Is there any interest in this windows port ? I can
publish it on github if there is. I presume it would be useful... Thoughts?
--0000000000000151500594944a42
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I have been workig on porting tpm2-tools to build on windo=
ws and have got it to build successfully and run commands like tpm2_startup=
, tpm2_getrandom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol , tpm=
2_makecredential etc. Is there any interest in this windows port ? I can pu=
blish it on github if there is. I presume it would be useful... Thoughts?</=
div>
--0000000000000151500594944a42--
------------------------------
Date: Thu, 10 Oct 2019 17:36:09 -0300
From: Roberto Carvalho <roberto.nogueira.rc(a)gmail.com>
Subject: [tpm2] Re: tpm2-tools port to windows
To: Arun Sudhir <arunsudhir19(a)gmail.com>
Cc: tpm2(a)lists.01.org
Message-ID:
<CAMCD9Mv6pq7KtV5JcX+tUvbLaOHmjQ0akey-9DgjezQBPZvwMA(a)mail.gmail.com>
Content-Type: multipart/alternative;
boundary="000000000000a4e8730594945afb"
--000000000000a4e8730594945afb
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi, I'm very interested in running tpm2-tools on windows, it would be nice
to upload github and also the step by step to compile in visual studio 2017=
.
Em qui, 10 de out de 2019 =C3=A0s 17:31, Arun Sudhir <arunsudhir19(a)gmail.co=
m>
escreveu:
> I have been workig on porting tpm2-tools to build on windows and have got
> it to build successfully and run commands like tpm2_startup,
> tpm2_getrandom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol ,
> tpm2_makecredential etc. Is there any interest in this windows port ? I c=
an
> publish it on github if there is. I presume it would be useful... Thought=
s?
> _______________________________________________
> 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
--000000000000a4e8730594945afb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi, I'm very interested in running tpm2-tools on windo=
ws, it would be nice to upload github and also the step by step to compile =
in visual studio 2017.<br><div><br></div><div><br></div></div><br><div clas=
s=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Em qui, 10 de out d=
e 2019 =C3=A0s 17:31, Arun Sudhir <<a href=3D"mailto:arunsudhir19@gmail.=
com">arunsudhir19(a)gmail.com</a>> escreveu:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><div dir=3D"ltr">I have been workig on portin=
g tpm2-tools to build on windows and have got it to build successfully and =
run commands like tpm2_startup, tpm2_getrandom, tpm2_createprimary , tpm2_c=
reate, tpm2_evictcontrol , tpm2_makecredential etc. Is there any interest i=
n this windows port ? I can publish it on github if there is. I presume it =
would be useful... Thoughts?</div>
_______________________________________________<br>
tpm2 mailing list -- <a href=3D"mailto:tpm2@lists.01.org" target=3D"_blank"=
>tpm2(a)lists.01.org</a><br>
To unsubscribe send an email to <a href=3D"mailto:tpm2-leave@lists.01.org" =
target=3D"_blank">tpm2-leave(a)lists.01.org</a><br>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s</blockquote></div>
--000000000000a4e8730594945afb--
------------------------------
Date: Thu, 10 Oct 2019 14:06:48 -0700
From: Arun Sudhir <arunsudhir19(a)gmail.com>
Subject: [tpm2] Re: tpm2-tools port to windows
To: Roberto Carvalho <roberto.nogueira.rc(a)gmail.com>
Cc: tpm2(a)lists.01.org
Message-ID:
<CAJLNp_WyKuKGbuM=AstEL1x=Gqnw9TrDWaYCkwq69zOnknVZ2Q(a)mail.gmail.com>
Content-Type: multipart/alternative;
boundary="000000000000530496059494c82a"
--000000000000530496059494c82a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Sounds good. Right now, I have it building in 2019 community. Will
definitely put it in GitHub replete with the sln and vcxproj so that things
just work out of the box.
On Thu, Oct 10, 2019, 1:36 PM Roberto Carvalho <
roberto.nogueira.rc(a)gmail.com> wrote:
> Hi, I'm very interested in running tpm2-tools on windows, it would be nic=
e
> to upload github and also the step by step to compile in visual studio 20=
17.
>
>
>
> Em qui, 10 de out de 2019 =C3=A0s 17:31, Arun Sudhir <arunsudhir19(a)gmail.=
com>
> escreveu:
>
>> I have been workig on porting tpm2-tools to build on windows and have go=
t
>> it to build successfully and run commands like tpm2_startup,
>> tpm2_getrandom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol ,
>> tpm2_makecredential etc. Is there any interest in this windows port ? I =
can
>> publish it on github if there is. I presume it would be useful... Though=
ts?
>> _______________________________________________
>> 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
>
>
--000000000000530496059494c82a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"auto">Sounds good. Right now, I have it building in 2019 commun=
ity. Will definitely put it in GitHub replete with the sln and vcxproj so t=
hat things just work out of the box.</div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr" class=3D"gmail_attr">On Thu, Oct 10, 2019, 1:36 PM Roberto C=
arvalho <<a href=3D"mailto:roberto.nogueira.rc@gmail.com">roberto.noguei=
ra.rc(a)gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr">Hi, I'm very interested in running tpm2-tools on windows, =
it would be nice to upload github and also the step by step to compile in v=
isual studio 2017.<br><div><br></div><div><br></div></div><br><div class=3D=
"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Em qui, 10 de out de 20=
19 =C3=A0s 17:31, Arun Sudhir <<a href=3D"mailto:arunsudhir19@gmail.com"=
target=3D"_blank" rel=3D"noreferrer">arunsudhir19(a)gmail.com</a>> escrev=
eu:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"=
ltr">I have been workig on porting tpm2-tools to build on windows and have =
got it to build successfully and run commands like tpm2_startup, tpm2_getra=
ndom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol , tpm2_makecreden=
tial etc. Is there any interest in this windows port ? I can publish it on =
github if there is. I presume it would be useful... Thoughts?</div>
_______________________________________________<br>
tpm2 mailing list -- <a href=3D"mailto:tpm2@lists.01.org" target=3D"_blank"=
rel=3D"noreferrer">tpm2(a)lists.01.org</a><br>
To unsubscribe send an email to <a href=3D"mailto:tpm2-leave@lists.01.org" =
target=3D"_blank" rel=3D"noreferrer">tpm2-leave(a)lists.01.org</a><br>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s</blockquote></div>
</blockquote></div>
--000000000000530496059494c82a--
------------------------------
Date: Fri, 11 Oct 2019 00:53:31 +0000
From: "Roberts, William C" <william.c.roberts(a)intel.com>
Subject: [tpm2] [RELEASE] tpm2-tools 3.2.1
To: "tpm2(a)lists.01.org" <tpm2(a)lists.01.org>
Message-ID: <476DC76E7D1DF2438D32BFADF679FC5649E24616(a)ORSMSX101.amr.co
rp.intel.com>
Content-Type: text/plain; charset="us-ascii"
Hello a new 3.X series release is available:
https://github.com/tpm2-software/tpm2-tools/releases/tag/3.2.1
Thanks
Bill
------------------------------
Date: Fri, 11 Oct 2019 00:55:47 +0000
From: "Roberts, William C" <william.c.roberts(a)intel.com>
Subject: [tpm2] list link dead
To: "tpm2(a)lists.01.org" <tpm2(a)lists.01.org>
Cc: "Desai, Imran" <imran.desai(a)intel.com>
Message-ID: <476DC76E7D1DF2438D32BFADF679FC5649E25633(a)ORSMSX101.amr.co
rp.intel.com>
Content-Type: text/plain; charset="us-ascii"
The mailing list link referenced in tpm2-tools and tpm2-tss (and likely others) is dead.
https://lists.01.org/mailman/listinfo/tpm2
I get a Not Found response
wget https://lists.01.org/mailman/listinfo/tpm2
--2019-10-10 19:54:42-- https://lists.01.org/mailman/listinfo/tpm2
...
Proxy request sent, awaiting response... 404 Not Found
2019-10-10 19:54:44 ERROR 404: Not Found.
Can someone figure out where they moved it?
Thanks,
Bill
------------------------------
Subject: Digest Footer
_______________________________________________
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
------------------------------
End of tpm2 Digest, Vol 28, Issue 6
***********************************
2 years, 7 months
tpm2-tools port to windows
by Arun Sudhir
I have been workig on porting tpm2-tools to build on windows and have got
it to build successfully and run commands like tpm2_startup,
tpm2_getrandom, tpm2_createprimary , tpm2_create, tpm2_evictcontrol ,
tpm2_makecredential etc. Is there any interest in this windows port ? I can
publish it on github if there is. I presume it would be useful... Thoughts?
2 years, 7 months
[tpm2]How to get the feature api implementation?
by yue peng
Hi,
I'm a freshman. Recently I'm reading some specifications and books of
tpm2, and trying to compile the tpm2-tss, tpm2-tools, simulator tpm and
some thing else on my linux. I noticed that the tpm2-tss has implemented
the enhanced-system API and the system API, but I cannot found the feature
api of tpm2 on github. I'm confused the where can I found the Feature API
implemention?
Thanks for your reply.
regards
2 years, 7 months
tpm2-tools in windows x64
by Roberto Carvalho
Is there any walkthrough or tutorial for installing tpm2-tools on windows
x64 using visual studio 2017?
2 years, 7 months
Error running tpm2_create: magic does not match!
by Arun Sudhir
I hve ported tpm2_tools to windows and and am able to run tpm2_getrandom,
tpm2_createprimary etc. I am using the ctx file generated by
tpm2_createprimary to run tpm2_create.
HEre are the commands i used:
tpm2_createprimary -c primary.ctx (works)tpm2_create -C primary.ctx -u
obj.pub -r obj.priv (fails)
This is the error i get:
ERROR: Found magic 0x40000001 did not match expected magic of 0xbadcc0de!
WARN: The loaded tpm context does not appear to be in the proper format,
assuming old format, this will be converted on the next save.
ERROR: Could not load tpm context file
ERROR: Failed to load_tpm_context_file()
ERROR: Unable to run
C:\Users\arunsu\source\repos\tpm2-tools-4.0\vstudio\x64\Debug\tpm2-create.exe
I see from files.c that the magic is hardcoded.
/**
* This is the magic for the file header. The header is organized
* as a big endian U32 (BEU32) of MAGIC followed by a BEU32 of the
* version number. Tools can define their own, individual file
* formats as they make sense, but they should always have the header.
*/
static const UINT32 MAGIC = 0xBADCC0DE;
Is this a windows vs Linux issue? Should i change the magic value?
2 years, 7 months
Try Decrypt using EK and AIK
by Roberto Carvalho
I'm trying to encrypt a file using openssl and decrypt using AIK and EK
keys, but it's not working:
Create EK
tpm2_createek -Q -c 0x81010009 -G rsa -u ek_pub.pem -f pem
tpm2_readpublic -Q -c 0x81010009 -o ek.pub
Create AK
tpm2_createak -Q -C 0x81010009 -c ak.ctx -G rsa -g sha256 -s rsassa -u
ak_pub.pem -f pem -n ak_pub.name
tpm2_readpublic -Q -c ak.ctx -o ak.pub
Trying using EK
echo 12345678 > test.txt
openssl rsautl -in test.txt -out dados.enc -pubin -inkey ek_pub.pem -encrypt
tpm2_rsadecrypt -c 0x81010009 -o decrypt.txt dados.enc
WARNING:esys:src/tss2-esys/api/Esys_RSA_Decrypt.c:301:Esys_RSA_Decrypt_Finish()
Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_RSA_Decrypt.c:102:Esys_RSA_Decrypt() Esys
Finish ErrorCode (0x0000012f)
ERROR: Esys_RSA_Decrypt(0x12F) - tpm:error(2.0): authValue or authPolicy is
not available for selected entity
ERROR: Unable to run tpm2_rsadecrypt
If I try using AK:
openssl rsautl -in test.txt -out testeak.enc -pubin -inkey ak_pub.pem
-encrypt
tpm2_rsadecrypt -c ak.ctx -o decrypt.txt testeak.enc
WARNING:esys:src/tss2-esys/api/Esys_RSA_Decrypt.c:301:Esys_RSA_Decrypt_Finish()
Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_RSA_Decrypt.c:102:Esys_RSA_Decrypt() Esys
Finish ErrorCode (0x00000182)
ERROR: Esys_RSA_Decrypt(0x182) - tpm:handle(1):inconsistent attributes
ERROR: Unable to run tpm2_rsadecrypt
Is it possible to decrypt using these keys?
2 years, 7 months