<?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>mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103018/mbedtls-pbkdf2-activating-function-in-prj-conf-is-not-possible</link><description>Hello, 
 I want to use the function mbedtls_pkcs5_pbkdf2_hmac which can be found in mbedtls\library\pkc5s.c . 
 There is a compiler switch named MBEDTLS_PKCS5_C which activates this function. 
 I thougt if I set the following configurations in prj.conf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Sep 2023 05:23:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103018/mbedtls-pbkdf2-activating-function-in-prj-conf-is-not-possible" /><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/444611?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 05:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3792a1-8381-435e-aab3-bd46911cf9dd</guid><dc:creator>ProfNocturne</dc:creator><description>&lt;p&gt;Sorry for the delayed answer.&lt;br /&gt;&lt;br /&gt;Your example works. All I need is to add&amp;nbsp;&lt;strong&gt;CONFIG_NORDIC_SECURITY_BACKEND=y&lt;/strong&gt; in prj.conf.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank your for your help!&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: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442683?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 06:44:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76893f3a-f5bb-4cf2-bdb0-4327a91cd05e</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Try this, is it what you need?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mbedtls_5F00_pkcs5_5F00_pbkdf2_5F00_hmac_5F00_ext_5F00_test.zip"&gt;devzone.nordicsemi.com/.../mbedtls_5F00_pkcs5_5F00_pbkdf2_5F00_hmac_5F00_ext_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442601?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 13:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1976b88-c68a-4a30-923d-8aa89fa140c9</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Earlier, I helped another customer to use mbedtls functionality in &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95814/rsa-example-fails-on-psa_sign_hash-returning--133"&gt;RSA example fails on psa_sign_hash returning -133&lt;/a&gt;&amp;nbsp;. Have a look at this case and see if it helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have been trying to use this method myself for mbedtls_pkcs5_pbkdf2_hmac, but have not been able to make it work yet. &lt;br /&gt;So I asked our developers for tips, and will return to you when I hear back from them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442414?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 05:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2372229a-968f-43b3-becb-6c5111b6bfde</guid><dc:creator>ProfNocturne</dc:creator><description>&lt;p&gt;Ok, currently for prototyping I am working without TF-M.&lt;/p&gt;
&lt;p&gt;I thought the way which I described in my first post should work. But setting&amp;nbsp;&lt;strong&gt;CONFIG_MBEDTLS_PKCS5_C&lt;/strong&gt; to yes in prj.conf doesn&amp;#39;t enable functions in&amp;nbsp;&lt;strong&gt;pkc5s.c.&amp;nbsp;&lt;/strong&gt;&amp;nbsp;By default they are blocked by the compiler switch&amp;nbsp;&lt;strong&gt;MBEDTLS_PKCS5_C&lt;/strong&gt;.&amp;nbsp;Maybe it is&amp;nbsp;a bug? Or is there a basic misunderstanding on my side?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I found this topic and took it as an example:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47212/pbkdf2-password-derivation-using-cc310-or-mbed-tls"&gt;PBKDF2 password derivation using CC310 or mbed-tls&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68196/support-for-public-private-key-pair-generation-as-part-of-ecc/279814"&gt;Support for Public/Private key pair Generation as part of ECC&lt;/a&gt;&amp;nbsp; in the last post of Einar Thorsrud he recommended to use pkcs5 for that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442335?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 13:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e66bcd9c-4abd-468b-b316-b96032494fb8</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="ProfNocturne"]Just to clearify there is&amp;nbsp;a note in your posted link: &lt;strong&gt;PBKDF2 algorithms are not supported with TF-M.&lt;/strong&gt;&amp;nbsp;[/quote]
&lt;p&gt;Ah, then you need to use mbedtls.&lt;/p&gt;
[quote user="ProfNocturne"]So I cannot use it with the _ns board build configuration?[/quote]
&lt;p&gt;I think it is possible to use legacy (mbedtls) functionality alongside TF-M at the time, but it is not easy.&lt;/p&gt;
&lt;p&gt;So you have two choices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Learn how to set this without TF-M&lt;/li&gt;
&lt;li&gt;Learn how to set this with TF-M
&lt;ol&gt;
&lt;li&gt;In this case, I will try to learn it myself and explain it to when I have&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442306?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 12:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ecfbd6-6193-4367-b0fb-defa7d489eeb</guid><dc:creator>ProfNocturne</dc:creator><description>&lt;p&gt;Thanks for the fast reply!&lt;/p&gt;
&lt;p&gt;In our project we commited to use the&amp;nbsp;&lt;span&gt;PBKDF2 for key derviation. Because it is supported on all platforms we use. I found out that the mbedtls provides this function.&lt;/span&gt;&lt;br /&gt;As I mentioned I am currently working with the v2.0.0. It seems that PBKDF2 is not supported by the Nordic security module (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfxlib/nrf_security/doc/driver_config.html"&gt;nrf_security/doc/driver_config&lt;/a&gt;). Only in the link you posted (latest version of nrf Connect) the &lt;strong&gt;CONFIG_PSA_WANT_ALG_PBKDF2_HMAC&lt;/strong&gt; is mentioned which will possibly meet my requirements.&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After my holiday I will upgrade to the latest version of nrf Connect and try it.&lt;br /&gt;Just to clearify there is&amp;nbsp;a note in your posted link: &lt;strong&gt;PBKDF2 algorithms are not supported with TF-M.&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So I cannot use it with the _ns board build configuration?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mbedtls PBKDF2: Activating function in prj.conf is not possible</title><link>https://devzone.nordicsemi.com/thread/442274?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 11:26:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5989986-013d-497c-9a5e-a510eb4c1fbb</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have TF-M (_ns) enabled for your device?&lt;br /&gt;If so, this can change how things work.&lt;/p&gt;
&lt;p&gt;Also, to make sure it is not an &lt;a href="https://en.wikipedia.org/wiki/XY_problem"&gt;XY problem&lt;/a&gt;, can you shortly explain why you need the &lt;strong&gt;mbedtls_pkcs5_pbkdf2_hmac&lt;/strong&gt; function?&lt;/p&gt;
&lt;p&gt;For some docs, see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nrf_security/index.html"&gt;Nordic Security Module&lt;/a&gt;. When i get more information, I can probably give you more specific docs as well&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>