Implement private key / hardware wallet signing protocol for Electron #921
Labels
type: discussion
Items that are primarily a discussion around a feature or issue. May evolve to be actionable.
The Problem
The current Electron build can't unlock Ledger wallets because of the lack of U2F support (Digital Bitbox would also not work, once that integration is in.) It also doesn't do anything to improve security for generated wallets. While we could do some in-app node integration, this would open us up to a bunch of potential security holes, should someone get access to the Javascript in the Electron window context.
The Proposal
We come up with a protocol that allows for asynchronous private key actions, like generation, transaction signing, message signing, all that good stuff. This would not be dissimilar to Metamask or hardware wallets, where the private key is never externally communicated.
Using an Electron custom protocol, we should implement a few methods that get communicated to via
mycrypto://
urls or some such. When you want to do anything that requires a private key, you'll shoot a POST request to something likemycrypto://sign-tx
, and it'll open up a separate Electron window that allows the user to enter a password / unlock their hardware wallet, verify the transaction data, and send back a signed transaction to the request.Both Ledger and Digitial Bitbox both have HID implementations that could work with
node-hid
. So we can go directly to the devices without the U2F middleman in the Electron node environment.What We'd Need To Do
Credit where credit is due: This idea was inspired by Aragon's blog post about their Electron app + integrating MetaMask.
The text was updated successfully, but these errors were encountered: