<?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>Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84093/invalid-private-key-with-ed25519</link><description>Hi, 
 I have an application for the nRF9160 where I want to use mcuboot and of course signing, but I get the following message while building, that my key file is invalid. 
 
 I generated this keyfile and with the imgtool.py and it looks as follows: </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Jan 2022 13:03:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84093/invalid-private-key-with-ed25519" /><item><title>RE: Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/thread/350427?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 13:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d06f8b5-8cc2-4db0-ae38-6c946c206763</guid><dc:creator>MaLu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have changed the getpriv function to getpub and nowthe build procces runs without complaint. Seems to work.&lt;br /&gt;&lt;br /&gt;Thanks a bunch!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/thread/350421?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 12:50:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a3a4df-b4fc-4393-8ee0-2a1961e977aa</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;We have found the issue and created a pull-request with a proposed fix:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/6693"&gt;https://github.com/nrfconnect/sdk-nrf/pull/6693&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you test it and see if this also fixes the issue on your end?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/thread/350191?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 12:02:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22ad054d-9115-4103-ae6e-ec4e1d3e7f87</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can confirm that I see the same behavior when selecting this in mcuboot:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which then prints:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CMake Warning at /opt/ncs/nrf/modules/mcuboot/CMakeLists.txt:255 (message):
  

        ---------------------------------------------------------
        --- WARNING: Using default MCUBoot key, it should not ---
        --- be used for production.                           ---
        ---------------------------------------------------------
        



CMake Warning at /opt/ncs/nrf/modules/mcuboot/CMakeLists.txt:278 (message):
  Key file `/opt/ncs/bootloader/mcuboot/root-ed25519.pem` does not contain a
  valid private key.  Signing of images will be disabled.
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, I do not have a workaround at this time. I will report this internally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/thread/350103?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 06:11:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a91b072-846b-40a2-8fa9-2ce692d91559</guid><dc:creator>MaLu</dc:creator><description>&lt;p&gt;Hi, thanks for the reply.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS D:\work\nRF_Connect_SDK\devzone\hello_world1234&amp;gt; ssh-keygen.exe -p -f .\test_ed25519.pem -m pem -P &amp;quot;&amp;quot; -N &amp;quot;&amp;quot;
Failed to load key .\\test_ed25519.pem: invalid format&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Does not seem to work with my ed25519 key file. Is this neccessary to do? As I said, in SDK Version 1.4.0, the exemplary .pem file created by the imgtool in my first post was enough to let the build run through.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid private key with ed25519</title><link>https://devzone.nordicsemi.com/thread/350028?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 15:18:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:908a1c50-df4f-4f56-8caa-9de768dc3b08</guid><dc:creator>sipan112</dc:creator><description>&lt;p&gt;ou can use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://man.openbsd.org/ssh-keygen"&gt;&lt;code&gt;ssh-keygen&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to convert the key to the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;classic&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;OpenSSH format:&lt;/p&gt;
&lt;pre class="lang-java s-code-block"&gt;&lt;code class="hljs language-java"&gt;ssh-keygen -p -f file -m pem -P passphrase -N passphrase
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(if the key is not encrypted with a passphrase, use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;instead of&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;passphrase&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;For Windows users: Note that&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;ssh-keygen.exe&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is now built-in in Windows 10. And can be&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/PowerShell/Win32-OpenSSH"&gt;downloaded from the Microsoft Win32-OpenSSH project&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for older versions of Windows.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>