18

Both Bitcoin and Ethereum private keys are usually a 256-bit number, isn't it possible to use the same private key for both Bitcoin wallets and Ethereum accounts?

For instance, the Bitcoin wiki states:

In Bitcoin, a private key is usually a 256-bit number (some newer wallets may use between 128 and 512 bits), which can be represented one of several ways. Here is a private key in hexadecimal - 256 bits in hexadecimal is 32 bytes, or 64 characters in the range 0-9 or A-F.

E9 87 3D 79 C6 D8 7D C0 FB 6A 57 78 63 33 89 F4 45 32 13 30 3D A6 1F 20 BD 67 FC 23 3A A3 32 62

Which is (removed the whitespaces):

e9873d79c6d87dc0fb6a5778633389f4453213303da61f20bd67fc233aa33262

With MyEtherWallet I generated the corresponding public key for Ethereum:

0x60751Ab56d58781069b1C73064aD580dAde1F469

Now I see not every 256-bit number is a valid ECDSA private key for bitcoin. Can I use the same private key for Ethereum and Bitcoin? Is there a convenient way to generate both the ETH and BTC public key from any 256-bit random number?

This would be a cool way to store Ether and Bitcoin on the same account. Is it possible?

18

Yes, both cryptocoins use the same elliptic curve SECP256K1.

Perhaps a better alternative is to use a BIP32 wallet. You have a master key that is not directly used for transactions, but it is used to derive child keys than can be used.

You can derive separate keys for bitcoin and ethereum. You will always be able to use the master key to sign transactions for both keys.

  • @5chdn check out BIP 44 for a wallet scheme that enables using multiple cryptocurrencies with the same HD private key – Loourr Oct 7 '17 at 21:42
  • "Yes, you can"...but how does one do so? If I already have an appropriately backed up appropriately secured cold bitcoin wallet, how can I just reuse it for ethereum? – JamesTheAwesomeDude Dec 11 '17 at 21:08
  • @JamesTheAwesomeDude If you have a BIP44 compatible wallet, you can generate keys using a path. For ethereum the more common path is m/44'/60'/0'/0, but there's no standarized path ethereum.stackexchange.com/questions/19055/… and github.com/ethereum/EIPs/issues/84. – Ismael Dec 11 '17 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.