Closed ChristopherA closed 3 years ago
I'll take the lead for this project.
In LetheKit (samd51/esp32): export extended public keys, seed and shamir shards in different formats.
WIP:
[x] soldering and assembly on a protoboard
[x] run current code in master: running seltest in terminal
[x] there are some PRs open regarding display which might need some work/review first before being able to run the project fully
[x] resolve compiler warnings
[x] resolve https://github.com/BlockchainCommons/bc-lethekit/issues/30
[x] read relevant parts of documentation: BIP32, BIP44, BIP84, slip132, slip39, BC spec on UR format
[x] Find corresponding well vetted open source libraries (bip32, embedded-systems friendly) and ask BC for approval to use them
---- MILESTONE 1: project established ----
[x] Given a seed generate bip32 root key, extended private and public keys. First work with P2PKH, then with P2WPKH etc. Properly encode.
[x] Take into account different parameters (network: mainnet/testnet, slip132) properly
[x] show derivation path and key, e.g.
[m/84h/0h/0h] zpub6qh5MD3wwNEgo5GbUbn6Q5kJDNFgbWPVmDgQ74foVEE6Ytqp1zstEEYtgJYFfjVtQyzQXFMkQaNuwXMMcu9kiUwACjpkAuzcmCpnVCsSRj7
[x] give user an option to choose derivation path
[x] Allow user to choose from different export formats (qr, text, qr encoded text, UR format etc.)
[x] allow user to export seed in different formats (qr encoded UR format etc.)
---- MILESTONE 2: the fun part / programming bitcoin ----
[x] option to export shamir shard
[x] write tests: use a couple of test vectors from bip32 etc.
[x] documentation
[ ] minor changes wrt reviewer's feedback + publicity. Due to reviewer's being busy i will finish this point outside of the milestone if necessary
--- MILESTONE 3: bonus features and documentation ---
@gorazdko wrote:
I'll take the lead for this project.
Great!
Export extended public keys, seed and shamir shards in different formats.
I presume the target is the current LetheKit? Are you able to build this yourself or do we need to send you one?
weekly deliverables
I would suggest start with 2 or 3 critical milestones, with the last one including a wrap up details, document, and publicize the additions to LetheKit.
read relevant parts of documentation:
@wolfmcnally has been working on defining CBOR targets for the various binary objects that we would then encode in bc-32, then encode as UR and then encode as QR. You should add "watch" to that repository. You should review this as you learn more.
Find corresponding well vetted open source libraries
Hopefully these are the ones that we are also using in seedtool-cli https://github.com/BlockchainCommons/bc-seedtool-cli. This is another repository you should add to your "watch" subscriptions. You should definitely consider help @wolfmcnally build this for more platforms, it is our reference input. He is working now on requirements for key tool-cli.
I also have some small wishlist items when we open up the hood on the LetheKit code. For instance, leveraging the TRNG to add 64 (or 128) bits to the randomness. https://github.com/BlockchainCommons/bc-lethekit/issues/30
-- Christopher Allen
I presume the target is the current LetheKit? Are you able to build this yourself or do we need to send you one?
I will build it myself. I have ordered the parts and should come any day now.
I agree with your points and have subscribed to relevant projects.
I also have some small wishlist items...
i have updated my scoping post with status, tasks and milestones
Closing out summer, 2020 Issues. Thanks to @gorazdko for support in LetheKit, keytool, seedtool, and other projects! We recently announced our Feature-Kit LetheKit release.
On Fri, Jun 5, 2020 at 7:06 AM @ ksedgwic wrote:
I think the first priority should be:
I'd like to see along the way to XPUB that seeds can be export as QR encoded UR format as well, for the purpose of reference implementation as some wallet vendors would like to interchange/backup seeds, not that LetheKit's user model needs it (LetheKit's user model is keep master key forever secret). But adding QR seed export doesn't hurt LetheKit's model.
Though I feel that XPUB is the first priority, the ability to export a Shamir shard (note that our bc-shamir >= slip-39 as it can support encoding private metadata) as a QR encoded UR format is my second in priority. This is because this feature DOES fit into LetheKit's user model — you can bring 5 mobile phones or other QR readers into a vault, give each one a different shard, and the master key never leaves the original LetheKit.
I think this XPUB project would be a great 8-12 week internship project, and quite doable, with some extra credit if the seed QR and shard QR export can also be added.
Adding a camera to LetheKit (aka v1) is obviously really important longer-term, but I think it could exceed the scope of an good internship project.
For LetheKit the compatibility with small safe deposit box size is my highest priority, plus maybe an optional 9-volt battery adapter so you can bring power in and not charge from USB. I eventually might like to see USB locked just behind the screws in the case.
I am quite interested in these as well, but they also feel more long term (Fall?).
First off, adding NFC and any network go beyond the LetheKit model (i.e. it's a LetheKit because it forget the keys), so the compatibility with LetheKit form factor and feature set is less important. Larger transaction sizes and requirements for Lightning metadata are also more important for Lightning Network, so animated QR support may be required, which is still evolving.
I also would like to first see Bitcoin Standup support Lightning (a possible other summer internship project) along with some mobile phone talking to Bitcoin Standup Lightning first (another possible summer internship project).
All of these additional projects I can see us doing, but I'd like to focus on the initial LetheKit QR ones first as they approachable, doable, and supportable this summer in the internship program.
— Christopher Allen