<?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>about HMAC SHA1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59805/about-hmac-sha1</link><description>Hello, 
 
 I&amp;#39;m porting from ST32L151 to NRF52840. 
 I want to use the HMAC SHA1 method, but I can&amp;#39;t see the related function. 
 The nrf_crypto_hmac_init function seems to be able to use SHA256 and SHA512, but SHA1 cannot be used. 
 But there is a mbedtls_sha1_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Apr 2020 11:28:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59805/about-hmac-sha1" /><item><title>RE: about HMAC SHA1</title><link>https://devzone.nordicsemi.com/thread/243379?ContentTypeID=1</link><pubDate>Fri, 03 Apr 2020 11:28:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7f2ae69-172e-41ca-b842-1d6ee801513e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;We don&amp;#39;t include this algorithm in our SDK, so you have to make your own or integrate an existing solution. For the open-source implementations you have evaluated, would it be possible just to build an API wrapper on top to get the same API interface as you had on the ST?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about HMAC SHA1</title><link>https://devzone.nordicsemi.com/thread/243302?ContentTypeID=1</link><pubDate>Fri, 03 Apr 2020 06:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70757427-d489-495f-ad91-e85e67c2b70a</guid><dc:creator>kevin seo</dc:creator><description>&lt;p&gt;I want to use hmac-sha1 even if the security is weak.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But the examples you gave or the ones I found on Google are not what I want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The function used in ST is as follows.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;int32_t HMAC_SHA1_Init(HMAC_SHA1ctx_stt *P_pHMAC_SHA1ctx);&lt;br /&gt;int32_t HMAC_SHA1_Append(HMAC_SHA1ctx_stt *P_pHMAC_SHA1ctx, const uint8_t *P_pInputBuffer, int32_t P_inputSize);&lt;br /&gt;int32_t HMAC_SHA1_Finish(HMAC_SHA1ctx_stt *P_pHMAC_SHA1ctx, uint8_t *P_pOutputBuffer, int32_t *P_pOutputSize);&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Isn&amp;#39;t there a way to use Nordic with a function that does the same thing?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about HMAC SHA1</title><link>https://devzone.nordicsemi.com/thread/243167?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 11:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4af8b719-2746-4f4a-a0bb-f16691b8153a</guid><dc:creator>kevin seo</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll use open source&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about HMAC SHA1</title><link>https://devzone.nordicsemi.com/thread/243111?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 08:26:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1a10c0f-c89f-4551-a66d-690e834bbcc2</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;HMAC is a message authentication algoritm based on hash function, it&amp;#39;s not the same as SHA1/SHA256. You can find many open-source implementations of hmac-sha1, for example&amp;nbsp;&lt;a href="http://web.mit.edu/freebsd/head/contrib/wpa/src/crypto/sha1.c"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Keep in mind that SHA1 is an old and weak hash algorithm - if you don&amp;#39;t have serious reasons to keep it for compatibility, it&amp;#39;s better to switch to SHA256/SHA512.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>