-
Notifications
You must be signed in to change notification settings - Fork 386
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
Pick a blinding key/blinding factor standard compatible with hww++ #448
Comments
Quick thoughts:
|
Yes there is the 10 depth requirement. We also need to avoid intentional txid prefix collisions by attackers, so likely not a good idea to truncate. |
But right now the addresses are derived with hardened derivation (the path I see in dumped wallet is like
|
An argument against using Hash(some_pubkey_in_odd_hardened_path) - if there's a clash in derivation paths, and somehow for example 0x80'BLN' (0x80424c4e) derivation index gets reused, the pubkey is much likely to be revealed than privkey. If hash is used on top of bip32 derivation to get blinding key, it should be Hash(some_privkey_in_odd_hardened_path), in my opinion, and not pubkey. |
Chunk up and use as indexes would be just 10 HMACs in succession with 31-bit chunks of the same data mixed in - as far as I understand, if underlying hash function is not broken, there's no advantage against one HMAC across all the data. |
This issue isn't relating just to Elements node software, but also to any other possible implementation of blinding derivation.
The device may not give up the privkey at all, like a Ledger or other hww. |
Here are some thoughts about key derivation, with future compatibility to Green Address and Hardware wallets in mind. What we're currently doing is as follows: Incoming transactions:
Outgoing transactions:
The problem here for outgoing transactions is that after a backup has been restored, we can only restore the outgoing transactions that happened before the backup. We should instead do the following for outgoing transactions:
This means that after a backup has been restored, we can always recover everything from the chain. In particular, we can unblind past outgoing transactions in essentially the same way as we unblind incoming transactions, namely as we were the receiver but with the "other" half of the ECDH. For incoming transaction, it somehow depends on what we want:
|
A simple(currently unused) hardened derivation path should suffice for deriving this master. Something like #232 but maybe less randomly chosen. |
That sounds reasonable too, assuming HD wallets. |
Hi, is this description still up-to-date? I just found out about this thread, and the proposal for computing the I also think that the proposal for computing the |
Yeah I'm surprised to see this old thread around. I think we settled on suggesting SLIP-077 for deriving blinding keys. It's indeed what Green and libwally do. |
Currently we kind of YOLO how these keys are derived, in that a backed up
wallet.dat
will properly restore funds, but these schemes are not cross-compatible with devices such as hardware wallets, and wallets that may not allow raw privkey export.So I think for blinding derivation stuff we basically have:
txid:nOut
, or chunk up the txid and use it as a few normal derivation indices.The text was updated successfully, but these errors were encountered: