<?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 SE050 and Middleware v4.3.0 - Possible bug with Openssl engine? in Secure Authentication</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1688533#M1306</link>
    <description>&lt;P&gt;I'm using the SE050F2 With middleware v4.3.0. I'm using the an openssl engine so external libs like security-xml-c can leverage the RSA keys in the SE050.&lt;/P&gt;&lt;P&gt;I'm finding a failure in sss/plugin/openssl/engine/src/ax_sssEngine_rsa.c in the function EmbSe_RSA_Priv_Encrypt() where if the RSA padding selected is not set to RSA_NO_PADDING, the call fails. Is this correct or a bug? xml-security-c uses RSA padding&amp;nbsp;&lt;SPAN&gt;RSA_PKCS1_PADDING which complies with the XML security standard.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonyMo_0-1689338999815.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/232486i2C6419200FF7A9E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonyMo_0-1689338999815.png" alt="TonyMo_0-1689338999815.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, in the same function&amp;nbsp;EmbSe_RSA_Priv_Encrypt(), I notice that sss_asymmetric_context_init() uses the kMode_SSS_Decrypt and makes a call to sss_assymmetric_decrypt(). I intuitively would expect that RSA_Priv_Encrypt() is doing "encrypt" operations, not "decrypt" operations. Is this a bug?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonyMo_1-1689339252997.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/232487i5D24B5C5CFBCD5D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonyMo_1-1689339252997.png" alt="TonyMo_1-1689339252997.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2023 12:54:23 GMT</pubDate>
    <dc:creator>TonyMo</dc:creator>
    <dc:date>2023-07-14T12:54:23Z</dc:date>
    <item>
      <title>SE050 and Middleware v4.3.0 - Possible bug with Openssl engine?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1688533#M1306</link>
      <description>&lt;P&gt;I'm using the SE050F2 With middleware v4.3.0. I'm using the an openssl engine so external libs like security-xml-c can leverage the RSA keys in the SE050.&lt;/P&gt;&lt;P&gt;I'm finding a failure in sss/plugin/openssl/engine/src/ax_sssEngine_rsa.c in the function EmbSe_RSA_Priv_Encrypt() where if the RSA padding selected is not set to RSA_NO_PADDING, the call fails. Is this correct or a bug? xml-security-c uses RSA padding&amp;nbsp;&lt;SPAN&gt;RSA_PKCS1_PADDING which complies with the XML security standard.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonyMo_0-1689338999815.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/232486i2C6419200FF7A9E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonyMo_0-1689338999815.png" alt="TonyMo_0-1689338999815.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, in the same function&amp;nbsp;EmbSe_RSA_Priv_Encrypt(), I notice that sss_asymmetric_context_init() uses the kMode_SSS_Decrypt and makes a call to sss_assymmetric_decrypt(). I intuitively would expect that RSA_Priv_Encrypt() is doing "encrypt" operations, not "decrypt" operations. Is this a bug?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonyMo_1-1689339252997.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/232487i5D24B5C5CFBCD5D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonyMo_1-1689339252997.png" alt="TonyMo_1-1689339252997.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 12:54:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1688533#M1306</guid>
      <dc:creator>TonyMo</dc:creator>
      <dc:date>2023-07-14T12:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: SE050 and Middleware v4.3.0 - Possible bug with Openssl engine?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1689852#M1307</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213597"&gt;@TonyMo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Indeed the function EmbSE_RSA_Priv_Encrypt is actually the method referenced to “sign” data. With RSA the signature is correctly created with the method “decrypt”. From the openSSL documentation:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kan_Li_0-1689903033667.png" style="width: 585px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/232821iB5DA340679C4F9D7/image-dimensions/585x563?v=v2" width="585" height="563" role="button" title="Kan_Li_0-1689903033667.png" alt="Kan_Li_0-1689903033667.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I agree that the engine’s function name is misleading as it actually should be the signing function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the RSA padding methods support, we are checking with the R&amp;amp;D now, will let you know when I have any more info from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience and understanding!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 01:36:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1689852#M1307</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2023-07-21T01:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: SE050 and Middleware v4.3.0 - Possible bug with Openssl engine?</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1690698#M1308</link>
      <description>&lt;P&gt;Thank you Kan. There is no concern with the SE050 not being to support RSA padding. I was able to leverage Openssl's RSA padding commands to achieve what I needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 08:00:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SE050-and-Middleware-v4-3-0-Possible-bug-with-Openssl-engine/m-p/1690698#M1308</guid>
      <dc:creator>TonyMo</dc:creator>
      <dc:date>2023-07-22T08:00:51Z</dc:date>
    </item>
  </channel>
</rss>

