[tpm2] Re: Can't se't signature algorithm when using tpm2_import
Roberts, William C <william.c.roberts at intel.com> Fri, 20 May 2022 16:49:48 +0000
| Newsgroups | dev.linux.lists.tpm2 |
|---|---|
| Message-ID | <SN6PR11MB34378B71B2EB8F1032918F33B8D39@SN6PR11MB3437.namprd11.prod.outlook.com> |
This is a bug, I have filed two tickets: - signature-alg bug: https://github.com/tpm2-software/tpm2-tools/issues/2997 - symmetric-alg bug: https://github.com/tpm2-software/tpm2-tools/issues/299<https://github.com/tpm2-software/tpm2-tools/issues/2997>8 I have staged a PR to fix this: - https://github.com/tpm2-software/tpm2-tools/pull/2999 Thank you for the detailed bug report. Unfortunately I won't be of much help on the strongswan side, but hopefully this helps you along. Bill ________________________________ From: Rodolphe AVERTY <rodolphe.averty(a)free.fr> Sent: Friday, May 20, 2022 6:27 AM To: tpm2(a)lists.01.org <tpm2(a)lists.01.org> Subject: [tpm2] Re: Can't se't signature algorithm when using tpm2_import Hi all, I'am trying to import my private key into the TPM (to use it with StrongSwan) >> tpm2_createprimary... .. . >> tpm2_import -G rsa2048:rsassa-sha256 -i private.pem -C parent.ctx -u irsakey.pub -r irsakey.pri >> tpm2_load... .. >> tpm2_evictcontrol... .. Every thing seems to be Ok But when i use the command : >> pki --print --type private --keyid 0x81000002 TPM 2.0 via TSS2 v2 available signature algorithm is NULL with ERROR hash privkey: RSA 2048 bits keyid: 42:e7:94:da:9b:07:40:01:8e:40:e5:51:35:fc:10:da:8f:2c:61:3b subjkey: f8:4e:a2:ae:5c:3a:1b:40:7a:6a:19:04:38:32:05:62:db:f0:d5:9e With that i can't use my key with strong swan. The message (Signature algorithm is null with error hash) indicate that tpm2_import hasn't done its job. Is there a way to have a signature algorithm with tpm2_import ? Is this a tpm2_import limitation ? Or maybe a bug.. . I am using de debian SID package of tpm2-tools which is a 5.2 Thanks for help _______________________________________________ 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
attachment.htm
(text/html, 3.9 KB)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is a bug, I have filed two tickets:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
- signature-alg bug: <a href="https://github.com/tpm2-software/tpm2-tools/issues/2997" id="LPlnk245797">https://github.com/tpm2-software/tpm2-tools/issues/2997</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
- symmetric-alg bug: <a href="https://github.com/tpm2-software/tpm2-tools/issues/2997" id="LPlnk184017">https://github.com/tpm2-software/tpm2-tools/issues/299</a>8</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have staged a PR to fix this:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
- <a href="https://github.com/tpm2-software/tpm2-tools/pull/2999" id="LPlnk794602">https://github.com/tpm2-software/tpm2-tools/pull/2999</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for the detailed bug report. Unfortunately I won't be of much help on the strongswan side, but hopefully this helps you along.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Bill</div>
<div id="appendonsend"></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> Rodolphe AVERTY <[email protected]><br>
<b>Sent:</b> Friday, May 20, 2022 6:27 AM<br>
<b>To:</b> [email protected] <[email protected]><br>
<b>Subject:</b> [tpm2] Re: Can't se't signature algorithm when using tpm2_import</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi all,<br>
<br>
I'am trying to import my private key into the TPM (to use it with StrongSwan)<br>
<br>
>> tpm2_createprimary... .. .<br>
>> tpm2_import -G rsa2048:rsassa-sha256 -i private.pem -C parent.ctx -u irsakey.pub -r irsakey.pri<br>
>> tpm2_load... ..<br>
>> tpm2_evictcontrol... ..<br>
<br>
Every thing seems to be Ok<br>
<br>
But when i use the command :<br>
<br>
>> pki --print --type private --keyid 0x81000002<br>
TPM 2.0 via TSS2 v2 available<br>
signature algorithm is NULL with ERROR hash<br>
privkey: RSA 2048 bits<br>
keyid: 42:e7:94:da:9b:07:40:01:8e:40:e5:51:35:fc:10:da:8f:2c:61:3b<br>
subjkey: f8:4e:a2:ae:5c:3a:1b:40:7a:6a:19:04:38:32:05:62:db:f0:d5:9e<br>
<br>
<br>
With that i can't use my key with strong swan. The message (Signature algorithm is null with error hash) indicate that tpm2_import hasn't done its job.<br>
<br>
Is there a way to have a signature algorithm with tpm2_import ?<br>
Is this a tpm2_import limitation ?<br>
Or maybe a bug.. .<br>
<br>
I am using de debian SID package of tpm2-tools which is a 5.2<br>
<br>
Thanks for help<br>
_______________________________________________<br>
tpm2 mailing list -- [email protected]<br>
To unsubscribe send an email to [email protected]<br>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s<br>
</div>
</span></font></div>
</body>
</html>