<oembed><type>rich</type><version>1.0</version><author_name>npub10vqyu8x3f0lfttk98xc28ppuyufaz4df8x4aspa9w9xz5z05snzq7t058y</author_name><author_url>https://nostr.ae/npub10vqyu8x3f0lfttk98xc28ppuyufaz4df8x4aspa9w9xz5z05snzq7t058y</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-02-12&#xA;📝 Original message:Hard no to this idea:&#xA;&#xA;On Thu, Feb 11, 2021 at 02:29:46PM -0800, Christopher Allen proposed:&#xA;...&#xA;&gt; /48&#39;/0&#39;/0&#39;/3&#39;/PBKDF(complex string)&#39;&#xA;&#xA;As someone who has helped people find UTXO at key paths they didn&#39;t&#xA;know/want, this is a terrible idea. Key derivation paths should be&#xA;small, sequential integers, so they can be searched in reasonable time.&#xA;&#xA;Of course when things are working it doesn&#39;t matter, but the stakes&#xA;can be very high when they stop working.&#xA;&#xA;This is true for multisig and single signer.&#xA;&#xA;---&#xA;Peter D. Gray  ||  Founder, Coinkite  ||  Twitter: @dochex  ||  GPG: A3A31BAD 5A2A5B10&#xA;&#xA;On Thu, Feb 11, 2021 at 02:29:46PM -0800, Christopher Allen wrote:&#xA;&gt; I think the key issue here is avoiding xpub key reuse in multisig. Not only&#xA;&gt; in the future with Schnorr, but we need it today!&#xA;&gt; &#xA;&gt; Current common practice by hardware wallets is the 48&#39;/0&#39;/0&#39;/2&#39; derivation&#xA;&gt; for segwit multsig ( e.g.&#xA;&gt; [90081696/48&#39;/0&#39;/0&#39;/2&#39;]xpub6DYLEkDfCdHzh5FHGHDJksQvFqu6kYANa1sfo6fA8n5ZWkSwyCRVVzyq9LY2eNGB6T9BKDeGJp2ZarjRZHd7WB95nSaFEDhFMK6zSV6D49b&#xA;&gt; ) is the only one used for ALL multisigs offered by that hardware wallet.&#xA;&gt; &#xA;&gt; As Pieter said, leveraging a HD path parameters can help, but we need a&#xA;&gt; better, less reusable path for the index.&#xA;&gt; &#xA;&gt; I personally suggest a simpler solution, which is to create an index using&#xA;&gt; a PBKDF of the Account Policy (a descriptor with all xpubs and keys&#xA;&gt; removed), plus optional notes. (BTW, I think double sha256 or HMAC is&#xA;&gt; overkill).&#xA;&gt; &#xA;&gt; Example: for the reference bit descriptor that might result in:&#xA;&gt; &#xA;&gt; ```&#xA;&gt; wsh(sortedmulti(2,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))&#xA;&gt; ```&#xA;&gt; &#xA;&gt; What Blockchain Commons (and the Airgapped Wallet Community) call a policy&#xA;&gt; map would be&#xA;&gt; &#xA;&gt; ```&#xA;&gt; wsh(sortedmulti(1,,,))&#xA;&gt; ```&#xA;&gt; &#xA;&gt; A PBKDF of that as would be unique for all 2 of 3 segwig transactions. With&#xA;&gt; the addition of the addition of the Policy Map creators optional note, it&#xA;&gt; would be truly unique. The Policy Map and/or PBKDF are small and could&#xA;&gt; easily added to existing APIs.&#xA;&gt; &#xA;&gt; So for legacy hardware, we can use existing 48&#39; subtree, but 3&#39; as the&#xA;&gt; format for this form (2&#39; is segwit), then the desktop can just ask for the&#xA;&gt; /48&#39;/0&#39;/0&#39;/3&#39;/PBKDF&#39; when it requests a new xpub from the hardware token.&#xA;&gt; More sophisticated Airgapped apps you can send&#xA;&gt; &#34;wsh(sortedmulti(1,,,))&#34;+label and let the cosigner app do the PBKDF, and&#xA;&gt; optionally allow it return something different in a full keyset (i.e.&#xA;&gt; &#34;[90081696/48&#39;/0&#39;/0&#39;/3&#39;/af3948cg…&#39;/]xpub6DYLEk…&#34;, and then the requesting&#xA;&gt; app, knowing that it is different from the PBKDF can know what to do if it&#xA;&gt; needs to what to ask for in the future.&#xA;&gt; &#xA;&gt; The other advantage of this technique is that the cosigner app can know&#xA;&gt; what policy it is participating in, before the descriptor is completed. It&#xA;&gt; may decide it doesn&#39;t want to participate in some funky 4:9 with a weird&#xA;&gt; script, and not return an xpub at all.&#xA;&gt; &#xA;&gt; Long term I think a commitment scheme should be used, so that you don&#39;t&#xA;&gt; reveal what xpub you offered until all the parties xpubs are shared, but as&#xA;&gt; Pieter said, we can do that at the same time we do the musig. But we need&#xA;&gt; to prevent xpub reuse NOW, and I think my proposal easy and could the job.&#xA;&gt; &#xA;&gt; -- Christopher Allen, Blockchain Commons&#xA;&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 488 bytes&#xA;Desc: not available&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210212/cce516d7/attachment-0001.sig&gt;</html></oembed>