<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Using SHA256 certificate hasing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122515/using-sha256-certificate-hasing</link><description>Hello. 
 After some great struggles, we&amp;#39;ve managed to enable WiFi and encrypted socket + TLS connection to google.com and various websites. 
 Since then, we&amp;#39;ve been looking into having a r1.pem that contains all trusted certificates. Since that entails</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jul 2025 07:36:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122515/using-sha256-certificate-hasing" /><item><title>RE: Using SHA256 certificate hasing</title><link>https://devzone.nordicsemi.com/thread/541271?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 07:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08ce8d7-b5eb-4c0a-ae1d-d24c186b49e6</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi again Tudor&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So this problem is something that is a bit beyond what we would typically provide support with.&amp;nbsp;&lt;span&gt;It is not really an optimization supported by Mbed TLS nor Zephyr nor otherwise in NCS. You would of course be free to hack another solution, but it would be outside of the code we provide/support.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zephyr has &lt;a href="https://docs.zephyrproject.org/latest/connectivity/networking/api/tls_credentials_shell.html"&gt;this TLS credentials module&lt;/a&gt; to handle certs,&amp;nbsp;this takes full cert and as already pointed would need a lot of memory, but if we are talking about taking a shortcut to store only fingerprints (like eg. ESP is providing), this does sound like an idea.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That being said, I&amp;nbsp;am trying to ask around if anyone has any feedback on the methodology you explain here.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Elfving&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SHA256 certificate hasing</title><link>https://devzone.nordicsemi.com/thread/540789?ContentTypeID=1</link><pubDate>Sat, 28 Jun 2025 18:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27d98961-a9f3-4839-923a-996aec5612a5</guid><dc:creator>Tudor B.</dc:creator><description>&lt;p&gt;It&amp;#39;s not burning, but it would be great if we can get it done by the end of next week so that we don&amp;#39;t leave it like that for too long and forget what we were doing. :))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SHA256 certificate hasing</title><link>https://devzone.nordicsemi.com/thread/540608?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 14:23:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d786bb-42a1-4637-b1eb-232c3748d377</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi Tudor,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have to get back to you on this tomorrow or later this week - my go-to expert on this is currently a bit busy. Let me know if this is too urgent for that.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SHA256 certificate hasing</title><link>https://devzone.nordicsemi.com/thread/540538?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 07:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17965841-b605-49b6-8e0b-78ebc31afc89</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;Did you consider that most servers don&amp;#39;t include a copy of the root certificate in the certificate chain they send? With only a fingerprint, you won&amp;#39;t be able to verify the signature in the last certificate in the sent chain, if I&amp;#39;m not mistaken.&lt;/p&gt;
&lt;p&gt;You should instead create a minium binary file containing a sorted list of root certificates having the lookup key set to the subject name (in DER format). A hash of this could maybe also work. It&amp;#39;s enough if the value contains the raw public key and type (rsa, secp256r1 or secp384r1).&lt;/p&gt;
&lt;p&gt;Espressif uses this approach in their sdk: see&amp;nbsp;&lt;a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/protocols/esp_crt_bundle.html"&gt;docs.espressif.com/.../esp_crt_bundle.html&lt;/a&gt; and&amp;nbsp;&lt;a href="https://github.com/espressif/esp-idf/blob/master/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py."&gt;github.com/.../gen_crt_bundle.py.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>