<?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>How to compute MD5 checksum?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113750/how-to-compute-md5-checksum</link><description>Hi all, 
 I am developing a project with the nRF52840, using nRF Connect SDK 2.6.1 in Visual Studio Code. 
 I need to be able to compute an MD5 checksum for a dependency. I understand that MD5 is not considered secure, but security is not really at issue</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Aug 2024 20:26:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113750/how-to-compute-md5-checksum" /><item><title>RE: How to compute MD5 checksum?</title><link>https://devzone.nordicsemi.com/thread/497684?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 20:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c40b4a2e-340d-43a4-9a91-e4685f6bd92c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="cscase"]What does&amp;nbsp;CONFIG_NORDIC_SECURITY_BACKEND=y do and why do I need it? Is it documented anywhere? [/quote]
&lt;p&gt;&lt;span&gt;To configure the legacy Mbed TLS APIs, set the option&amp;nbsp;&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NORDIC_SECURITY_BACKEND"&gt;&lt;code&gt;&lt;span&gt;CONFIG_NORDIC_SECURITY_BACKEND&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
[quote user="cscase"]Why am I able to include mbedtls/md5.h? [/quote]
&lt;p&gt;&lt;span&gt;Because you enable &lt;a href="https://docs.nordicsemi.com/bundle/ncs-1.9.2-dev1/page/kconfig/CONFIG_MBEDTLS_MD5_C.html#std-kconfig-CONFIG_MBEDTLS_MD5_C"&gt;MBEDTLS_MD5_C&lt;/a&gt;&amp;nbsp;by default in the kconfig.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compute MD5 checksum?</title><link>https://devzone.nordicsemi.com/thread/497514?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 16:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb98c745-1676-40ee-8f06-7e950e9dfd0d</guid><dc:creator>cscase</dc:creator><description>&lt;p&gt;I think I was able to get it working. Here&amp;#39;s the information I needed, for reference. To use the MD5 functionality in the mbedtls stuff, I needed to:&lt;/p&gt;
&lt;p&gt;1) Put this in my prj.conf. I don&amp;#39;t know what it does, why it is necessary, or where/if it is documented (??).&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_NORDIC_SECURITY_BACKEND&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;2) Put this in my kconfig.zephyr, at the top of the file:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;MBEDTLS_MD5_C&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;In project definition&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;default&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;3) Put this in my includes in the file where I want to use the MD5 functions. Initially, it shows red squiggles underneath and says the file is not found, but after doing a build suddenly it&amp;#39;s ok. I don&amp;#39;t know why this is. (??)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;mbedtls/md5.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I think it is working because I can use the code below, as from the example zip you pointed at, and it doesn&amp;#39;t give build errors:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;mbedtls_md5_context&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ctx&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;mbedtls_md5_init&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;ctx&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So, I guess I&amp;#39;m good. I hate this about Zephyr and the Connect SDK, though: Sometimes there are mysterious config options I need to include to make something work, and apart from just posting on devzone to ask, I don&amp;#39;t know how I&amp;#39;m supposed to find this stuff out.&amp;nbsp;What does&amp;nbsp;CONFIG_NORDIC_SECURITY_BACKEND=y do and why do I need it? Is it documented anywhere? Why am I able to include mbedtls/md5.h? What path is that relative to? It&amp;#39;s not where my other includes like kernel.h are, so I don&amp;#39;t get why that works here.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compute MD5 checksum?</title><link>https://devzone.nordicsemi.com/thread/497506?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 15:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a3ecf0e-d936-47f2-8656-1d0be248002a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/96587/nrf9160-hash-md5-calculation/411839"&gt;my colleague&amp;#39;s sample in this post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>