<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=User%3AGmaxwell%2Fderandomized_nonce_notes</id>
	<title>User:Gmaxwell/derandomized nonce notes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=User%3AGmaxwell%2Fderandomized_nonce_notes"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;action=history"/>
	<updated>2026-05-01T13:54:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68478&amp;oldid=prev</id>
		<title>Gmaxwell: /* Shouldn&#039;t Bitcoin use ed25519 because it has derandomized nonces? */</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68478&amp;oldid=prev"/>
		<updated>2021-03-08T02:41:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Shouldn&amp;#039;t Bitcoin use ed25519 because it has derandomized nonces?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:41, 8 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RFC6979 specifies a nonce scheme that any DL signature system (such as ECDSA with secp256k1) can use.  It&amp;#039;s been in common use in Bitcoin since 2015 and is now nearly ubiquitous.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RFC6979 specifies a nonce scheme that any DL signature system (such as ECDSA with secp256k1) can use.  It&amp;#039;s been in common use in Bitcoin since 2015 and is now nearly ubiquitous.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both standard RFC6979 and the ed25519 scheme have demonstrated some minor weaknesses in the fact of differential power analysis (power/emi &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sidechannels&lt;/del&gt;) and as a result the state of the art these days is &quot;synthetic nonces&quot; which combine most of the advantages of de-randomization with by hashing secret values with the message and a counter or random input to make it so a DPA attacker can&#039;t get multiple recordings of the same trace.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both standard RFC6979 and the ed25519 scheme have demonstrated some minor weaknesses in the fact of differential power analysis (power/emi &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;side-channels&lt;/ins&gt;) and as a result the state of the art these days is &quot;synthetic nonces&quot; which combine most of the advantages of de-randomization with by hashing secret values with the message and a counter or random input to make it so a DPA attacker can&#039;t get multiple recordings of the same trace.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both RFC6979 and ed25519 also lack a clear an unambiguous domain separation in their hashing.  If you use the same nonce scheme in different protocols (potentially even w/ different curves) you may inadvertently reuse a nonce and compromise your security.  This issue can be avoided through the use of tagged hashes and/or synthetic nonces.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Both RFC6979 and ed25519 also lack a clear an unambiguous domain separation in their hashing.  If you use the same nonce scheme in different protocols (potentially even w/ different curves) you may inadvertently reuse a nonce and compromise your security.  This issue can be avoided through the use of tagged hashes and/or synthetic nonces.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Bitcoin&#039;s BIP340 learns from ed25519 and incorporates a recommended secure nonce scheme in the BIP to reduce the risk that implementer will get it wrong. The recommended scheme also learns from &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;its shortcomings &lt;/del&gt;by using tagged hashes and supporting (optionally) synthetic nonces.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Bitcoin&#039;s BIP340 learns from ed25519 and incorporates a recommended secure nonce scheme in the BIP to reduce the risk that implementer will get it wrong. The recommended scheme also learns from &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the limitations of the ed25519 spec &lt;/ins&gt;by using tagged hashes and supporting (optionally) synthetic nonces.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It isn&#039;t technically possible to mandate any particular scheme for any of these cryptosystems, and it&#039;s just as well:  People have also constructed specialized nonce schemes for BIP340 which achieve other useful properties such as provability eliminating signing devices using the nonce as a cover sidechannel, and also generating nonces in a way which is provably &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;determinstic &lt;/del&gt;(using a large additional zero &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;knowedlge &lt;/del&gt;proof) which is potentially useful in some multiparty protocols.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It isn&#039;t technically possible to mandate any particular scheme for any of these cryptosystems, and it&#039;s just as well:  People have also constructed specialized nonce schemes for BIP340 which achieve other useful properties such as provability eliminating signing devices using the nonce as a cover sidechannel, and also generating nonces in a way which is provably &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;deterministic &lt;/ins&gt;(using a large additional zero &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;knowledge &lt;/ins&gt;proof) which is potentially useful in some multiparty protocols.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gmaxwell</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68477&amp;oldid=prev</id>
		<title>Gmaxwell at 02:38, 8 March 2021</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68477&amp;oldid=prev"/>
		<updated>2021-03-08T02:38:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:38, 8 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Shouldn&amp;#039;t Bitcoin use ed25519 because it has derandomized nonces?==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Shouldn&amp;#039;t Bitcoin use ed25519 because it has derandomized nonces?==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Nonce generation in all conventional DL signature systems is purely an implementation function.  The ed25519 specific had the foresight to specify a specific reasonable nonce generation scheme but unfortunately it&#039;s not possible to enforce that any particular scheme is used.  As a result people have still managed to create implementations of ed25519 with insecure nonce generation, and worse&amp;lt;ref&amp;gt;some parties have have falsely assumed that the deterministic nonces were mandatory and made the signatures unique resulting in vulnerabilities.&amp;lt;/ref&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Nonce generation in all conventional DL signature systems is purely an implementation function.  The ed25519 specific had the foresight to specify a specific reasonable nonce generation scheme but unfortunately it&#039;s not possible to enforce that any particular scheme is used.  As a result people have still managed to create implementations of ed25519 with insecure nonce generation, and worse&amp;lt;ref&amp;gt;some parties have have falsely assumed that the deterministic nonces were mandatory &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; with ed25519 &lt;/ins&gt;and made the signatures unique resulting in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;serious &lt;/ins&gt;vulnerabilities &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in some cryptocurrencies&lt;/ins&gt;.&amp;lt;/ref&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RFC6979 specifies a nonce scheme that any DL signature system (such as ECDSA with secp256k1) can use.  It&amp;#039;s been in common use in Bitcoin since 2015 and is now nearly ubiquitous.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RFC6979 specifies a nonce scheme that any DL signature system (such as ECDSA with secp256k1) can use.  It&amp;#039;s been in common use in Bitcoin since 2015 and is now nearly ubiquitous.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gmaxwell</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68476&amp;oldid=prev</id>
		<title>Gmaxwell: Created page with &quot; ==Shouldn&#039;t Bitcoin use ed25519 because it has derandomized nonces?==  Nonce generation in all conventional DL signature systems is purely an implementation function.  The ed...&quot;</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Gmaxwell/derandomized_nonce_notes&amp;diff=68476&amp;oldid=prev"/>
		<updated>2021-03-08T02:38:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; ==Shouldn&amp;#039;t Bitcoin use ed25519 because it has derandomized nonces?==  Nonce generation in all conventional DL signature systems is purely an implementation function.  The ed...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==Shouldn&amp;#039;t Bitcoin use ed25519 because it has derandomized nonces?==&lt;br /&gt;
