<?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>Secure AuthenticationのトピックSW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
    <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986026#M153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been working with the OM-SE050ARD demo board connected via the external I2C interface to a proprietary circuit card. I have generated an RSA-2048 key pair, and according to the APDU specification, I should be able to read the public key using the ReadSecureObject command and sign data using the RSASign command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have run tests in both a session-less and UserID session context. I have tried assigning policies to the keys, but from my understanding of the documentation, the default policy should be adequate (default secure object policy is full access, except attestation. This would mean read, write, generate, delete, sign, verify, encrypt, decrypt, etc.) as I only am attempting to read and sign right now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To read the RSA public key modulus, the APDU command is as follows&lt;/P&gt;&lt;P&gt;80 02 00 00 09 41 04 00 00 00 01 44 01 00 00&lt;/P&gt;&lt;P&gt;CLA = 80&lt;/P&gt;&lt;P&gt;INS = INS_READ&lt;/P&gt;&lt;P&gt;P1 = P1_DEFAULT&lt;/P&gt;&lt;P&gt;P2 = P2_DEFAULT&lt;/P&gt;&lt;P&gt;Lc = 09&lt;/P&gt;&lt;P&gt;TAG_1 04 00 00 00 01 (object id = 0x00000001)&lt;/P&gt;&lt;P&gt;TAG_4 01 00 (RSA_COMP_MOD)&lt;/P&gt;&lt;P&gt;Lc = 0&lt;/P&gt;&lt;P&gt;TAG_2, TAG_3, TAG_5-TAG_7 are optional and do not apply to RSA keys&lt;/P&gt;&lt;P&gt;In response I receive 69 85, SW_CONDITIONS_NOT_SATISFIED. I get this regardless of whether the keys have the default policy or an explicit policy set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, when I try to sign some random data, I get the same result of SW_CONDITIONS_NOT_SATISFIED. The command for that is as follows:&lt;/P&gt;&lt;P&gt;80 03 0c 09 2b 41 04 00 00 00 01 42 01 28 43 20 69 47 56 c0 a4 1d 6b 60 69 43 74 63 1c a3 80 7b 87 f3 5b 48 9e dd 82 9c 75 6b b3 32 ba e6 17 5d 00&lt;/P&gt;&lt;P&gt;CLA = 80&lt;/P&gt;&lt;P&gt;INS = INS_CRYPTO&lt;/P&gt;&lt;P&gt;P1 = P1_SIGNATURE&lt;/P&gt;&lt;P&gt;P2 = P2_SIGN&lt;/P&gt;&lt;P&gt;Lc = 2B&lt;/P&gt;&lt;P&gt;TAG_1 04 00 00 00 01 (object id = 0x00000001)&lt;/P&gt;&lt;P&gt;TAG_2 01 28 (RSASignatureAlgo = RSA_SHA_256_PKCS1)&lt;/P&gt;&lt;P&gt;TAG_3 20&amp;nbsp;&lt;SPAN&gt;69 47 56 c0 a4 1d 6b 60 69 43 74 63 1c a3 80 7b 87 f3 5b 48 9e dd 82 9c 75 6b b3 32 ba e6 17 5d (data)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Le 00&lt;/P&gt;&lt;P&gt;Here I get SW_CONDITIONS_NOT_SATISFIED as well regardless of whether I use the default policy or an explicitly set policy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The applet version is 3.1.0 and applet config is 0x6FFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What other conditions would need satisfied to read the RSA public key components or sign using a generated RSA private key?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2020 19:15:35 GMT</pubDate>
    <dc:creator>danbissler</dc:creator>
    <dc:date>2020-03-18T19:15:35Z</dc:date>
    <item>
      <title>SW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986026#M153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been working with the OM-SE050ARD demo board connected via the external I2C interface to a proprietary circuit card. I have generated an RSA-2048 key pair, and according to the APDU specification, I should be able to read the public key using the ReadSecureObject command and sign data using the RSASign command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have run tests in both a session-less and UserID session context. I have tried assigning policies to the keys, but from my understanding of the documentation, the default policy should be adequate (default secure object policy is full access, except attestation. This would mean read, write, generate, delete, sign, verify, encrypt, decrypt, etc.) as I only am attempting to read and sign right now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To read the RSA public key modulus, the APDU command is as follows&lt;/P&gt;&lt;P&gt;80 02 00 00 09 41 04 00 00 00 01 44 01 00 00&lt;/P&gt;&lt;P&gt;CLA = 80&lt;/P&gt;&lt;P&gt;INS = INS_READ&lt;/P&gt;&lt;P&gt;P1 = P1_DEFAULT&lt;/P&gt;&lt;P&gt;P2 = P2_DEFAULT&lt;/P&gt;&lt;P&gt;Lc = 09&lt;/P&gt;&lt;P&gt;TAG_1 04 00 00 00 01 (object id = 0x00000001)&lt;/P&gt;&lt;P&gt;TAG_4 01 00 (RSA_COMP_MOD)&lt;/P&gt;&lt;P&gt;Lc = 0&lt;/P&gt;&lt;P&gt;TAG_2, TAG_3, TAG_5-TAG_7 are optional and do not apply to RSA keys&lt;/P&gt;&lt;P&gt;In response I receive 69 85, SW_CONDITIONS_NOT_SATISFIED. I get this regardless of whether the keys have the default policy or an explicit policy set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, when I try to sign some random data, I get the same result of SW_CONDITIONS_NOT_SATISFIED. The command for that is as follows:&lt;/P&gt;&lt;P&gt;80 03 0c 09 2b 41 04 00 00 00 01 42 01 28 43 20 69 47 56 c0 a4 1d 6b 60 69 43 74 63 1c a3 80 7b 87 f3 5b 48 9e dd 82 9c 75 6b b3 32 ba e6 17 5d 00&lt;/P&gt;&lt;P&gt;CLA = 80&lt;/P&gt;&lt;P&gt;INS = INS_CRYPTO&lt;/P&gt;&lt;P&gt;P1 = P1_SIGNATURE&lt;/P&gt;&lt;P&gt;P2 = P2_SIGN&lt;/P&gt;&lt;P&gt;Lc = 2B&lt;/P&gt;&lt;P&gt;TAG_1 04 00 00 00 01 (object id = 0x00000001)&lt;/P&gt;&lt;P&gt;TAG_2 01 28 (RSASignatureAlgo = RSA_SHA_256_PKCS1)&lt;/P&gt;&lt;P&gt;TAG_3 20&amp;nbsp;&lt;SPAN&gt;69 47 56 c0 a4 1d 6b 60 69 43 74 63 1c a3 80 7b 87 f3 5b 48 9e dd 82 9c 75 6b b3 32 ba e6 17 5d (data)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Le 00&lt;/P&gt;&lt;P&gt;Here I get SW_CONDITIONS_NOT_SATISFIED as well regardless of whether I use the default policy or an explicitly set policy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The applet version is 3.1.0 and applet config is 0x6FFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What other conditions would need satisfied to read the RSA public key components or sign using a generated RSA private key?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2020 19:15:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986026#M153</guid>
      <dc:creator>danbissler</dc:creator>
      <dc:date>2020-03-18T19:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: SW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986027#M154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you create the RSA key pair correctly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An RSA key creation requires multiple ADPUs to be sent:&lt;BR /&gt;• The first APDU must contain:&lt;BR /&gt;– Policy (optional, so only if non-default applies)&lt;BR /&gt;– Object identifier&lt;BR /&gt;– Key size&lt;BR /&gt;– 1 of the key components.&lt;BR /&gt;• Each next APDU must contain 1 of the key components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We provide an example for RSAsign operation as well, you may refer to "ex_sss_rsa" for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 08:07:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986027#M154</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2020-03-23T08:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: SW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986028#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The keys should have been generated on chip. The command APDU was as follows&lt;/P&gt;&lt;P&gt;80 01 62 4f 0a 41 04&amp;nbsp;00&amp;nbsp;00 00 01 42 02 08 00&lt;/P&gt;&lt;P&gt;CLA = 80&lt;/P&gt;&lt;P&gt;INS&amp;nbsp;= 01 (INS_WRITE)&lt;/P&gt;&lt;P&gt;P1 = 62 (P1_KEY_PAIR | P1_RSA)&lt;/P&gt;&lt;P&gt;P2 = 4F (P2_RAW, according to AN 123413 Rev 2.8, "P2_RAW only in case P1KeyType = P1_KEY_PAIR and TLV[TAG_3] until TLV[TAG_10] must be empty and the SE050 must generate a raw RSA key pair")&lt;/P&gt;&lt;P&gt;LEN = 0A&lt;/P&gt;&lt;P&gt;TLV[TAG_1] (object ID), len = 4, 00 00 00 01&lt;/P&gt;&lt;P&gt;TLV[TAG_2] (RSABitLength), len 2, 80 00 (2048-bit keys)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No policy was set.&lt;/P&gt;&lt;P&gt;This also&amp;nbsp;looks like it would match the behavior of&amp;nbsp;sss_se05x_key_store_generate_key where Se05x_API_WriteRSAKey is called with SE05X_RSA_NO_p/q/dp/dq/qInv/pubExp/priv/pubMod are passed in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this not the correct way to generate keys on chip?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 11:45:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986028#M155</guid>
      <dc:creator>danbissler</dc:creator>
      <dc:date>2020-03-23T11:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: SW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986029#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The key generation should be ok, and I can reproduce your issue here but&amp;nbsp;RSA_COMP_PUB_EXP can be successfully fetched.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; smCom:DEBUG:H&amp;gt; (Len=4)&lt;BR /&gt; 01 00 00 0F&lt;BR /&gt; smCom:DEBUG:Tx&amp;gt; (Len=15)&lt;BR /&gt; 80 02 00 00 09 41 04 00 00 00 01 44 01 01 00&lt;BR /&gt; smCom:DEBUG:&amp;lt;H (Len=4)&lt;BR /&gt; 01 00 00 09&lt;BR /&gt; smCom:DEBUG:&amp;lt;Rx (Len=9)&lt;BR /&gt; 41 82 00 03 01 00 01 90 00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will investigate it further and let you know the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 07:57:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986029#M156</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2020-03-26T07:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: SW_CONDITIONS_NOT_SATISFIED when reading RSA key pair or executing RSASign operations</title>
      <link>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986030#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is due to the answer to read the public key of RSA2028 is 262 bytes long - so it does not fit inside a standard length APDU and it needs to be sent as extended length APDU to allow response longer than 256 bytes as LC and LE bytes are now longer:&lt;/P&gt;&lt;P&gt;800200000000094104000000014401000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 02:35:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Secure-Authentication/SW-CONDITIONS-NOT-SATISFIED-when-reading-RSA-key-pair-or/m-p/986030#M157</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2020-04-01T02:35:09Z</dc:date>
    </item>
  </channel>
</rss>

