LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2022, 04:22 AM   #16
avertyr
LQ Newbie
 
Registered: May 2022
Posts: 20

Original Poster
Rep: Reputation: 0

I did a tmp_clear before the commands on my last msg
 
Old 05-19-2022, 05:09 AM   #17
ecdsa
LQ Newbie
 
Registered: Jun 2012
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by avertyr View Post
scheme:
value: null
raw: 0x10
scheme-halg:
value: null
raw: 0x10
I assume these should have values for it to work. Did you try passing rsa2048:rsassa-sha256 to tpm2_createprimary? It's also possible that attributes have to be passed to the latter (e.g. -a 'restricted|sign|fixedtpm|fixedparent|sensitivedataorigin|userwithauth', which uses sign instead of the default decrypt to mark the key as signature key).
 
Old 05-19-2022, 07:02 AM   #18
avertyr
LQ Newbie
 
Registered: May 2022
Posts: 20

Original Poster
Rep: Reputation: 0
Ecdsa,


i try the same parameters with tpm2_create :


>> tpm2_create -G rsa:rsassa-sha256 -g sha256 -C parent.ctx -u import_rsa_key.pub -r import_rsa_key.priv
>> tpm2_load -C parent.ctx -u import_rsa_key.pub -r import_rsa_key.priv -c key.ctx
>> tpm2_evictcontrol -C o -c key.ctx 0x81000002

>> pki --print --type priv --keyid 0x81000002

TPM 2.0 via TSS2 v2 available
signature algorithm is RSASSA with SHA256 hash
privkey: RSA 2048 bits
keyid: 68:b7:ed:45:ca:e3:58:a1:6c:ca:7b:6b:b7:f7:53:a7:40:63:2c:8e
subjkey: a2:cf:da:fa:db:02:1c:b0:cf:79:db:43:78:c2:49:7c:cd:d8:6a:ef

Generate a key with a signature algorithm

But it seems that with tpm2_import that doesn't work

Could it be a tpm2_import bug ?
 
Old 05-19-2022, 08:05 AM   #19
avertyr
LQ Newbie
 
Registered: May 2022
Posts: 20

Original Poster
Rep: Reputation: 0
Ecdsa,


i use the command :

>> tpm2_createprimary -Q -G rsa2048:rsassa-sha256 -g sha256 -C o -c parent.ctx

--> WARNING:esys:src/tss2-esys/api/Esys_CreatePrimary.c:400:Esys_CreatePrimary_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:135:Esys_CreatePrimary() Esys Finish ErrorCode (0x000002c2)
ERROR: Esys_CreatePrimary(0x2C2) - tpmarameter(2):inconsistent attributes
ERROR: Unable to run tpm2_createprimary

then :
>> tpm2_createprimary -Q -G rsa2048 -g sha256 -C o -c parent.ctx
>> tpm2_import -G rsa2048:rsassa-sha256 -i ${PRIVATE_PEM} -C parent.ctx -u import_rsa_key.pub -r import_rsa_key.priv -a 'restricted|sign|fixedtpm|fixedparent|sensitivedataorigin|userwithauth'

-->

WARNING:esys:src/tss2-esys/api/Esys_Import.c:323:Esys_Import_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Import.c:110:Esys_Import() Esys Finish ErrorCode (0x000002c2)
ERROR: Esys_HMAC(0x2C2) - tpmarameter(2):inconsistent attributes
ERROR: Unable to run tpm2_import
 
Old 05-23-2022, 02:23 AM   #20
avertyr
LQ Newbie
 
Registered: May 2022
Posts: 20

Original Poster
Rep: Reputation: 0
It is a tpm2_import bug.

Have a look at this thread :

https://lists.01.org/hyperkitty/list...H2XS3UBJ7CPXP/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert a putty private key to be used as a private key on a RedHat or Ubuntu Server greavette Linux - General 2 06-26-2019 08:40 PM
Mutt and GnuPG? KeyID = BEEP! darklogik_org Linux - Security 1 02-07-2004 06:52 AM
Mutt and GnuPG? KeyID = BEEP! darklogik_org Linux - Software 1 01-26-2004 03:42 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration