<?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>nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91699/nrf9160-dk-ecdsa-v-value</link><description>Hello! We are trying to sign our data using ECDSA ( https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/ecdsa/README.html ) , so we can send our information to an Ethereum Blockchain. To send the transaction we need to obtain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Sep 2022 14:15:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91699/nrf9160-dk-ecdsa-v-value" /><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/388605?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 14:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d7f4348-6047-49a2-a711-0f2f73997692</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It might be possible to read keys using&amp;nbsp;&lt;a href="https://github.com/celo-org/ganache-cli/blob/master/README.md"&gt;ganache-cli&lt;/a&gt;&amp;nbsp;in a way specified&amp;nbsp;&lt;a href="https://www.anycodings.com/1questions/1823953/ganache-cli-how-to-read-private-key-from-account-json-file"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/388230?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 21:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd53633f-0e5b-4a47-94ab-db057d1578ad</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;This is our private key:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint8_t m_priv_key[32] = {
		0x4f, 0x3e, 0xdf, 0x98, 0x3a,
		0xc6, 0x36, 0xa6, 0x5a, 0x84, 
		0x2c, 0xe7, 0xc7, 0x8d, 0x9a, 
		0xa7, 0x06, 0xd3, 0xb1, 0x13, 
		0xbc, 0xe9, 0xc4, 0x6f, 0x30, 
		0xd7 ,0xd2, 0x17 ,0x15 ,0xb2, 
		0x3b, 0x1d
	};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Related to our Ganache account.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387952?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 13:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45681851-e7e2-4014-967f-8f85084bfeca</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;What is the format of your private key?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387769?ContentTypeID=1</link><pubDate>Sun, 25 Sep 2022 16:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3f916f3-6999-45ee-9839-2cb64438f20f</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;With Ganache I only know the private key and the last 20 characters of the keccak256 of the public key (The address)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387733?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 15:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b62c5b3-12fa-4f77-8074-7caa4ce2fd3d</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Public key should be public. Why is it so that you do not know the public key?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387443?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 10:00:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57433e38-2827-4e9d-a717-ceedaadd38f2</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;Let&amp;#39;s make a recap. We need to know the correct value of &amp;quot;v&amp;quot;. We need the guides and the documents that you proposed and now we know the way to obtain the proper &amp;quot;v&amp;quot;. The problem is that, according to these guides, to find this value we need to see some information related to our ECDSA. For sure we need to find the coordinates of our private key. The &amp;quot;r value&amp;quot; corresponds to the coordinate &amp;quot;yR&amp;quot;, we need to know for sure the coordinate &amp;quot;xR&amp;quot; that is used to obtain the sign but that we don&amp;#39;t know how to pull out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387343?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 15:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c34b79b-1861-457e-ba8f-80d110cbe292</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;4.1.4 Verifying Operation&lt;br /&gt;Entity V must verify signed messages from entity U using ECDSA using the keys and parameters&lt;br /&gt;established during the setup procedure and the key deployment procedure as follows:&lt;br /&gt;Input: The verifying operation takes as input:&lt;br /&gt;1. An octet string M which is the message.&lt;br /&gt;2. Entity U&amp;rsquo;s purported signature S = (r, s) on M.&lt;br /&gt;3. Optional: extra information to recover R efficiently from r (see below).&lt;br /&gt;Output: An indication of whether the purported signature on M is valid or not &amp;mdash; either &amp;ldquo;valid&amp;rdquo;&lt;br /&gt;or &amp;ldquo;invalid&amp;rdquo;.&lt;br /&gt;Actions: Verify the purported signature S on M as follows:&lt;br /&gt;1. If r and s are not both integers in the interval [1, n &amp;minus; 1], output &amp;ldquo;invalid&amp;rdquo; and stop.&lt;br /&gt;2. Use the hash function established during the setup procedure to compute the hash value:&lt;br /&gt;H = Hash(M)&lt;br /&gt;of length hashlen octets as specified in Section 3.5. If the hash function outputs &amp;ldquo;invalid&amp;rdquo;,&lt;br /&gt;output &amp;ldquo;invalid&amp;rdquo; and stop.&lt;br /&gt;3. Derive an integer e from H as follows:&lt;br /&gt;3.1. Convert the octet string H to a bit string H using the conversion routine specified in&lt;br /&gt;Section 2.3.2.&lt;br /&gt;3.2. Set E = H if dlog2 ne  8(hashlen), and set E equal to the leftmost dlog2 ne bits of H&lt;br /&gt;if dlog2 ne &amp;lt; 8(hashlen).&lt;br /&gt;3.3. Convert the bit string E to an octet string E using the conversion routine specified in&lt;br /&gt;Section 2.3.1.&lt;br /&gt;3.4. Convert the octet string E to an integer e using the conversion routine specified in&lt;br /&gt;Section 2.3.8.&lt;br /&gt;4. Compute:&lt;br /&gt;u1 = es&amp;minus;1 mod n and u2 = rs&amp;minus;1 mod n.&lt;br /&gt;5. Compute:&lt;br /&gt;R = (xR, yR) = u1G + u2QU.&lt;br /&gt;If R = O, output &amp;ldquo;invalid&amp;rdquo; and stop.&lt;br /&gt;6. Convert the field element xR to an integer xR using the conversion routine specified in Section&lt;br /&gt;2.3.9.&lt;br /&gt;Page 46 of 138 &amp;sect;4 Signature Schemes&lt;br /&gt;SEC 1 Ver. 2.0 4.1 Elliptic Curve Digital Signature Algorithm&lt;br /&gt;7. Set v = xR mod n.&lt;br /&gt;8. Compare v and r &amp;mdash; if v = r, output &amp;ldquo;valid&amp;rdquo;, and if v 6= r, output &amp;ldquo;invalid&amp;rdquo;.&lt;br /&gt;The optional input of extra information used to recover R efficiently from r is not used in the actions&lt;br /&gt;above. Nevertheless, it may be used in an equivalent sequence of actions to achieve more efficient&lt;br /&gt;verification. For example, if one recovers R from r, then one may verify that sR = eG+rQU. More&lt;br /&gt;generally, one may choose some integer t, and verify that tsR = teG+trQU. A t can be chosen so&lt;br /&gt;that both the integers (ts mod n) and (tr mod n) have size approximately&lt;br /&gt;p&lt;br /&gt;n, which can be used&lt;br /&gt;to make the verification operation faster.&lt;/p&gt;
