{"type":"rich","version":"1.0","author_name":"npub1jqxs4ftunmm8qjyw9s80hpcayewkjfhpxund29l9qvzy7xqx4duq85jqeg","author_url":"https://nostr.ae/npub1jqxs4ftunmm8qjyw9s80hpcayewkjfhpxund29l9qvzy7xqx4duq85jqeg","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2021-02-12\n📝 Original message:Thanks everyone who has provided inputs so far!\n\nThis is the new proposal for the encryption aspect of the scheme, based on\nall the feedback.\n\nThe key derivation function would be PBKDF2, with PRF = SHA512. This should\nbe readily available on today's hardware already, as they are used for\nBIP39.\n\nDK = PBKDF2(PRF, Password, Salt, c, dkLen)\nPRF = SHA512\nPwd = HUMAN_READABLE_TITLE\nSalt = NONCE\nc = 2048\ndkLen = 256\n\nHUMAN_READABLE_TITLE is in ASCII format, minimum length = 8, maximum length\n= 20.\nNONCE is a 64-bit number.\n\nReason for going with SHA512 is due to legacy support on some hardware.\nc=2048 also mimics BIP39. It takes about ~3 seconds to derive\nthe encryption key on a 80Mhz MCU. We feel like this is a good enough\ntradeoff for this use case. The assumption here is that the secure session\nis only needed temporarily for a few hours, maybe up to one day.\n\nThe Coordinator and Signers agree and exchange these 2 secrets prior to the\nsetup. The NONCE can be converted to either:\n(a) a 6-word phrase using BIP39 wordlist\n(b) a 20-digit decimal number\n(c) a QR code\n\nDepending on the vendor. This flexibility in the data format allows each\nvendor to customize the UX based on their respective device capabilities.\n\nBest,\nHugo\n\nOn Thu, Feb 11, 2021 at 8:25 AM Dmitry Petukhov via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\n\u003e В Thu, 11 Feb 2021 05:45:33 -0800\n\u003e Hugo Nguyen via bitcoin-dev \u003cbitcoin-dev at lists.linuxfoundation.org\u003e\n\u003e wrote:\n\u003e\n\u003e \u003e \u003e \u003e ENCRYPTION_KEY = SHA256(SHA256(TOKEN))\n\u003e \u003e \u003e\n\u003e \u003e \u003e This scheme might be vulnerable to rainbow table attack.\n\u003e \u003e \u003e\n\u003e \u003e\n\u003e \u003e Thank you for pointing this out! Incidentally, Dmitry Petukhov also\n\u003e \u003e told me the same privately.\n\u003e\n\u003e My thought was that if TOKEN has the characteristics of a password\n\u003e (short ASCII string), then it would be better to use key derivation\n\u003e function designed for passwords, like PBKDF2.\n\u003e\n\u003e The counter-argument to this is that this adds another code dependency\n\u003e for vendors, if the device firmware does not already have the required\n\u003e key derivation function.\n\u003e\n\u003e Maybe this could be solved by going into opposite direction - make the\n\u003e \"token\" even longer, use the mnemoic.\n\u003e\n\u003e The issue is that entering long data of the shared key into the device\n\u003e manually is difficult UX-wise.\n\u003e\n\u003e Hww vendors that allow to enter custom keys into their device already\n\u003e have to face this issue, and those who allow to enter custom keys via\n\u003e mnemonic probably tackled this somehow.\n\u003e\n\u003e Maybe the shared key for multisig setup can be entered in the same way\n\u003e ? (with maybe additional visual check via some fingerprint).\n\u003e\n\u003e Although we would then have another issue of potential confusion\n\u003e between two procedures (entering the main key and entering the shared\n\u003e key for multisig setup), and the measures has to be taken to prevent\n\u003e such confusion.\n\u003e\n\u003e The approaches can be combined - specify a key derivation function\n\u003e suitable for passwords; via secure channel, share a password and/or the\n\u003e derived key. If hww supports derivation function, it can derive the key\n\u003e from password. If hww supports only keys, the key can be entered raw or\n\u003e via mnemonic.\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\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210212/cb8584f3/attachment-0001.html\u003e"}
