<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: EdgeLock SE050 getting private key via PKCS#11 URI in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1161242#M361</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/178478"&gt;@peter_nt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually from my point of view, if a private key can be accessed externally , it would lead to security risk, but I am also checking it with the expert, will let you know when I have any more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kan&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 09:53:13 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2020-09-30T09:53:13Z</dc:date>
    <item>
      <title>EdgeLock SE050 getting private key via PKCS#11 URI</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1160571#M355</link>
      <description>&lt;P&gt;Hello All!&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is it possible to access a private key stored on a SE050 via the PKCS#11 URI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have generated an RSA key, and I can even see it in the output of p11tool:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# p11tool  --provider=/usr/local/lib/libsss_pkcs11.so --list-all
...
Object 0:
        URL: pkcs11:model=;manufacturer=NXP;serial=;token=SSS_PKCS11;id=%11%BB%CC%6D;object=sss%3A6DCCBB11;type=private
        Type: Private key (RSA-1024)
        Label: sss:6DCCBB11
        ID: 11:bb:cc:6d
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However I cannot access if via the URI:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# openssl req -new -x509 -subj "/CN=Units" -engine e4sss -keyform engine -key "pkcs11:model=;manufacturer=NXP;serial=;token=SSS_PKCS11;id=%11%BB%CC%6D;object=sss%3A6DCCBB11;type=private" -out cer.pem;
ssse-flw: EmbSe_Init(): Entry
App   :INFO :Using PortName='/dev/i2c-1' (ENV: EX_SSS_BOOT_SSS_PORT=/dev/i2c-1)
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.!!!
ssse-flw: Version: 1.0.5
ssse-flw: EmbSe_Init(): Exit
engine "e4sss" set.
cannot load Private Key from engine
1995698192:error:2609607D:engine routines:ENGINE_load_private_key:no load function:../crypto/engine/eng_pkey.c:72:
unable to load Private Key
ssse-flw: EmbSe_Finish(): Entry
ssse-flw: EmbSe_Finish(): Exit
ssse-flw: EmbSe_Destroy(): Entry&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;It is using the engine configured as follows:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;openssl_conf            = nxp_engine
...
[nxp_engine]
engines = engine_section

[ engine_section ]
e4sss_se050 = e4sss_se050_section

[ e4sss_se050_section ]
dynamic_path = /usr/local/lib/libsss_engine.so
engine_id = e4sss
init = 1
default_algorithms = RSA,RAND,EC&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The same thing happens with the openssl configured with pkcs11 module:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# openssl req -new -x509 -subj "/CN=Units" -engine pkcs11 -keyform engine -key "pkcs11:model=;manufacturer=NXP;serial=;token=SSS_PKCS11;id=%11%BB%CC%6D;object=sss%3A6DCCBB11;type=private" -out cer.pem;
engine "pkcs11" set.
Found slot without user PIN
Found slot without user PIN
PKCS11_get_private_key returned NULL
cannot load Private Key from engine
1995464720:error:80067065:pkcs11 engine:ctx_load_privkey:object not found:eng_back.c:862:
1995464720:error:26096080:engine routines:ENGINE_load_private_key:failed loading private key:../crypto/engine/eng_pkey.c:78:
unable to load Private Key&lt;/LI-CODE&gt;&lt;P&gt;with the following openssl config:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;openssl_conf            = nxp_engine
...
[nxp_engine]
engines = engine_section

[ engine_section ]
e4sss_se050 = e4sss_se050_section

[ e4sss_se050_section ]
dynamic_path = /usr/local/lib/libsss_pkcs11.so
engine_id = pkcs11
init = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above key was actually generated using `python3 openssl_provisionRSA.py --key_type rsa1024` from the python scripts examples, but the same applies to the keys generated using pkcs11-tool, seTool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:03:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1160571#M355</guid>
      <dc:creator>peter_nt</dc:creator>
      <dc:date>2020-09-29T09:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: EdgeLock SE050 getting private key via PKCS#11 URI</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1161242#M361</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/178478"&gt;@peter_nt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually from my point of view, if a private key can be accessed externally , it would lead to security risk, but I am also checking it with the expert, will let you know when I have any more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kan&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 09:53:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1161242#M361</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2020-09-30T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: EdgeLock SE050 getting private key via PKCS#11 URI</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1338553#M571</link>
      <description>&lt;P&gt;That's right, but in this case, How do you encrypt or sign a file?&lt;BR /&gt;In fact libengine expose an interface and you can get that interface.&lt;BR /&gt;&lt;A href="https://github.com/OpenSC/OpenSC/issues/1429" target="_blank"&gt;https://github.com/OpenSC/OpenSC/issues/1429&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 17:55:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1338553#M571</guid>
      <dc:creator>DarkVeider</dc:creator>
      <dc:date>2021-09-10T17:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: EdgeLock SE050 getting private key via PKCS#11 URI</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1459900#M801</link>
      <description>&lt;P&gt;You can encrypt and sign using nxp APIs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should never be allowed to extract the private keys&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 09:07:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/EdgeLock-SE050-getting-private-key-via-PKCS-11-URI/m-p/1459900#M801</guid>
      <dc:creator>ahusseis</dc:creator>
      <dc:date>2022-05-18T09:07:31Z</dc:date>
    </item>
  </channel>
</rss>

