<oembed><type>rich</type><version>1.0</version><author_name>npub1dje2hdnptk0k4gr5rt73vycxhc7xkkskyj32p6mgvhx66wltl76q268qlm</author_name><author_url>https://nostr.ae/npub1dje2hdnptk0k4gr5rt73vycxhc7xkkskyj32p6mgvhx66wltl76q268qlm</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-03-20&#xA;📝 Original message:Hi Erik,&#xA;&#xA;Would sha256-hmac(nonce, publicKeyPoint) still be a suitable/safe alternative without relying on sha3? That should at the very least eliminate length extension attacks.&#xA;&#xA;Best,&#xA;Arik&#xA;&#xA;&gt; On Mar 19, 2021, at 6:32 PM, Erik Aronesty via bitcoin-dev &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &#xA;&gt; use sha3-256.  sha256 suffers from certain attacks (length extension,&#xA;&gt; for example) that could make your scheme vulnerable to leaking info,&#xA;&gt; depending on how you concatenate things, etc.  better to choose&#xA;&gt; something where padding doesn&#39;t matter.&#xA;&gt; &#xA;&gt; On Fri, Mar 19, 2021 at 7:28 PM vjudeu via bitcoin-dev&#xA;&gt; &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&gt; &#xA;&gt;&gt; I recently found some interesting and simple HD wallet design here: https://bitcointalk.org/index.php?topic=5321992.0&#xA;&gt;&gt; Could anyone see any flaws in such design or is it safe enough to implement it and use in practice?&#xA;&gt;&gt; If I understand it correctly, it is just pure ECDSA and SHA-256, nothing else:&#xA;&gt;&gt; &#xA;&gt;&gt; masterPublicKey = masterPrivateKey * G&#xA;&gt;&gt; masterChildPublicKey = masterPublicKey + ( SHA-256( masterPublicKey || nonce ) mod n ) * G&#xA;&gt;&gt; masterChildPrivateKey = masterPrivateKey + ( SHA-256( masterPublicKey || nonce ) mod n )&#xA;&gt;&gt; &#xA;&gt;&gt; Also, it has some nice properties, like all keys starting with 02 prefix and allows potentially unlimited custom derivation path by using 256-bit nonce.&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 833 bytes&#xA;Desc: Message signed with OpenPGP&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210319/194c9b22/attachment.sig&gt;</html></oembed>