[tpm2] Re: Using a session with TPM2_CreatePrimary

Desai, Imran <imran.desai at intel.com> Sun, 26 Jun 2022 23:32:07 +0000
Newsgroups dev.linux.lists.tpm2
Message-ID <BYAPR11MB317696F77D4B5E40C87E4E17E2B69@BYAPR11MB3176.namprd11.prod.outlook.com>
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>
Sent: Sunday, June 26, 2022 3:31:56 PM
To: Shaw, Adrian <adrian.shaw(a)hp.com>; tpm2(a)lists.01.org <tpm2(a)lists.01.org>; Desai, Imran <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>
Sent: Wednesday, June 22, 2022 12:10 PM
To: tpm2(a)lists.01.org <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

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

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, 3.1 KB)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div>
<div>
<div dir="ltr">That’s right, it needs to be added for createprimary. Having said that, if your tpm supports createloaded, you can use tpm2_create tool &nbsp;to create a primary object as well.</div>
</div>
<div id="ms-outlook-mobile-signature">
<div></div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Roberts, William C &lt;[email protected]&gt;<br>
<b>Sent:</b> Sunday, June 26, 2022 3:31:56 PM<br>
<b>To:</b> Shaw, Adrian &lt;[email protected]&gt;; [email protected] &lt;[email protected]&gt;; Desai, Imran &lt;[email protected]&gt;<br>
<b>Subject:</b> Re: Using a session with TPM2_CreatePrimary</font>
<div>&nbsp;</div>
</div>
<style type="text/css" style="display:none">
<!--
p
	{margin-top:0;
	margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm pretty sure it's just missing; we haven't enabled session support throughout all the tools yet. Imran am I correct?</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Shaw, Adrian &lt;[email protected]&gt;<br>
<b>Sent:</b> Wednesday, June 22, 2022 12:10 PM<br>
<b>To:</b> [email protected] &lt;[email protected]&gt;<br>
<b>Subject:</b> [tpm2] Using a session with TPM2_CreatePrimary</font>
<div>&nbsp;</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi everyone,
<div class=""><br class="">
</div>
<div class="">I’m trying to create a primary key using an authenticated and encrypted session.</div>
<div class=""><br class="">
</div>
<div class="">I looked at the man page for tpm2_createprimary&nbsp;<a href="https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md" class="">https://github.com/tpm2-software/tpm2-tools/blob/1226b5333e0f051edf67739743a68f668f9ba07a/man/tpm2_createprimary.1.md</a></div>
<div class=""><br class="">
</div>
<div class="">It does not seem to be possible - there is no way to specify the session to use.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">However, it is possible to do this in the IBM TSS equivalent&nbsp;<a href="https://www.mankier.com/1/tsscreateprimary" class="">https://www.mankier.com/1/tsscreateprimary</a></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(0,0,0)">I noticed you can specify a session for other commands though, like tpm2_create, but not with tpm2_createprimary.</span></div>
<div class=""><br class="">
</div>
<div class="">Is this a missing feature or am I missing some fundamental understanding?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Adrian</div>
</div>
</div>
</body>
</html>