<?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>micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20349/micro-ecc-create-wrong-publickey-in-windows</link><description>My pc server should send information to nrf52832 by ECDH, then I create a dll file from micro-ecc. However,the result in windows is not the same as the result in nrf52832. The following is some test code in VS2013. 
 // ecdhtest.cpp : Defines the entry</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Mar 2017 16:20:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20349/micro-ecc-create-wrong-publickey-in-windows" /><item><title>RE: micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/thread/79310?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2017 16:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c942df5-a917-473e-9f71-f9da0b012225</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;There is a define statement in uEcc.h(line48-line50) :
#ifndef uECC_VLI_NATIVE_LITTLE_ENDIAN
#define uECC_VLI_NATIVE_LITTLE_ENDIAN 0
#endif
When we compile codes in Keil5, it&amp;#39;s right. However, in windows, it doesn&amp;#39;t work. If we change the value of uECC_VLI_NATIVE_LITTLE_ENDIAN  from 0 to 1, it works well ,at least in VS2013.
So what we should do is :&lt;/p&gt;
&lt;p&gt;#ifndef uECC_VLI_NATIVE_LITTLE_ENDIAN
#define uECC_VLI_NATIVE_LITTLE_ENDIAN 1
#endif&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/thread/79309?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2017 16:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ca52713-b100-4182-ab56-b6285d43b68c</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;Theoretically， that&amp;#39;s impossible.
I found my mistake just now. See my answer below.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/thread/79308?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2017 09:58:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d6c38e3-6c53-4a11-92af-57a7f902bfc7</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Could you check if the public key generated by windows will work with the private key that you have?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/thread/79307?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2017 13:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45d9f441-5240-43ab-99f3-00dfc65a9ff6</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;For a specific curve(uECC_secp256r1), there&amp;#39;s only one publickey, publickey=K*G(x,y), K is the private key. Somethong must be wrong, and I don&amp;#39;t think uEcc works wrong, so I&amp;#39;m sure I do something wrong which I don&amp;#39;t know. But where&amp;#39;s my mistake?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: micro ecc create wrong publickey in windows</title><link>https://devzone.nordicsemi.com/thread/79306?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2017 12:00:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ee1d484-15ed-4d3a-a924-13c32d118762</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Theoretically, there can be more than one public key associated with a private key. Does it work to use both of the generated public keys with the one private key?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>