Skip to content
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

Support HD derivation of master blinding key #232

Open
wants to merge 1 commit into
base: elements-0.14.1
Choose a base branch
from

Conversation

instagibbs
Copy link
Collaborator

@instagibbs instagibbs commented Aug 8, 2017

For new wallets.

The key is generated as a hardcoded path m/0'/2'. Considerations:

  1. The key has to be stored outside the crypted keystore to be able to decrypt outputs passively. Otherwise the user would be required to unlock their crypted wallet, and the blinding key would change when the user switched over to a crypted wallet.
  2. The key shouldn't be accidentally re-used as authorization for an output

Therefore I used a special fixed derivation path that will not collide with normal wallet usage, and have the raw key stored in public like before. Steps to recover the blinding keys exactly mirrors the process of the regular keys: Store the wallet.dat before and after crypting.

@jtimon jtimon added the 0.14.1 label Oct 10, 2017
@jtimon
Copy link
Contributor

jtimon commented Sep 7, 2018

what's the status on this? perhaps it can be a backport now?

@instagibbs
Copy link
Collaborator Author

Huh I thought I had done this long ago. I'll rebase it.

@instagibbs
Copy link
Collaborator Author

rebased and changed to m/0'/2' to not collide with future changepath in newer versions of Core wallet/

@instagibbs
Copy link
Collaborator Author

Also note that this key will also by lost if the user doesn't update post-encrypting their wallet and their wallet.dat is lost.

@jtimon jtimon added 0.14.1 and removed 0.14.1 labels Oct 16, 2018
@instagibbs instagibbs added the needs port Needs backport to a different branch label Mar 25, 2019
@instagibbs
Copy link
Collaborator Author

This needs porting to master

delta1 pushed a commit to delta1/elements that referenced this pull request Apr 9, 2023
…let loaded

0237d95 qt: Add Load PSBT functionaliy with nowallet (Prateek Sancheti)

Pull request description:

  This PR provides a fix to the issue mentioned in ElementsProject#232.

  Currently, the **_Load PSBT_** functionality works well in case a wallet is loaded but does nothing when a wallet isn't loaded.

  If a function cannot work without a wallet being loaded, it is disabled by default (It is unclickable as shown in the image).

  For e.g. One cannot `Close Wallet` or `Backup Wallet` or `Sign Messages` without a wallet being loaded. And hence they are disabled. But if you notice, `Load PSBT` options are not disabled by default even when a wallet isn't loaded.

  >  ![Screenshot 2021-08-07 at 11 46 30 PM](https://user-images.githubusercontent.com/54016434/128610208-45376026-0e91-4268-abdf-342e3cec5917.png)

  As mentioned by hebasto in the issue description :

  ```
  <hebasto> achow101: does "File" -> "Load PSBT from {file|clipboard}" make any sense when no wallet is loaded?
  <achow101> hebasto: yes, for finalize and sending
  ```

  This means **_Load PSBT_**  should be working just as similar whether wallets are being loaded or not.

  After making the required changes to the code, The **_Load PSBT_** works as expected even with no wallet loaded and the PSBT is finalized.

  | Master | PR |
  |-------------|---------------|
  | ![Hnet com-image (1)](https://user-images.githubusercontent.com/54016434/128611454-4dfc3fd3-ecc0-48f0-8408-60eb98035694.gif) | ![Hnet com-image (2)](https://user-images.githubusercontent.com/54016434/128611461-982468d2-9cd0-4f9b-9392-c25b6c8857e2.gif) |

  Close ElementsProject#232

ACKs for top commit:
  achow101:
    re-ACK 0237d95
  hebasto:
    ACK 0237d95, tested on Linux Mint 20.2 (Qt 5.12.8).

Tree-SHA512: 8d928c5bfd3c2b286ddcacd0b367c872de8bc3d3d9d82280faeadc60d738b86af328c060b5763ade364c9b386b23f95580c2eb1147b16373fbb713170c100350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.14.1 needs port Needs backport to a different branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants