{"type":"rich","version":"1.0","author_name":"npub1dje2hdnptk0k4gr5rt73vycxhc7xkkskyj32p6mgvhx66wltl76q268qlm","author_url":"https://nostr.ae/npub1dje2hdnptk0k4gr5rt73vycxhc7xkkskyj32p6mgvhx66wltl76q268qlm","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2021-03-20\n📝 Original message:Hi Erik,\n\nWould sha256-hmac(nonce, publicKeyPoint) still be a suitable/safe alternative without relying on sha3? That should at the very least eliminate length extension attacks.\n\nBest,\nArik\n\n\u003e On Mar 19, 2021, at 6:32 PM, Erik Aronesty via bitcoin-dev \u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e \n\u003e use sha3-256.  sha256 suffers from certain attacks (length extension,\n\u003e for example) that could make your scheme vulnerable to leaking info,\n\u003e depending on how you concatenate things, etc.  better to choose\n\u003e something where padding doesn't matter.\n\u003e \n\u003e On Fri, Mar 19, 2021 at 7:28 PM vjudeu via bitcoin-dev\n\u003e \u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e\u003e \n\u003e\u003e I recently found some interesting and simple HD wallet design here: https://bitcointalk.org/index.php?topic=5321992.0\n\u003e\u003e Could anyone see any flaws in such design or is it safe enough to implement it and use in practice?\n\u003e\u003e If I understand it correctly, it is just pure ECDSA and SHA-256, nothing else:\n\u003e\u003e \n\u003e\u003e masterPublicKey = masterPrivateKey * G\n\u003e\u003e masterChildPublicKey = masterPublicKey + ( SHA-256( masterPublicKey || nonce ) mod n ) * G\n\u003e\u003e masterChildPrivateKey = masterPrivateKey + ( SHA-256( masterPublicKey || nonce ) mod n )\n\u003e\u003e \n\u003e\u003e 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.\n\u003e\u003e _______________________________________________\n\u003e\u003e bitcoin-dev mailing list\n\u003e\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\n-------------- next part --------------\nA non-text attachment was scrubbed...\nName: signature.asc\nType: application/pgp-signature\nSize: 833 bytes\nDesc: Message signed with OpenPGP\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210319/194c9b22/attachment.sig\u003e"}
