<?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>Mesh App and Net Keys generation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90748/mesh-app-and-net-keys-generation</link><description>The spec describes the App and Network keys as 16 byte hex strings and states that they are generated by a Provisioner. 
 Can you please clarify what algorithm is used to generate them? 
 Thank you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Aug 2022 11:02:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90748/mesh-app-and-net-keys-generation" /><item><title>RE: Mesh App and Net Keys generation</title><link>https://devzone.nordicsemi.com/thread/380986?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 11:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e088e151-cc8f-4234-8675-5aa1a9965632</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Talked to our mobile developers about this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The user needs to provide the 16-byte key:&amp;nbsp;&lt;br /&gt;iOS:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Mesh%20API/MeshNetwork%2BKeys.swift#L143"&gt;Network Key&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Mesh%20API/MeshNetwork%2BKeys.swift#L69"&gt;App Key&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, the library comes with a helper method that does it:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Type%20Extensions/Data%2BKeys.swift#L35"&gt;https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Type%20Extensions/Data%2BKeys.swift#L35&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Crypto/Crypto.swift#L48"&gt;https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/756c6dfde368832a50774d478c365f2615084660/nRFMeshProvision/Classes/Crypto/Crypto.swift#L48&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On Android you could call the following method if you want to generate your own key:&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/blob/d2292fac77cd195bb962c4be6b2cd245cc6f0e86/mesh/src/main/java/no/nordicsemi/android/mesh/utils/SecureUtils.java#L123"&gt;https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library/blob/d2292fac77cd195bb962c4be6b2cd245cc6f0e86/mesh/src/main/java/no/nordicsemi/android/mesh/utils/SecureUtils.java#L123&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh App and Net Keys generation</title><link>https://devzone.nordicsemi.com/thread/380871?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 15:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b73e169-d05b-4172-8335-0b965ecfd921</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Yes please, I need an algorithm so I can generate those keys in my application&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh App and Net Keys generation</title><link>https://devzone.nordicsemi.com/thread/380810?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 10:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b148e352-d71f-492c-aa0b-0723c2a593e3</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That is correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using our nRF Mesh mobile application you can generate both Network keys and App keys, that are to be used during provisioning. The keys can be generated under the settings tab.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also manually enter the keys when adding new keys.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have exact information about the algorithm that we use for the key generation, but I can try to check if you need more information about it?&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>