<?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>LPC MicrocontrollersのトピックDebug Authentication Respone LPC55Sxx</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1459979#M48818</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am having a problem with debug authentication on my LPC55S14 chip.&lt;BR /&gt;In the LPC55S1x/LPC551x User Manual (UM11295), section 51.7.4 describes Debug Authentication Response. I have a question regarding this. How to calculate the SIG?&lt;BR /&gt;I have a file with DCKpriv, DAR::DC, DAR::AB and DAC::CV (I know that the vector is changing.), but I don't understand this equation.&lt;BR /&gt;SIG = RSA_SIGN (DCKpriv,SHA256(DAR::DC II DAR::AB II DAR::CV))&lt;BR /&gt;Can you explain how this is calculated?&lt;BR /&gt;I cannot use CMSIS-DAP or the J-Link debugger (as described in Debug Authenticaton (AN13037)).&lt;BR /&gt;Thanks&lt;BR /&gt;Grzegorz&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 09:00:14 GMT</pubDate>
    <dc:creator>GrzegorzM</dc:creator>
    <dc:date>2022-05-19T09:00:14Z</dc:date>
    <item>
      <title>Debug Authentication Respone LPC55Sxx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1459979#M48818</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am having a problem with debug authentication on my LPC55S14 chip.&lt;BR /&gt;In the LPC55S1x/LPC551x User Manual (UM11295), section 51.7.4 describes Debug Authentication Response. I have a question regarding this. How to calculate the SIG?&lt;BR /&gt;I have a file with DCKpriv, DAR::DC, DAR::AB and DAC::CV (I know that the vector is changing.), but I don't understand this equation.&lt;BR /&gt;SIG = RSA_SIGN (DCKpriv,SHA256(DAR::DC II DAR::AB II DAR::CV))&lt;BR /&gt;Can you explain how this is calculated?&lt;BR /&gt;I cannot use CMSIS-DAP or the J-Link debugger (as described in Debug Authenticaton (AN13037)).&lt;BR /&gt;Thanks&lt;BR /&gt;Grzegorz&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 09:00:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1459979#M48818</guid>
      <dc:creator>GrzegorzM</dc:creator>
      <dc:date>2022-05-19T09:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Debug Authentication Respone LPC55Sxx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1464431#M48926</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/198717"&gt;@GrzegorzM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that you are doing excellent.&amp;nbsp;My apologies for the late reply!&lt;/P&gt;
&lt;P&gt;I also see that UM provides a pseudocode for the RSA signature equation (SIG). Which&amp;nbsp;is similar to the below MBEDTLS function :&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;
/**
 * \brief          This function performs a PKCS#1 v1.5 signature
 *                 operation (RSASSA-PKCS1-v1_5-SIGN).
 * \deprecated     It is deprecated and discouraged to call this function
 *                 in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
 *                 are likely to remove the \p mode argument and have it
 *                 implicitly set to #MBEDTLS_RSA_PRIVATE.
 *
 * \note           Alternative implementations of RSA need not support
 *                 mode being set to #MBEDTLS_RSA_PUBLIC and might instead
 *                 return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
 *
 * \param ctx      The initialized RSA context to use.
 * \param f_rng    The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
 *                 this is used for blinding and should be provided; see
 *                 mbedtls_rsa_private() for more. If \p mode is
 *                 #MBEDTLS_RSA_PUBLIC, it is ignored.
 * \param p_rng    The RNG context to be passed to \p f_rng. This may be \c NULL
 *                 if \p f_rng is \c NULL or doesn't need a context argument.
 * \param mode     The mode of operation. This must be either
 *                 #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
 * \param md_alg   The message-digest algorithm used to hash the original data.
 *                 Use #MBEDTLS_MD_NONE for signing raw data.
 * \param hashlen  The length of the message digest.
 *                 Ths is only used if \p md_alg is #MBEDTLS_MD_NONE.
 * \param hash     The buffer holding the message digest or raw data.
 *                 If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
 *                 buffer of length \p hashlen Bytes. If \p md_alg is not
 *                 #MBEDTLS_MD_NONE, it must be a readable buffer of length
 *                 the size of the hash corresponding to \p md_alg.
 * \param sig      The buffer to hold the signature. This must be a writable
 *                 buffer of length \c ctx-&amp;gt;len Bytes. For example, \c 256 Bytes
 *                 for an 2048-bit RSA modulus. A buffer length of
 *                 #MBEDTLS_MPI_MAX_SIZE is always safe.
 *
 * \return         \c 0 if the signing operation was successful.
 * \return         An \c MBEDTLS_ERR_RSA_XXX error code on failure.
 */
