<?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 generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68491/how-to-generate-hmac-sha256-with-sdk12-3-0</link><description>Hi, 
 
 I have a NRF51802 custom board, using sdk12.3.0 and softdevice 130 for my applications. 
 I would like to generate hmac sha 256 in my application. 
 Can you please provide me an example to generate hmac? 
 In SDK 12.3.0 i couldn&amp;#39;t find any example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Nov 2020 11:16:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68491/how-to-generate-hmac-sha256-with-sdk12-3-0" /><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280853?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 11:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:670e7069-43d2-49e8-8990-87ffaf5176da</guid><dc:creator>swetha Paladugu</dc:creator><description>&lt;p&gt;Thanks for your information Jorgen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280847?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 10:58:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86bb1069-4d3c-4ce2-bfcc-d676dc7ea1df</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, typically software takes longer time than hardware implementations. Also note that the Cortex M0 of nRF51 series ICs runs at 16 MHz, which will make the software operations 4 times slower than for instance nRF52 series running at 64 MHz.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280802?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 09:41:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14a287c7-dd79-46e3-a36e-7e6f52b7b1b2</guid><dc:creator>swetha Paladugu</dc:creator><description>&lt;p&gt;Ok i am using open source sha2.c/h files and i am able to generate hmac succesfully..&lt;/p&gt;
&lt;p&gt;I am using this software hmac in my code for totp computations, i see that the computations are taking more time. Usually it happens with in a second.. Now i see that is taking more time..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is it because we are doing everything in software, like this hmac?&lt;/p&gt;
&lt;p&gt;Hardware crypto way of hmac generation would be faster right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280795?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 09:28:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08d1252f-b89c-4b68-b836-c30684b149d1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Most likely it will be easier to use the sha2.c/h files from your opensource library, as the input structures for the function calls may be more aligned. The sha256.c/h files in the SDK also originates from an opensource repository, as mentioned in the header:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; *          This code is adapted from code by Brad Conte, retrieved from
 *          https://github.com/B-Con/crypto-algorithms.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280743?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 04:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88cb1510-0d6c-492c-a7a2-0980a838db85</guid><dc:creator>swetha Paladugu</dc:creator><description>&lt;p&gt;In opensource i got sha2.c and sha2.h files along with hmac.c and hmac.h files.&lt;/p&gt;
&lt;p&gt;If i use the opensource library, is it necessary that i should sha256.c and sha256.h of nrf sdk 12.3.0 instead of sha2.c and sha2.h of opensource.. or can i use the open source sha2.c and sha2.h files directly?&lt;/p&gt;
&lt;p&gt;What do u suggest?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Swetha.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to generate hmac-sha256 with sdk12.3.0 ?</title><link>https://devzone.nordicsemi.com/thread/280681?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 16:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:867170a5-16fc-48a5-8ce6-de363a3e75db</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The cryptographic library in SDK 12.3.0 is very limited, and only supports SHA256 Hashing algorithm, not HMAC, see&amp;nbsp;&lt;a title="Library usage" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/lib_crypto.html?cp=7_5_9_3_9_3#lib_crypto_using"&gt;Library usage&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That being said, there is no HW cryptographic acceleration features on the nRF51 series, so any C embedded crypto library that can run on a ARM Cortex M0 CPU should be possible to integrate with your application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>