<oembed><type>rich</type><version>1.0</version><author_name>npub1jqxs4ftunmm8qjyw9s80hpcayewkjfhpxund29l9qvzy7xqx4duq85jqeg</author_name><author_url>https://nostr.ae/npub1jqxs4ftunmm8qjyw9s80hpcayewkjfhpxund29l9qvzy7xqx4duq85jqeg</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-02-11&#xA;📝 Original message:*BIP39 seed words list.&#xA;&#xA;On Thu, Feb 11, 2021 at 11:11 AM Hugo Nguyen &lt;hugo at nunchuk.io&gt; wrote:&#xA;&#xA;&gt; Hi Pavol,&#xA;&gt;&#xA;&gt; On Thu, Feb 11, 2021 at 8:25 AM Dmitry Petukhov via bitcoin-dev &lt;&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; В Thu, 11 Feb 2021 05:45:33 -0800&#xA;&gt;&gt; Hugo Nguyen via bitcoin-dev &lt;bitcoin-dev at lists.linuxfoundation.org&gt;&#xA;&gt;&gt; wrote:&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; &gt; &gt; ENCRYPTION_KEY = SHA256(SHA256(TOKEN))&#xA;&gt;&gt; &gt; &gt;&#xA;&gt;&gt; &gt; &gt; This scheme might be vulnerable to rainbow table attack.&#xA;&gt;&gt; &gt; &gt;&#xA;&gt;&gt; &gt;&#xA;&gt;&gt; &gt; Thank you for pointing this out! Incidentally, Dmitry Petukhov also&#xA;&gt;&gt; &gt; told me the same privately.&#xA;&gt;&gt;&#xA;&gt;&gt; My thought was that if TOKEN has the characteristics of a password&#xA;&gt;&gt; (short ASCII string), then it would be better to use key derivation&#xA;&gt;&gt; function designed for passwords, like PBKDF2.&#xA;&gt;&gt;&#xA;&gt;&gt; The counter-argument to this is that this adds another code dependency&#xA;&gt;&gt; for vendors, if the device firmware does not already have the required&#xA;&gt;&gt; key derivation function.&#xA;&gt;&gt;&#xA;&gt;&gt; Maybe this could be solved by going into opposite direction - make the&#xA;&gt;&gt; &#34;token&#34; even longer, use the mnemoic.&#xA;&gt;&gt;&#xA;&gt;&gt; The issue is that entering long data of the shared key into the device&#xA;&gt;&gt; manually is difficult UX-wise.&#xA;&gt;&gt;&#xA;&gt;&gt; Hww vendors that allow to enter custom keys into their device already&#xA;&gt;&gt; have to face this issue, and those who allow to enter custom keys via&#xA;&gt;&gt; mnemonic probably tackled this somehow.&#xA;&gt;&gt;&#xA;&gt;&gt; Maybe the shared key for multisig setup can be entered in the same way&#xA;&gt;&gt; ? (with maybe additional visual check via some fingerprint).&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; You just gave me a great idea! We can reuse the BIP32 seed words list!&#xA;&gt; Perhaps the encryption key can just be 6 words, but it&#39;ll be derived the&#xA;&gt; same way. BIP39 also uses PBKDF2 as a key derivation function, so it&#xA;&gt; matches with what you described here.&#xA;&gt;&#xA;&gt; And all HWW should have this functionality already.&#xA;&gt;&#xA;&gt; Best,&#xA;&gt; Hugo&#xA;&gt;&#xA;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Although we would then have another issue of potential confusion&#xA;&gt;&gt; between two procedures (entering the main key and entering the shared&#xA;&gt;&gt; key for multisig setup), and the measures has to be taken to prevent&#xA;&gt;&gt; such confusion.&#xA;&gt;&gt;&#xA;&gt;&gt; The approaches can be combined - specify a key derivation function&#xA;&gt;&gt; suitable for passwords; via secure channel, share a password and/or the&#xA;&gt;&gt; derived key. If hww supports derivation function, it can derive the key&#xA;&gt;&gt; from password. If hww supports only keys, the key can be entered raw or&#xA;&gt;&gt; via mnemonic.&#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;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210211/a7915106/attachment-0001.html&gt;</html></oembed>