int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
                               int (*f_rng)(void *, unsigned char *, size_t),
                               void *p_rng,
                               int mode,
                               mbedtls_md_type_t md_alg,
                               unsigned int hashlen,
                               const unsigned char *hash,
                               unsigned char *sig );&lt;/LI-CODE&gt;
&lt;P&gt;Are you developing a custom debugger solution? Let me know if there is something else where we may help.&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 03:36:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1464431#M48926</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2022-05-26T03:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Debug Authentication Respone LPC55Sxx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1465507#M48947</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;BR /&gt;I have one more question. I am using MCUXpresso Secure Provisioning to create certificates and sign images. I am using the following keys when creating the image: ROT1: IMG1_1. How do I need to configure the config.yml file for such matched keys?&lt;/P&gt;&lt;P&gt;Currently I have following configuration and it does not work:&lt;BR /&gt;socc: 0x00000001&lt;BR /&gt;uuid: "00000000000000000000000000000000"&lt;BR /&gt;cc_socu: 0x03FF&lt;BR /&gt;cc_vu: 0x0000&lt;BR /&gt;cc_beacon: 0x0&lt;BR /&gt;rot_id: 0x0&lt;BR /&gt;rot_meta:&lt;BR /&gt;- ...\keys\ROT1_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT2_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT3_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT4_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;rotk: ...\keys\IMG1_1_sha256_2048_65537_v3_usr_key.pem&lt;BR /&gt;dck: ...\keys\rotk0_rsa_2048.pub&lt;/P&gt;&lt;P&gt;When I use the ROT1 key with the following configuration, everything works fine.&lt;BR /&gt;socc: 0x00000001&lt;BR /&gt;uuid: "00000000000000000000000000000000"&lt;BR /&gt;cc_socu: 0x03FF&lt;BR /&gt;cc_vu: 0x0000&lt;BR /&gt;cc_beacon: 0x0&lt;BR /&gt;rot_id: 0x0&lt;BR /&gt;rot_meta:&lt;BR /&gt;- ...\keys\ROT1_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT2_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT3_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;- ...\keys\ROT4_sha256_2048_65537_v3_ca_key.pub&lt;BR /&gt;rotk: ...\keys\ROT1_sha256_2048_65537_v3_ca_key.pem&lt;BR /&gt;dck: ...\keys\rotk0_rsa_2048.pub&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Grzegorz&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 10:46:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1465507#M48947</guid>
      <dc:creator>GrzegorzM</dc:creator>
      <dc:date>2022-05-27T10:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Debug Authentication Respone LPC55Sxx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1465724#M48950</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/198717"&gt;@GrzegorzM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to reply!&lt;/P&gt;
&lt;P&gt;I think that the&amp;nbsp;&lt;SPAN&gt;IMG1_1_sha256_2048_65537_v3_usr_key.pem does not form part of the ROT keys embedded into the MCU.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think that&amp;nbsp; you might&amp;nbsp;have used a similar command to generate the cmpa.bin&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;pfr generate-binary -c cmpa_config.yml -i -f keys\rot0_2048.pub -f keys\rot1_2048.pub -f keys\rot2_2048.pub -f keys\rot3_2048.pub -o cmpa.bin&lt;/LI-CODE&gt;
&lt;P&gt;Therefore the&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ROT1_sha256_2048_65537_v3_ca_key.pem (rot0_2048.pub in my above command) was embedded with the other ROT keys into CMPA bin.&amp;nbsp;&lt;/SPAN&gt;Then you should have flashed the CMPA.bin. So if ROT Key specified in the config.yml does not match with the ROT key flashed into CMPA the debug authentication will fail.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, let me know further about your issue.&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 17:45:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-Authentication-Respone-LPC55Sxx/m-p/1465724#M48950</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2022-05-27T17:45:33Z</dc:date>
    </item>
  </channel>
</rss>

