-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware wallet support #663
Comments
As discussed previously, Joinmarket coinjoins can't be instantiated in current hardware due to the requirement of generating PoDLEs. See a recent PR by Jonas Nick to secp256k1 that includes these PoDLEs (aka DLEQs), in particular here: https://github.com/jonasnick/secp256k1/pull/14/files#diff-a684b19a811e1813f1ab819b12c97ca0R98 But I see no realistic prospect of this getting into hardware any time soon. |
Ahh, yes, forgot about PoDLEs. But Trezor and Coldcard firmware's are open source, so that's probably solveable even if they aren't so much interested in this (although, nvk has said on twitter previously that they want to support JoinMarket, see twitter links in related old JM issue). |
I'm closing this because I don't want Issues open that are not actionable, and I see no way of actioning it. Perhaps if anyone wants they can reopen this with a specific plan to support hardware wallets in some way. An example might be doing "manual" coinjoins, but that thought would need fleshing out. |
Someone just raised this on IRC and it may me reflect on it again - in particular, it should be possible to do this without changes to hardware wallets, but - it's going to be tricky and quite limited! : Taker:
NB external commitments could be prepared from the same BIP49 wallet, in advance, on Joinmarket, and then that wallet is "opened" on HW and the JM wallet could be deleted. I guess that is actually a reasonable idea. (Maker I guess it is possible if there some kind of connector between HW and JM which is automatic. My problem with this line of thinking was always: hasn't this effectively made the HW become a hot wallet, if it automatically signs without human intervention?) (Let's state the obvious - the Maker doesn't have the PoDLE problem ... also it's exactly in this scenario that we have to worry about the now-famous attack on automated coinjoin - what if HW is tricked into signing two different versions of the same transaction, thinking it has spent less than it actually has.) |
I just remembered there is already a "WatchOnly" wallet in |
For the Maker side: So it seems like the biggest issue there would only be for any particular hardware wallet to support the use case - that is, to have a mechanism for signing to be automated via code, without manual verification and input. It's not hard to imagine that most consumer hardware wallets will not and probably should not support such a thing, because its existence might end up creating a backdoor for attackers. On the other hand, certain hardware wallets in certain situations might want to (and for all I know, perhaps they already do) support such automated signing use cases. This line of thinking is of course relevant to Lightning as well as coinjoins. |
Thanks for sharing these insights @AdamISZ, very interesting and helpful for onlookers. Although I find the idea of JoinMarket hardware wallet integration very interesting and exciting, I share your concerns about how this could defeat the very purpose of using a hardware wallet in the first place (cold-storage becoming hot). I thought I'd chime in to mention the ColdCard HSM mode, CKBunker in case you're not already aware of it. Perhaps it could be possible to take advantage of the CKBunker (or an equivalent HSM) to create a JoinMarket maker, "constrained" connected hardware wallet, that could potentially be used to mitigate some of the additional risks associated with deploying a hardware wallet as an online maker. I haven't personally looked into this a great deal yet, but it seems to me as though there could be at least potential for a beneficial CKBunker/JoinMarket combination, for hardware wallet support - perhaps worthy of further exploration. |
CoinKite has detailed some of the functionality of the ColdCard HSM mode here: In effect, the setup permits the creation and loading of a "policy file" to the device which cannot be changed or overridden without physical access to the device. This policy file could perhaps be used to narrowly constrain the role of maker and somewhat enhance the security of the always online makers. While in "HSM Mode", the ColdCard can automatically sign transactions as required for a maker, but only those that satisfy the constraints defined within the policy file. This could fit the bill well. |
About taker proposal above - usefulness of that would go beyond hardware wallet support, it would also allow integrating JoinMarket with other wallets, for example, sending CoinJoin's from Bitcoin Core wallet or integrating JoinMarket support in Wasabi Wallet. How I see it:
Somebody correct me if I'm missing something. |
In Wasabi I think the transition plan could be: Add a config entry: Then over time it'd turn out if it'd be useful or not and we can default to true from there on. But before all that, the question that arises for me is that if it even provides any privacy at all or just brainlessly making users spend more on fees. Would the makers yield generation activity be so distinct on the blockchain that Wasabi users who're takers only would be distinguished by their histories and future activities and so get deanonymized easily? |
@nopara73 This is valid question without a simple answer IMO. It depends on usage patterns of existing JM users, mainly, how often they mix maker and taker roles (there is some hope #487 will improve that) and, if they do, how often they also do non-cj sends and payjoins. One thing that could already de-anonymize Wasabi users is plan for 2 participant JM coinjoins, as they are very rare currently, with default configuration sendpayment.py will refuse to continue if there aren't at least 4 other counterparties. |
Here's nice approach by Bitcoin Core - bitcoin/bitcoin#16546, probably could steal some ideas. Planning to test and review it.
|
This has been sitting in the background as 'something many of people want to have, but almost zero people are going to do anything about it' :) I think the maker side is the most likely to work. Areas of development are:
|
There was issue about hardware wallet support for yield generators in old JM github repo - JoinMarket-Org/joinmarket#537, let's move further discussion here. And also extend it also to the taker side.
Trezor has implemented some support for CoinJoins in their firmware, haven't yet carefully looked through details, but at first glance seems to be usable for a single joins as a taker - trezor/trezor-firmware#1127. Which could be useful in cases when you, for example, have tumbled your coins to the hardware wallet first and then after some time want to do some payment from it in a more private way.
The text was updated successfully, but these errors were encountered: