[tpm2] Re: Using a session with TPM2_CreatePrimary
Shaw, Adrian <adrian.shaw at hp.com> Fri, 01 Jul 2022 13:29:46 +0000
| Newsgroups | dev.linux.lists.tpm2 |
|---|---|
| Message-ID | <PH7PR84MB153342EA5E057C226B0353389FBD9@PH7PR84MB1533.NAMPRD84.PROD.OUTLOOK.COM> |
Thanks, William and Imran. I'll have a look at using your suggestion instead. From: Desai, Imran <imran.desai(a)intel.com> Sent: 27 June 2022 00:32 To: Roberts, William C <william.c.roberts(a)intel.com>; Shaw, Adrian <adrian.shaw(a)hp.com>; tpm2(a)lists.01.org Subject: Re: Using a session with TPM2_CreatePrimary That's right, it needs to be added for createprimary. Having said that, if your tpm supports createloaded, you can use tpm2_create tool to create a primary object as well. ________________________________ From: Roberts, William C <william.c.roberts(a)intel.com<mailto:william.c.roberts(a)intel.com>> Sent: Sunday, June 26, 2022 3:31:56 PM To: Shaw, Adrian <adrian.shaw(a)hp.com<mailto:adrian.shaw(a)hp.com>>; tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org> <tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>>; Desai, Imran <imran.desai(a)intel.com<mailto:imran.desai(a)intel.com>> Subject: Re: Using a session with TPM2_CreatePrimary I'm pretty sure it's just missing; we haven't enabled session support throughout all the tools yet. Imran am I correct? ________________________________ From: Shaw, Adrian <adrian.shaw(a)hp.com<mailto:adrian.shaw(a)hp.com>> Sent: Wednesday, June 22, 2022 12:10 PM To: tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org> <tpm2(a)lists.01.org<mailto:tpm2(a)lists.01.org>> Subject: [tpm2] Using a session with TPM2_CreatePrimary Hi everyone, I'm trying to create a primary key using an authenticated and encrypted session. I looked at the man page for tpm2_createprimary https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md<https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md> It does not seem to be possible - there is no way to specify the session to use. However, it is possible to do this in the IBM TSS equivalent https://www.mankier.com/1/tsscreateprimary<https://www.mankier.com/1/tsscreateprimary> I noticed you can specify a session for other commands though, like tpm2_create, but not with tpm2_createprimary. Is this a missing feature or am I missing some fundamental understanding? Thanks, Adrian
attachment.htm
(text/html, 6 KB)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks, William and Imran. I’ll have a look at using your suggestion instead.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Desai, Imran <[email protected]>
<br>
<b>Sent:</b> 27 June 2022 00:32<br>
<b>To:</b> Roberts, William C <[email protected]>; Shaw, Adrian <[email protected]>; [email protected]<br>
<b>Subject:</b> Re: Using a session with TPM2_CreatePrimary<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">That’s right, it needs to be added for createprimary. Having said that, if your tpm supports createloaded, you can use tpm2_create tool to create a primary object as well.<o:p></o:p></p>
</div>
</div>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Roberts, William C <<a href="mailto:[email protected]">[email protected]</a>><br>
<b>Sent:</b> Sunday, June 26, 2022 3:31:56 PM<br>
<b>To:</b> Shaw, Adrian <<a href="mailto:[email protected]">[email protected]</a>>;
<a href="mailto:[email protected]">[email protected]</a> <<a href="mailto:[email protected]">[email protected]</a>>; Desai, Imran <<a href="mailto:[email protected]">[email protected]</a>><br>
<b>Subject:</b> Re: Using a session with TPM2_CreatePrimary</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I'm pretty sure it's just missing; we haven't enabled session support throughout all the tools yet. Imran am I correct?<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Shaw, Adrian <<a href="mailto:[email protected]">[email protected]</a>><br>
<b>Sent:</b> Wednesday, June 22, 2022 12:10 PM<br>
<b>To:</b> <a href="mailto:[email protected]">[email protected]</a> <<a href="mailto:[email protected]">[email protected]</a>><br>
<b>Subject:</b> [tpm2] Using a session with TPM2_CreatePrimary</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">Hi everyone, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I’m trying to create a primary key using an authenticated and encrypted session.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I looked at the man page for tpm2_createprimary <a href="https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md">https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It does not seem to be possible - there is no way to specify the session to use. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">However, it is possible to do this in the IBM TSS equivalent <a href="https://www.mankier.com/1/tsscreateprimary">https://www.mankier.com/1/tsscreateprimary</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">I noticed you can specify a session for other commands though, like tpm2_create, but not with tpm2_createprimary.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is this a missing feature or am I missing some fundamental understanding?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Adrian<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>