<?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: Question about Hashcrypt in LPC55S69 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587856#M51386</link>
    <description>&lt;P&gt;hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/204744"&gt;@mat1024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;My apologies, but this example is from mbed, so you need to check it with the community correspondent &lt;A href="https://os.mbed.com/forum/" target="_blank"&gt;https://os.mbed.com/forum/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 18:32:12 GMT</pubDate>
    <dc:creator>CarlosGarabito</dc:creator>
    <dc:date>2023-01-25T18:32:12Z</dc:date>
    <item>
      <title>Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1586892#M51358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use 'an elliptic curve' for signing and verifying in Trustzone,&lt;/P&gt;&lt;P&gt;but it seems that there is no example of it.&lt;/P&gt;&lt;P&gt;There is a benchmark using mbedTLS, so I've been trying to port it into my trustzone project,&lt;/P&gt;&lt;P&gt;but whenever I debugged, the board always was stuck in 'hashcrypt_sha_finalize', more specifically,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/* poll wait for final digest */
    while (0U == (base-&amp;gt;STATUS &amp;amp; HASHCRYPT_STATUS_DIGEST_MASK))
    {
    }&lt;/LI-CODE&gt;&lt;P&gt;I searched what this status means, but I couldn't find meaningful results.&lt;/P&gt;&lt;P&gt;Any comments would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me specify what I have done in the program.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy and paste 'lpcxpresso55s69_mbedtls_benchmark' project into my project&lt;/LI&gt;&lt;LI&gt;Due to the size limitation of secure flash memory, increase the flash size in build setting and adjust secure flash memory and non-secure flash memory in TZ setting&lt;/LI&gt;&lt;LI&gt;Call functions from the example, in order,&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;CRYPTO_InitHardware()&lt;/LI&gt;&lt;LI&gt;mbedtls_ecdsa_init( &amp;amp;ecdsa )&lt;/LI&gt;&lt;LI&gt;mbedtls_ecdsa_genkey( &amp;amp;ecdsa, curve_info-&amp;gt;grp_id, myrand, NULL )&lt;/LI&gt;&lt;LI&gt;mbedtls_ecdsa_write_signature( &amp;amp;ecdsa, MBEDTLS_MD_SHA256, buf, curve_info-&amp;gt;bit_size, tmp, &amp;amp;sig_len, myrand, NULL )&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Everything goes fine except for the last one,&amp;nbsp;mbedtls_ecdsa_write_signature().&lt;/P&gt;&lt;P&gt;During calling the function, it's stuck at the sha function as I mentioned above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for reading!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 01:52:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1586892#M51358</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-24T01:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587856#M51386</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/204744"&gt;@mat1024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Montserrat; font-size: 12.0pt;" lang="es-MX"&gt;My apologies, but this example is from mbed, so you need to check it with the community correspondent &lt;A href="https://os.mbed.com/forum/" target="_blank"&gt;https://os.mbed.com/forum/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 18:32:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587856#M51386</guid>
      <dc:creator>CarlosGarabito</dc:creator>
      <dc:date>2023-01-25T18:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587908#M51388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/195771"&gt;@CarlosGarabito&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for reaching me out.&lt;/P&gt;&lt;P&gt;I'm sorry that I forgot to demonstrate a few things.&lt;/P&gt;&lt;P&gt;The original example code worked well, which means that there is likely some configuration mismatched in my project, and that's why I asked the question here.&lt;/P&gt;&lt;P&gt;Configuration in software of my code (initializing power/clk/drivers) looks very similar with the one in the example.&lt;/P&gt;&lt;P&gt;So here's what I am thinking about the problem.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;My program runs in Trustzone, and there is something I missed in the configuration&lt;UL&gt;&lt;LI&gt;I increased the secure flash memory, adjusted the location of non-secure flash memory, and modified the secure regions in TEE setting&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The memory used by Hashcrypt has conflicted with the memory used by other codes in my project&lt;/LI&gt;&lt;LI&gt;Defined symbols and included header files might be different from the one in the example code&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The next step I would like to try is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Get rid of other codes in TZ in my code and use only codes from the example in TZ, or&lt;/LI&gt;&lt;LI&gt;Move all the codes from the example to the normal world&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I will update after having a try.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 19:21:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587908#M51388</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-25T19:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587921#M51389</link>
      <description>&lt;P&gt;Also, the reason why I asked the question about "&lt;SPAN&gt;hashcrypt_sha_finalize()" is that it would be greatly helpful to me to guess what I missed if I get a hint for that part.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is no information I found about the status bit of Hashcrypt, so any comments about this also very useful to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 19:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1587921#M51389</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-25T19:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1588003#M51391</link>
      <description>&lt;P&gt;I tried to do the following two steps,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Get rid of other codes in TZ in my code and use only codes from the example in TZ, or&lt;/LI&gt;&lt;LI&gt;Move all the codes from the example to the normal world&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and found that the first way did not work; although I removed all other codes except for the crypto codes from the example, it was still stuck at the aforementioned function.&lt;/P&gt;&lt;P&gt;The second way works well, which means that it is likely to take place since I put the code into the secure world.&lt;/P&gt;&lt;P&gt;Is there any code to use crypto functions in Trustzone for LPC55s69 boards?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 21:09:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1588003#M51391</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-25T21:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1588099#M51394</link>
      <description>&lt;P&gt;I think I found the reason why it has taken place.&lt;/P&gt;&lt;P&gt;In the SHA functions in fsl_hashcrypt.c file,&lt;/P&gt;&lt;P&gt;if "base-&amp;gt;MEMADDR", which is the address of being hashed, is set to non-secure regions, then it works well, but if&amp;nbsp;base-&amp;gt;MEMADDR is set to secure regions, then the value of "base-&amp;gt;MEMCTRL" is remained as 0 which makes "base-&amp;gt;STATUS" 5.&lt;/P&gt;&lt;P&gt;"base-&amp;gt;STATUS" should've been set to 3 in order to pass the infinite loop.&lt;/P&gt;&lt;P&gt;Could you let me know why this happens? Does this mean that I should use non-secure memory for the message which can be an input for signing?&lt;/P&gt;&lt;P&gt;Are there any related documents?&lt;/P&gt;&lt;P&gt;Any comments would be appreciated a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:04:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1588099#M51394</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-26T01:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Hashcrypt in LPC55S69</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1590849#M51472</link>
      <description>&lt;P&gt;Solved!&lt;/P&gt;&lt;P&gt;Please refer to this post for more details.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/Likely-a-bug-in-HashCrypt-in-TZ/m-p/1590224/highlight/false#M51452" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/Likely-a-bug-in-HashCrypt-in-TZ/m-p/1590224/highlight/false#M51452&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 23:32:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Question-about-Hashcrypt-in-LPC55S69/m-p/1590849#M51472</guid>
      <dc:creator>mat1024</dc:creator>
      <dc:date>2023-01-31T23:32:47Z</dc:date>
    </item>
  </channel>
</rss>