&lt;p&gt;(From page 46 of your document)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is the way to follow to verify a signature. The problems are that I can&amp;#39;t find some values:&lt;/p&gt;
&lt;p&gt;-n&lt;/p&gt;
&lt;p&gt;-yR&lt;/p&gt;
&lt;p&gt;-G&lt;/p&gt;
&lt;p&gt;-e&lt;br /&gt;&lt;br /&gt;&lt;span&gt;To calculate v and verify ECDSA&amp;nbsp;we need to know&amp;nbsp;particular values and&amp;nbsp;we may need access to the internals of&amp;nbsp;Nordic library to do this.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387330?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 14:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdf00f54-964f-47a1-97fd-655000bed695</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It might be useful to you if you could read verification procedure as provided in my previous reply.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/387120?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 14:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:620f1663-02a7-454f-9dc0-fab8d0175e84</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;The coordinates are the points to calculate the correct sign of ECDSA&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/386950?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 16:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2ff2bc6-e02c-4a5c-8e45-12ae3e156fd4</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What are you referring to as coordinates?&lt;br /&gt;&lt;br /&gt;The same link to the&amp;nbsp;&lt;a href="https://www.secg.org/sec1-v2.pdf"&gt;verification procedure, chapter 4.1.4&lt;/a&gt; applies here as in your other&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/support-private/support/295018"&gt;case&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/386605?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 11:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4c6cc8-afd4-4c08-ade7-c38ac1eca317</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;We need some information like the public key and the coordinates to calculate v in the right way. How can we do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/385643?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 08:10:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b7d902b-1386-4143-b2a7-ab035073af29</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Theoretically, there is an explanation of&amp;nbsp;&lt;a href="https://www.secg.org/sec1-v2.pdf#page=52"&gt;verification in Eliptic curve cryptography&lt;/a&gt;. Simplified version of verification procedure can be found in this&amp;nbsp;&lt;a href="https://crypto.stackexchange.com/questions/80137/understanding-example-of-ecdsa-p256"&gt;discussion&lt;/a&gt;. Additional information about ECDSA verification can be found&amp;nbsp;&lt;a href="https://cryptobook.nakov.com/digital-signatures/ecdsa-sign-verify-messages"&gt;here&lt;/a&gt;, including&amp;nbsp;&lt;a href="https://cryptobook.nakov.com/digital-signatures/ecdsa-sign-verify-examples#ecdsa-sign-verify-using-the-secp256k1-curve-and-sha3-256"&gt;verification example&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/385568?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 19:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:487dc3cd-2d2c-4a26-91e7-32bd8d190d10</guid><dc:creator>Gioele</dc:creator><description>&lt;p&gt;.I saw these discussions but to verify this value I need to see the coordinates of my ECDSA&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160-DK ECDSA v value</title><link>https://devzone.nordicsemi.com/thread/385105?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 16:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be31b97f-536e-4695-8d9b-d73f2c2b4a1b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Related to v value, there are some online discussions -&amp;nbsp;&lt;a href="https://bitcoin.stackexchange.com/questions/38351/ecdsa-v-r-s-what-is-v"&gt;v in ECDSA&lt;/a&gt;,&amp;nbsp;&lt;a href="https://ethereum.stackexchange.com/questions/15766/what-does-v-r-s-in-eth-gettransactionbyhash-mean"&gt;v meaning&lt;/a&gt;,&amp;nbsp;&lt;a href="https://medium.com/asecuritysite-when-bob-met-alice/can-we-recover-the-public-key-from-an-ecdsa-signature-7af4b56a8a0f"&gt;recovering public key&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://medium.com/mycrypto/the-magic-of-digital-signatures-on-ethereum-98fe184dc9c7"&gt;digital signatures on Ethereum&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>