<?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: RT685: SDK 25.12 no HASHCRYPT acceleration in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2322719#M36246</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196828"&gt;@hrc-amilcar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for your patience with this question. I just received the response from the internal team, please see below.&lt;/P&gt;
&lt;P&gt;From the call stack I can see you are using legacy mbedtls_xxx crypto API. Indeed, it is not HW accelerated. MbedTLS3.x introduced new API for Crypto, and it is PSA. &lt;A id="menur13sh" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="https://github.com/mbed-tls/mbedtls/blob/v3.6.5/docs/psa-transition.md#transitioning-to-the-psa-api" href="https://github.com/Mbed-TLS/mbedtls/blob/v3.6.5/docs/psa-transition.md#transitioning-to-the-psa-api" rel="noreferrer noopener" aria-label="Link mbedtls/docs/psa-transition.md at v3.6.5 · Mbed-TLS/mbedtls · GitHub" target="_blank"&gt;mbedtls/docs/psa-transition.md at v3.6.5 · Mbed-TLS/mbedtls · GitHub&lt;/A&gt; and it is accelerated.&amp;nbsp;Legacy crypto API is further removed in MbedTLS4.x.&lt;/P&gt;
&lt;P&gt;I checked our psa_crypto_examples in SDK for RT600 and HASHCRYPT HW acceleration is enabled by default by having the &lt;STRONG&gt;PSA_CRYPTO_DRIVER_HASHCRYPT&lt;/STRONG&gt; defined which enables crypto driver wrappers to offload crypto computation to HW. On the other hand, MbedTLS3.x+ is more complex and aligned with PSA API specification so it may happen that some use-cases are indeed producing lower performance. In case of TLS I would expect rather asymmetric cryptography (CASPER HW IP) to be bottleneck of performance, since this IP can support only bignum acceleration and it is not well compatible with PSA API that expect HW IP to implement whole algorithm. We did our best to accelerate at least some ECC operations (sign, verify) but it may happen that other operation like keygen during ECDHE key exchange may be worse.&lt;/P&gt;
&lt;P&gt;Now it would be good if you can use the PSA API for performance measurement and confirm that PSA_CRYPTO_DRIVER_HASHCRYPT is defined and call stack uses it. FYI: Hashcrypt did not offer AES-GCM acceleration natively, so it is better to benchmark AES-CBC or AES-CTR to see real gain of HW IP.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2026 21:50:37 GMT</pubDate>
    <dc:creator>EdwinHz</dc:creator>
    <dc:date>2026-02-25T21:50:37Z</dc:date>
    <item>
      <title>RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318362#M36192</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We recently updated to SDK 25.12 and noticed that our TLS decryption rate has been cut in half.&lt;/P&gt;&lt;P&gt;mbedTLS v3.x is no longer accelerated using the &lt;STRONG&gt;fsl_hashcrypt&lt;/STRONG&gt; hardware features.&lt;/P&gt;&lt;P&gt;Here is the callstack of calling &lt;STRONG&gt;mbedtls_ssl_read&lt;/STRONG&gt; using the previous SDK 25.09. As you can see,&amp;nbsp;&lt;STRONG&gt;HASHCRYPT_AES_EncryptEcb&lt;/STRONG&gt; is eventually used.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hashcrypt_aes_one_block_aligned() at fsl_hashcrypt.c:437
