<?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>nRF9160 LwM2M with mbedtls</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58817/nrf9160-lwm2m-with-mbedtls</link><description>Hello, basically I want my nRF9160 DK to establish a secure connection with DTLS by using mbedtls . 
 
 What I&amp;#39;m trying to do 
 I&amp;#39;m currently working with the LwM2M sample project for the nRF9160. With the CONFIG_LWM2M_DTLS_SUPPORT enabled, I&amp;#39;ve established</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Mar 2020 12:13:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58817/nrf9160-lwm2m-with-mbedtls" /><item><title>RE: nRF9160 LwM2M with mbedtls</title><link>https://devzone.nordicsemi.com/thread/239715?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 12:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8842185b-b630-47e7-a46d-2b481f5435a5</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;I got an answer from one of our developers to my questions. Note that this is mostly speculation as we have not done much (if any) testing of this:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;None of our current chips has tamper-proof physical memory AFIK meaning our chips can be decapped and read with the right amount of motivation. TLS keys stored in the modem can theoretically be read out this way.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;While we (again, as far as me and the SDK developer that answered knows) do not have tamper-proof physical memory, the keys are stored in the modem, and the application is not allowed to read them back. So unless you are afraid of people physically accessing the flash, it is not possible to access the keys. The relevant AT commands for this are %XPMNG, %CMNG, and %XPRODDONE. In the future, %XSUDO will also be relevant.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;To me, it sounds like what they want is just to use is the&amp;nbsp;RAW&amp;nbsp;socket type which you can build your own TLS instance ontop of with libraries like mbedTLS or your own implementation. Be warned that I have no experience in actually doing this but it&amp;#39;s at least what I got from reading the documentation and heard from sprint reviews is that you should be able to put your own TLS ontop of RAW sockets. &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 LwM2M with mbedtls</title><link>https://devzone.nordicsemi.com/thread/239110?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c07e3a3-76e7-47a5-b565-a2e88a5e2e01</guid><dc:creator>Fabian Frei</dc:creator><description>&lt;p&gt;Hello Didrik&lt;/p&gt;
&lt;p&gt;Thank you for your response. I&amp;#39;m currently having a look at&amp;nbsp;the bsdlib implementation according to your input.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the end, we want to outsource security features such as key storage to a secure element (which offers physically tamper-proof memory).&lt;/p&gt;
&lt;p&gt;We have already done that in other projects by using mbedtls and setting up a bunch of corresponding software hooks. So, make the nRF9160 use the zephyr sockets with mbedtls instead of offloading the sockets seems like the most &amp;quot;straight forward&amp;quot; approach. Of course I&amp;#39;m open for any other reasonable approach.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 LwM2M with mbedtls</title><link>https://devzone.nordicsemi.com/thread/239020?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 09:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18d6dba-c1e1-4997-92ec-3cafec1f2f7f</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;I am still working on getting you a proper answer.&lt;/p&gt;
&lt;p&gt;However, I am wondering why you do not want to use socket offloading?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 LwM2M with mbedtls</title><link>https://devzone.nordicsemi.com/thread/238830?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 13:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:549f5605-2e75-4b5a-8621-e32b3a07d071</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;While I have to do some more investigation before I can answer your questions, I can comment on the error you are seeing.&lt;/p&gt;
&lt;p&gt;In bsdlib (the socket interface to the modem), we define a couple of extra socket types for GPS and AT commands. When you disable socket offloading, these new socket types no longer &amp;quot;exist&amp;quot;.&lt;/p&gt;
&lt;p&gt;You can change this by modifying the at_cmd library to use nrf_sockets instead of &amp;quot;normal&amp;quot; socket. It should not be more than changing all the socket related calls the corresponding nrf_socket call (which should be as simple as adding &amp;quot;nrf_&amp;quot; in front of the call), and including nrf_socket.h instead of net/socket.h.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll come back to you when I know more about how to not offload the sockets.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>