Hierarchical Deterministic Wallet
See original GitHub issueIn accordance with #644 we need to implement a Hierarchical Deterministic Wallet, ideally in BIP44 standard, that is creates child keys compatible with our account structure and is implemented using our same cryptographic primitives. The best approach may be to overload methods in some existing bitcoin wallet libraries, bitcoinj and ACINQ’s bitcoin-lib or perhaps web3j. The goal of this project is an executable that when passed a 12 word mnemonic code, an account hash, and a signable payload, will return the signed payload which was signed by the corresponding account hash as well as corresponding unit tests.
In terms of the derivation path of the BIP44 standard, we’ve decided on an coin type of index 1137
(the fine structure constant) with a full path of M/44H/0H/1137
.
Note, this should be marked experimental until verification of its compatibility with a BLOS application on a hardware wallet #644 and a prerequisite for testing the implementation of #644.
Acceptance criteria:
- Implementation of hd wallet in BIP44 specification with the above derivation path
- Executable that when passed a 12 word mnemonic code, an account hash, and a signable payload, will return the signed payload which was signed by the corresponding account hash
- Unit tests for functionality of 1 and 2
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Awesome thanks so much @coranos! I went over your blue-app-constellation yesterday and I noticed that I left out a couple parameters we need in the run length encoding (sorry 🤦♂ ) so I updated the ticket for our changes on the protocol side to reflect what we need to add. tl;dr we just need to add 3 more fields between amount and salt to be parsed by the BOLOS app, as detailed above.
Also, I went through and made an initial implementation of changes to our signing flow to use the run length encoding as a payload. We’re going to be testing incorporating those changes in our last sprint before main net and we’ll deploy on the testnet for e2e testing beforehand. If you’d like to follow along, this will be slotted for after #887 in the todo column of the project board.
Also, I’ve made an initial implementation of a BIP44 hd wallet for Constellation here which we can use for testing (and also the Molly wallet). The keygen should work as intended since we’re (essentially) using the same as btc, but I still need to double check that the address generation logic was ported properly (we actually don’t need it) but will confirm and share either way. Once I’ve wrapped up the hd tree I can help make unit tests for blue-app-constellation too.
Anyways, let me know if there are any issues with adding those 3 fields to the payload and I’ll share the hd wallet once tested 💪
The code is ready, just waiting for constellation to tell me to test it on mainnet.
https://github.com/coranos/blue-app-constellation