hashcrypt_aes_one_block() at fsl_hashcrypt.c:581
HASHCRYPT_AES_EncryptEcb() at fsl_hashcrypt.c:1,284
mbedtls_internal_aes_encrypt() at aes_alt.c:1,959
mbedtls_aes_crypt_ecb() at aes_alt.c:1,323
aes_crypt_ecb_wrap() at cipher_wrap.c:114
mbedtls_cipher_update() at cipher.c:521
mbedtls_gcm_update() at gcm.c:358
mbedtls_gcm_crypt_and_tag() at gcm.c:456
mbedtls_gcm_auth_decrypt() at gcm.c:491
mbedtls_cipher_aead_decrypt() at cipher.c:1,407
mbedtls_cipher_auth_decrypt_ext() at cipher.c:1,613
mbedtls_ssl_decrypt_buf() at ssl_msg.c:1,242
ssl_prepare_record_content() at ssl_msg.c:3,667
ssl_get_next_record() at ssl_msg.c:4,551
mbedtls_ssl_read_record() at ssl_msg.c:3,817
mbedtls_ssl_read() at ssl_msg.c:5,237
&amp;lt;...more frames...&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the callstack of SDK 25.12 with&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;MBEDTLS_USE_PSA_CRYPTO&lt;/STRONG&gt; defined. In this version,&amp;nbsp;&lt;STRONG&gt;mbedtls_internal_aes_encrypt&lt;/STRONG&gt; is all C code with no HW acceleration.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mbedtls_internal_aes_encrypt() at aes.c:894
mbedtls_aes_crypt_ecb() at aes.c:1,062
aes_crypt_ecb_wrap() at cipher_wrap.c:166
mbedtls_cipher_update() at cipher.c:611
gcm_mask() at gcm.c:546
mbedtls_gcm_update() at gcm.c:641
mbedtls_gcm_crypt_and_tag() at gcm.c:726
mbedtls_gcm_auth_decrypt() at gcm.c:753
mbedtls_psa_aead_decrypt() at psa_crypto_aead.c:270
psa_driver_wrapper_aead_decrypt() at psa_crypto_driver_wrappers.h:4,114
psa_aead_decrypt() at psa_crypto.c:5,023
mbedtls_ssl_decrypt_buf() at ssl_msg.c:1,625
ssl_prepare_record_content() at ssl_msg.c:4,093
ssl_get_next_record() at ssl_msg.c:5,068
mbedtls_ssl_read_record() at ssl_msg.c:4,323
mbedtls_ssl_read() at ssl_msg.c:5,983
&amp;lt;...more frames...&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the callstack of SDK 25.12 without&lt;SPAN&gt;&lt;STRONG&gt;MBEDTLS_USE_PSA_CRYPTO&lt;/STRONG&gt;&lt;/SPAN&gt; defined. In this version,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;mbedtls_internal_aes_encrypt&lt;/STRONG&gt; is all C code with no HW acceleration and PSA is not involved.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mbedtls_internal_aes_encrypt() at aes.c:899
mbedtls_aes_crypt_ecb() at aes.c:1,062
aes_crypt_ecb_wrap() at cipher_wrap.c:166
mbedtls_cipher_update() at cipher.c:611
gcm_mask() at gcm.c:546
mbedtls_gcm_update() at gcm.c:628
mbedtls_gcm_crypt_and_tag() at gcm.c:726
mbedtls_gcm_auth_decrypt() at gcm.c:753
mbedtls_cipher_aead_decrypt() at cipher.c:1,528
mbedtls_cipher_auth_decrypt_ext() at cipher.c:1,674
mbedtls_ssl_decrypt_buf() at ssl_msg.c:1,639
ssl_prepare_record_content() at ssl_msg.c:4,093
ssl_get_next_record() at ssl_msg.c:5,068
mbedtls_ssl_read_record() at ssl_msg.c:4,323
mbedtls_ssl_read() at ssl_msg.c:5,983
&amp;lt;...more frames...&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there plans to restore RT685 HASHCRYPT hardware acceleration to mbedTLS? It seems certain PSA Crypto drivers are not implemented.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Feb 2026 17:53:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318362#M36192</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-02-15T17:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318767#M36197</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196828"&gt;@hrc-amilcar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Did you make any changes after updating the SDK? Do you also see this behavior with the SDK's example code? Are you using the standalone IDE or the VS Code extension?&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2026 21:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318767#M36197</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2026-02-16T21:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318783#M36199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186731"&gt;@EdwinHz&lt;/a&gt;,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We're using MCUXpresso IDE.&lt;/LI&gt;&lt;LI&gt;No extra changes after updating the SDK:&lt;UL&gt;&lt;LI&gt;When we update the SDK, we re-run the "SDK Management" -&amp;gt; "Refresh SDK components" to get new and&amp;nbsp;updated files.&lt;/LI&gt;&lt;LI&gt;Then we compare the .cproject configuration to one of the samples that has similar features enabled (e.g. evkmimxrt685_wifi_wpa_supplicant_cm33)&lt;UL&gt;&lt;LI&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PSA_CRYPTO_DRIVER_CASPER=1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PSA_CRYPTO_DRIVER_HASHCRYPT=1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CONFIG_WPA_SUPP_CRYPTO_MBEDTLS_PSA=1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;etc...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;We're using the default&amp;nbsp;&lt;STRONG&gt;mcux_mbedtls_config.h&lt;/STRONG&gt; as the main mbedTLS configuration header and our own user configuration file that is nearly identical to&amp;nbsp;&lt;STRONG&gt;wpa_supp_mbedtls_config.h&lt;/STRONG&gt; from the&amp;nbsp;&lt;STRONG&gt;evkmimxrt685_wifi_wpa_supplicant_cm33&lt;/STRONG&gt; example.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I will try the mbedtls3x_examples to see how they behave. Perhaps we're missing some defines.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;As I was stepping through the code, I noticed that perhaps&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;MBEDTLS_BLOCK_CIPHER_C&lt;/STRONG&gt; needs to be defined so that the gcm operation can be accelerated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It looks like the header&amp;nbsp;&lt;STRONG&gt;mbedtls3x/include/mbedtls/config_adjust_legacy_crypto.h&lt;/STRONG&gt; is responsible for this but doesn't end up defining that macro for some reason.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2026 21:56:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318783#M36199</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-02-16T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318804#M36201</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I defined&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;MBEDTLS_PSA_ACCEL_KEY_TYPE_AES&lt;/STRONG&gt; in our mbedTLS configuration file and now it's calling through to HASHCRYPT, but our &lt;STRONG&gt;mbedtls_ssl_read&lt;/STRONG&gt; read rate is even slower now. I wonder if there are other missing defines or the PSA layer is adding extra overhead.&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rates downloading 4KB packets from WiFi via a TLS socket:&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;SDK 25.09: 205KB/sec (mbedTLS 2.x without PSA and with ksdk port files)&lt;/LI&gt;&lt;LI&gt;SDK 25.12: 138KB/sec (without MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)&lt;/LI&gt;&lt;LI&gt;SDK 25.12: 125KB/sec (with MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;SPAN&gt;Here's the new callstack using&amp;nbsp;MBEDTLS_PSA_ACCEL_KEY_TYPE_AES:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;HASHCRYPT_AES_EncryptEcb() at fsl_hashcrypt.c:1,255
hashcrypt_cipher_encrypt() at mcux_psa_hashcrypt_common_cipher.c:203
psa_driver_wrapper_cipher_encrypt() at psa_crypto_driver_wrappers.h:2,353
psa_cipher_encrypt() at psa_crypto.c:4,766
mbedtls_block_cipher_encrypt() at block_cipher.c:177
gcm_mask() at gcm.c:543
mbedtls_gcm_update() at gcm.c:628
mbedtls_gcm_crypt_and_tag() at gcm.c:726
mbedtls_gcm_auth_decrypt() at gcm.c:753
mbedtls_psa_aead_decrypt() at psa_crypto_aead.c:270
psa_driver_wrapper_aead_decrypt() at psa_crypto_driver_wrappers.h:4,114
psa_aead_decrypt() at psa_crypto.c:5,023
mbedtls_ssl_decrypt_buf() at ssl_msg.c:1,625
ssl_prepare_record_content() at ssl_msg.c:4,093
ssl_get_next_record() at ssl_msg.c:5,068
mbedtls_ssl_read_record() at ssl_msg.c:4,323
mbedtls_ssl_read() at ssl_msg.c:5,983
&amp;lt;...more frames...&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 Feb 2026 22:46:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2318804#M36201</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-02-16T22:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2319693#M36216</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196828"&gt;@hrc-amilcar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Migrating from &lt;SPAN&gt;mbedTLS 2.x (without PSA) to mbedTLS 3.x (with PSA) is bound to have performance drops, considering that:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"The PSA Driver Interface has only been partially implemented. As a result, the deliverables for writing a driver and the method for integrating a driver with Mbed TLS will vary depending on the operation being accelerated." &lt;/EM&gt;(&lt;A href="https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/mbedtls3x/docs/psa-driver-example-and-guide.html)" target="_blank"&gt;https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/mbedtls3x/docs/psa-driver-example-and-guide.html)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;At the moment, the best I can recommend is to follow the guidelines on how to properly migrate from 2.x to 3.x: &lt;A href="https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/mbedtls3x/docs/3.0-migration-guide.html" target="_blank"&gt;Migrating from Mbed TLS 2.x to Mbed TLS 3.0 — MCUXpresso SDK Documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As well as the guide to properly transition to the PSA API:&amp;nbsp;&lt;A href="https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/mbedtls3x/docs/psa-transition.html" target="_blank"&gt;Transitioning to the PSA API — MCUXpresso SDK Documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I apologize for the inconvenience.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 18:14:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2319693#M36216</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2026-02-18T18:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2319993#M36218</link>
      <description>Hi Edwin,&lt;BR /&gt;&lt;BR /&gt;We have looked over the migration guide. However, we don't see how mbedTLS 2.x or mbedTLS 3.x without PSA would be hardware accelerated in this version of the SDK. Since aes_alt.c was removed and HASHCRYPT functionality is only supported by the PSA drivers.&lt;BR /&gt;&lt;BR /&gt;Everything works in our app with SDK 25.12, and we would definitely like to use TLS 1.3 for our connections, but we would suffer a large performance loss as it is.&lt;BR /&gt;&lt;BR /&gt;We will continue to look into this. I will modify one of the examples to see if I can reproduce the performance loss.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Amilcar</description>
      <pubDate>Thu, 19 Feb 2026 00:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2319993#M36218</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-02-19T00:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2321510#M36235</link>
      <description>&lt;P&gt;Hi Edwin,&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I reproduced the issue on the EVK. I modified two samples by adding a loop of 200 iterations of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;mbedtls_gcm_self_test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and timed the overall execution using the RTC clock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;evkmimxrt685_mbedtls_selftest_cm33&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from SDK 25.09 executed the tests in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;1087ms&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with this callstack:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;HASHCRYPT_AES_EncryptEcb() at fsl_hashcrypt.c:1,260
mbedtls_internal_aes_encrypt() at aes_alt.c:1,959
mbedtls_aes_crypt_ecb() at aes_alt.c:1,323
aes_crypt_ecb_wrap() at cipher_wrap.c:114
mbedtls_cipher_update() at cipher.c:521
mbedtls_gcm_starts() at gcm.c:294
mbedtls_gcm_crypt_and_tag() at gcm.c:452
mbedtls_gcm_self_test() at gcm.c:826&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;evkmimxrt685_mbedtls3x_psatest_cm33&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from SDK 25.12 executed the test in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;8990ms&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with this callstack:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mbedtls_internal_aes_encrypt() at aes.c:896
mbedtls_aes_crypt_ecb() at aes.c:1,062
aes_crypt_ecb_wrap() at cipher_wrap.c:166
mbedtls_cipher_update() at cipher.c:611
mbedtls_gcm_starts() at gcm.c:441
mbedtls_gcm_crypt_and_tag() at gcm.c:718
mbedtls_gcm_self_test() at gcm.c:1,075&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;evkmimxrt685_mbedtls3x_psatest_cm33&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from SDK 25.12 with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;MBEDTLS_PSA_ACCEL_KEY_TYPE_AES&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;defined executed the test in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;8744ms&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with this callstack:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;HASHCRYPT_AES_EncryptEcb() at fsl_hashcrypt.c:1,255
hashcrypt_cipher_encrypt() at mcux_psa_hashcrypt_common_cipher.c:187
psa_driver_wrapper_cipher_encrypt() at psa_crypto_driver_wrappers.h:2,353
psa_cipher_encrypt() at psa_crypto.c:4,766
mbedtls_block_cipher_encrypt() at block_cipher.c:177
mbedtls_gcm_starts() at gcm.c:439
mbedtls_gcm_crypt_and_tag() at gcm.c:718
mbedtls_gcm_self_test() at gcm.c:1,075&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The gist of the modifications to the examples is the following:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;BOARD_InitHardware();
test_rtc_init();
psa_crypto_init();

uint64_t ms_start = test_rtc_get_msecs();
for (int i = 0; i &amp;lt; 200; ++i)
{
    PRINTF("test iteration %d\r\n", i+1);
    mbedtls_gcm_self_test(0);
}
uint64_t ms_end = test_rtc_get_msecs();
PRINTF("test time = %ums\r\n", (unsigned)(ms_end - ms_start));&lt;/LI-CODE&gt;&lt;P&gt;... where &lt;STRONG&gt;test_rtc_get_msecs&lt;/STRONG&gt; returns the current RTC time using subsecond accuracy.&lt;/P&gt;&lt;P&gt;As you can see, there is an ~8x slow down for encrypting GCM/AES with the new SDK.&lt;/P&gt;&lt;P&gt;I can attach the modified examples if you'd like.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Amilcar&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2026 23:04:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2321510#M36235</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-02-23T23:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2322719#M36246</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196828"&gt;@hrc-amilcar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for your patience with this question. I just received the response from the internal team, please see below.&lt;/P&gt;
&lt;P&gt;From the call stack I can see you are using legacy mbedtls_xxx crypto API. Indeed, it is not HW accelerated. MbedTLS3.x introduced new API for Crypto, and it is PSA. &lt;A id="menur13sh" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="https://github.com/mbed-tls/mbedtls/blob/v3.6.5/docs/psa-transition.md#transitioning-to-the-psa-api" href="https://github.com/Mbed-TLS/mbedtls/blob/v3.6.5/docs/psa-transition.md#transitioning-to-the-psa-api" rel="noreferrer noopener" aria-label="Link mbedtls/docs/psa-transition.md at v3.6.5 · Mbed-TLS/mbedtls · GitHub" target="_blank"&gt;mbedtls/docs/psa-transition.md at v3.6.5 · Mbed-TLS/mbedtls · GitHub&lt;/A&gt; and it is accelerated.&amp;nbsp;Legacy crypto API is further removed in MbedTLS4.x.&lt;/P&gt;
&lt;P&gt;I checked our psa_crypto_examples in SDK for RT600 and HASHCRYPT HW acceleration is enabled by default by having the &lt;STRONG&gt;PSA_CRYPTO_DRIVER_HASHCRYPT&lt;/STRONG&gt; defined which enables crypto driver wrappers to offload crypto computation to HW. On the other hand, MbedTLS3.x+ is more complex and aligned with PSA API specification so it may happen that some use-cases are indeed producing lower performance. In case of TLS I would expect rather asymmetric cryptography (CASPER HW IP) to be bottleneck of performance, since this IP can support only bignum acceleration and it is not well compatible with PSA API that expect HW IP to implement whole algorithm. We did our best to accelerate at least some ECC operations (sign, verify) but it may happen that other operation like keygen during ECDHE key exchange may be worse.&lt;/P&gt;
&lt;P&gt;Now it would be good if you can use the PSA API for performance measurement and confirm that PSA_CRYPTO_DRIVER_HASHCRYPT is defined and call stack uses it. FYI: Hashcrypt did not offer AES-GCM acceleration natively, so it is better to benchmark AES-CBC or AES-CTR to see real gain of HW IP.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 21:50:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2322719#M36246</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2026-02-25T21:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: RT685: SDK 25.12 no HASHCRYPT acceleration</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2330856#M36353</link>
      <description>&lt;P&gt;For others' benefit...&lt;/P&gt;&lt;P&gt;It appears that&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;mbedtls_xor&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;from mbedTLS 3.x is&amp;nbsp;&lt;/SPAN&gt;looping over data 4-bytes at a time and calling&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;mbedtls_get_unaligned_uint32&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;mbedtls_put_unaligned_uint32&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which both use memcpy for a single uint32.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;I recognize that the authors of mbedTLS are trying to improve performance by calculating blocks of XOR 4-bytes at a time (with a remainder loop), but the full calls to memcpy are actually making the code slower.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;After some investigation into the disassembly, i&lt;/SPAN&gt;&lt;/SPAN&gt;t turns out that our project was being compiled with -fno-builtin, preventing small memcpys from getting inlined by the compiler.&lt;/P&gt;&lt;P&gt;Removing that option restored much of the performance loss of HASHCRYPT hardware not being used for AES-GCM operations. So, the example I posted went from executing in 8600ms down to 2100ms. Not quite at the level of mbedTLS 2.x + ksdk alt (at 1087ms). But the restored performance is good enough.&lt;/P&gt;&lt;P&gt;-Amilcar&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 18:59:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT685-SDK-25-12-no-HASHCRYPT-acceleration/m-p/2330856#M36353</guid>
      <dc:creator>hrc-amilcar</dc:creator>
      <dc:date>2026-03-11T18:59:05Z</dc:date>
    </item>
  </channel>
</rss>