&lt;br /&gt;
Nonce generation in all conventional DL signature systems is purely an implementation function.  The ed25519 specific had the foresight to specify a specific reasonable nonce generation scheme but unfortunately it&amp;#039;s not possible to enforce that any particular scheme is used.  As a result people have still managed to create implementations of ed25519 with insecure nonce generation, and worse&amp;lt;ref&amp;gt;some parties have have falsely assumed that the deterministic nonces were mandatory and made the signatures unique resulting in vulnerabilities.&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
RFC6979 specifies a nonce scheme that any DL signature system (such as ECDSA with secp256k1) can use.  It&amp;#039;s been in common use in Bitcoin since 2015 and is now nearly ubiquitous.&lt;br /&gt;
&lt;br /&gt;
Both standard RFC6979 and the ed25519 scheme have demonstrated some minor weaknesses in the fact of differential power analysis (power/emi sidechannels) and as a result the state of the art these days is &amp;quot;synthetic nonces&amp;quot; which combine most of the advantages of de-randomization with by hashing secret values with the message and a counter or random input to make it so a DPA attacker can&amp;#039;t get multiple recordings of the same trace.&lt;br /&gt;
&lt;br /&gt;
Both RFC6979 and ed25519 also lack a clear an unambiguous domain separation in their hashing.  If you use the same nonce scheme in different protocols (potentially even w/ different curves) you may inadvertently reuse a nonce and compromise your security.  This issue can be avoided through the use of tagged hashes and/or synthetic nonces.&lt;br /&gt;
&lt;br /&gt;
Bitcoin&amp;#039;s BIP340 learns from ed25519 and incorporates a recommended secure nonce scheme in the BIP to reduce the risk that implementer will get it wrong. The recommended scheme also learns from its shortcomings by using tagged hashes and supporting (optionally) synthetic nonces.&lt;br /&gt;
&lt;br /&gt;
It isn&amp;#039;t technically possible to mandate any particular scheme for any of these cryptosystems, and it&amp;#039;s just as well:  People have also constructed specialized nonce schemes for BIP340 which achieve other useful properties such as provability eliminating signing devices using the nonce as a cover sidechannel, and also generating nonces in a way which is provably determinstic (using a large additional zero knowedlge proof) which is potentially useful in some multiparty protocols. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gmaxwell</name></author>
	</entry>
</feed>