pkcs11-tool generates 2 private keys for keypairgen

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pkcs11-tool generates 2 private keys for keypairgen

Jump to solution
852 Views
user4
Contributor I

I'm expecting to have a public and a private key pair when I execute pkcs11-tool command with --keypairgen option, but the outputs says generated 2 private keys.

Is that an expected behavior of se050? If not, am I missing something important?

 

<Environment>

platform: Debian (bullseye)

module variant: SE050C1

 

<Outputs>

# pkcs11-tool --module $PKCS11_MODULE --keypairgen --key-type rsa:2048 --label "sss:20202020"
Using slot 0 with a present token (0x1)
smCom :WARN :Invalid conn_ctx
App   :INFO :Using PortName='/dev/i2c-1:0x48' (ENV: EX_SSS_BOOT_SSS_PORT=/dev/i2c-1:0x48)
sss   :INFO :atr (Len=35)
      00 A0 00 00    03 96 04 03    E8 00 FE 02    0B 03 E8 08 
      01 00 00 00    00 64 00 00    0A 4A 43 4F    50 34 20 41 
      54 50 4F 
sss   :WARN :Communication channel is Plain.
sss   :WARN :!!!Not recommended for production use.!!!
Key pair generated:
Private Key Object; RSA 
  label:      sss:20202020
  ID:         20202020
  Usage:      decrypt, sign
  Access:     sensitive, always sensitive
  Allowed mechanisms: RSA-PKCS,SHA1-RSA-PKCS,SHA224-RSA-PKCS,SHA256-RSA-PKCS,SHA384-RSA-PKCS,SHA512-RSA-PKCS,RSA-PKCS-PSS,SHA1-RSA-PKCS-PSS,SHA224-RSA-PKCS-PSS,SHA256-RSA-PKCS-PSS,SHA384-RSA-PKCS-PSS,SHA512-RSA-PKCS-PSS,RSA-PP
Private Key Object; RSA 
  label:      sss:20202020
  ID:         20202020
  Usage:      decrypt, sign
  Access:     sensitive, always sensitive
  Allowed mechanisms: RSA-PKCS,SHA1-RSA-PKCS,SHA224-RSA-PKCS,SHA256-RSA-PKCS,SHA384-RSA-PKCS,SHA512-RSA-PKCS,RSA-PKCS-PSS,SHA1-RSA-PKCS-PSS,SHA224-RSA-PKCS-PSS,SHA256-RSA-PKCS-PSS,SHA384-RSA-PKCS-PSS,SHA512-RSA-PKCS-PSS,RSA-PP

 

Labels (1)
0 Kudos
Reply
1 Solution
754 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @user4 ,

 

Thanks for the information! I have tied the same with MW ver 4.5.1 , it just works as expected. Maybe you have to update the MW to the latest. Please kindly refer to the following for details.

Kan_Li_0-1714972873727.png

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

View solution in original post

0 Kudos
Reply
4 Replies
831 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @user4 ,

 

May I have the MW version?

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
818 Views
user4
Contributor I

Hi Kan,

Thank you for responding.

Unfortunately, I don't know the specific version of MW because this environment was built by another company, but guessing it might be 4.2.0:

# dpkg -L plug-and-trust
/.
/etc
/etc/plug-and-trust
/etc/plug-and-trust/openssl11_sss_se050.cnf
/usr
/usr/lib
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf/engines-1.1
/usr/lib/arm-linux-gnueabihf/engines-1.1/e4sss.so
/usr/lib/arm-linux-gnueabihf/libsssapisw.so.4.2.0
/usr/lib/arm-linux-gnueabihf/plug-and-trust
/usr/lib/arm-linux-gnueabihf/plug-and-trust/libsss_pkcs11.so
/usr/share
/usr/share/doc
/usr/share/doc/plug-and-trust
/usr/share/doc/plug-and-trust/changelog.Debian.gz
/usr/share/doc/plug-and-trust/copyright
/usr/lib/arm-linux-gnueabihf/libsssapisw.so.4

 

0 Kudos
Reply
755 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @user4 ,

 

Thanks for the information! I have tied the same with MW ver 4.5.1 , it just works as expected. Maybe you have to update the MW to the latest. Please kindly refer to the following for details.

Kan_Li_0-1714972873727.png

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply
744 Views
user4
Contributor I

Hi Kan,

Thank you for the inputs. I've also verified that using the libraries in that version does solve the problem, so will consider to ask the package provider to update the MW.

0 Kudos
Reply