Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: epsi1on on September 03, 2022, 08:57:53 AM



Title: Use same private key for multiple bitcoin-based coins, good idea?
Post by: epsi1on on September 03, 2022, 08:57:53 AM
is it a good idea to use same private key for keeping Bitcoin and Litecoin and Dodgecoin?
I do not mean seed phrase, but a raw 32 byte random private key.
Private key will give us a public key, that can be used to generate address for BTC, LTC and Dodgecoin. I dont think there be any problem with this, what you think?


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: NotATether on September 03, 2022, 09:09:17 AM
That is what BIP44 had in mind when designing the following derivation paths:

purpose' / coin_type' / accout' / change / address_index

Where coin_type is some integer that uniquiely identifies a particular coin, and *must* be standardized by the respective altcoin (for example, BTC always sets it to 0).


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: joniboini on September 03, 2022, 10:06:04 AM
IMO this is how most mobile wallet operates too, albeit using a seed phrase. I think other than the risk of someone getting your private key and stealing all your assets, there is no tangible risk. So make sure to protect your key with extra protection. CMIIW.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: o_e_l_e_o on September 03, 2022, 12:01:13 PM
Private key will give us a public key, that can be used to generate address for BTC, LTC and Dodgecoin. I dont think there be any problem with this, what you think?
It's definitely a security risk.

Even using the same private key or seed phrase across multiple bitcoin wallets is a security risk. The more different pieces of software you import a key or seed phrase to, then the more potential security bugs or vulnerabilities you expose it to, and the more chance of something going wrong. I don't use Litecoin or Dogecoin, but given that Doge is a literal memecoin, then I would bet a lot of bitcoin on the fact that many of its wallets and other software are far more buggy and less secure than similar bitcoin wallets. Even if your key isn't stolen directly, then something fairly simple like reusing r values can result in your private key being calculated by an attacker.

I wouldn't even use the same private key to generate both a legacy and a segwit address in bitcoin. I think it's a bad idea to use the same private key across different coins.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: BlackHatCoiner on September 03, 2022, 12:42:21 PM
There are security risks as said above, but let's assume there aren't. What's the benefit of reusing the same private key for multiple Bitcoin-based coins? Even if you don't want to take the time to write down multiple paper wallets (which is the only reason I understand to read a private key?), and just want one private key representing multiple balances, you know that WIF isn't the same across Bitcoin, Litecoin and Dogecoin, right? A Bitcoin-based WIF doesn't have the same prefix as a Litecoin-based one.

I don't use Litecoin or Dogecoin, but given that Doge is a literal memecoin, then I would bet a lot of bitcoin on the fact that many of its wallets and other software are far more buggy and less secure than similar bitcoin wallets.
Not only buggy, but most are even abandoned, closed-source projects. From dogecoin.com/wallets (https://dogecoin.com/wallets/), we have:

  • Dogecoin Core, which is the main Dogecoin client. I challenge you to sync the chain, last time I tried, 1-2 nodes were available and couldn't send me more than a few kilobytes per second.
  • MyDoge. Closed-source, Android and iOS based Dogecoin wallet.
  • Dogechain.info. Browser-based wallet whose source code I can't find.
  • Coinbase Wallet app. Lol.
  • BitPay. Double lol.
  • TrustWallet. A half-open-source, half-closed-source, mobile-only wallet.

Then we have Trezor. They don't even understand what's the correct order to show them. Whoever supports Dogecoin for being a decentralized, transparent, open-source currency (as told in main page (https://dogecoin.com/#what-is-dogecoin)) is benighted the least.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: NotATether on September 03, 2022, 03:03:56 PM
  • Dogecoin Core, which is the main Dogecoin client. I challenge you to sync the chain, last time I tried, 1-2 nodes were available and couldn't send me more than a few kilobytes per second.

I am shocked by this. How on earth then do these wallets operate with scant node connections, and the devs and other personalities have the luxury of considering such ideas as Proof of Stake (for example)?


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: o_e_l_e_o on September 03, 2022, 03:11:49 PM
Then we have Trezor.
A decent multi-coin hardware wallet would be the only way that I would use the same seed phrase to hold multiple coins. Because of the BIP44 schematic NotATether has pointed out above, and the hardened paths in the the first three fields, if one altcoin account was to leak its private key(s) or even its master keys, then an attacker cannot use those keys to calculate the private keys for other assets at different paths. This is a much safer solution to simply using the same private key for multiple coins.

How on earth then do these wallets operate with scant node connections
I've never used Dogecoin so I have no idea, but blockchair.com lists 420 nodes at the chain tip: https://blockchair.com/dogecoin/nodes


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: BlackHatCoiner on September 03, 2022, 03:36:06 PM
I am shocked by this. How on earth then do these wallets operate with scant node connections, and the devs and other personalities have the luxury of considering such ideas as Proof of Stake (for example)?
Answer: Storytelling. Dogecoin is nothing but a marketing scam. I'm convinced that more than 90% of its users hold it on centralized exchanges, not only due to scant connections but due to scant rationale; most don't even know there's an alternative.

I've never used Dogecoin so I have no idea, but blockchair.com lists 420 nodes at the chain tip: https://blockchair.com/dogecoin/nodes
When I had tried to sync, I hadn't seen this. I let the software find some nodes, found none, then I googled for an online node list and found a long one in which only 2 were working. And by that speed, I'd probably still be syncing.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: Cricktor on September 03, 2022, 06:08:29 PM
That is what BIP44 had in mind when designing the following derivation paths:

purpose' / coin_type' / accout' / change / address_index

Where coin_type is some integer that uniquiely identifies a particular coin, and *must* be standardized by the respective altcoin (for example, BTC always sets it to 0).

You assume one particular set of mnemonic words which represent a certain entropy value from which the HD-wallet is subsequently derived? Different coin_type values lead to different derivation paths and you don't get the very same private keys at all because different derivation paths always lead to different wallets with different private keys.

The OP doesn't ask for a scenario with the same mnemonic words but for the very same private key used for different coins. For various reasons I wouldn't reuse a particular private key for different coins, as I can't figure out a good reason to do it! Why bother the risk?


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: pooya87 on September 04, 2022, 03:20:27 AM
When I had tried to sync, I hadn't seen this. I let the software find some nodes, found none, then I googled for an online node list and found a long one in which only 2 were working. And by that speed, I'd probably still be syncing.
I did a quick check and it seems like there aren't that many DOGE nodes available, I even did a quick DNS dig and pinged some of the IP addresses, many of them weren't responding. However I could find a bunch that did. Here is a list:
Code:
176.9.44.148
58.96.43.57
213.239.194.152
116.203.88.165
144.76.24.74
15.204.13.136
70.80.25.29
199.68.199.19
45.79.237.61
185.220.101.162
108.12.219.126


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: pooya87 on September 04, 2022, 02:41:37 PM
[3] https://opreturn.net/dogecoin/node/ (https://opreturn.net/dogecoin/node/)
Out of the IP addresses of the 24 connected nodes listed here, only 8 of them are reachable and work (haven't checked their block height or whether they supply DOGE blocks). 7 are dead/unreachable IPs, the rest don't accept any incoming connections.
Code:
18.167.91.48:57649 DEAD
88.99.103.51:22556 (no inbound)
116.203.199.54:53232 LIVE
13.212.204.190:50814 DEAD
18.167.91.48:14820 DEAD
54.145.114.66:43598 DEAD
188.166.62.180:33567 LIVE
159.223.55.56:22556 (no inbound)
13.250.127.178:33764 DEAD
64.31.33.36:22556 LIVE
24.96.60.94:22556 LIVE
10.0.0.186:48424 (doesn't work)
207.180.250.174:22556 (no inbound)
185.130.44.4:55010 LIVE
185.130.44.4:37404 (duplicate)
138.201.123.35:47114 LIVE
138.201.123.35:59952 (duplicate)
34.231.252.155:2637 DEAD
192.222.139.154:42218 DEAD
138.201.123.35:42560 LIVE
82.79.169.127:57714 LIVE
[2a01:4f9:1a:995a::2]:22556 (no inbound)
54.36.62.114:22556 (no inbound)
173.173.82.207:22556 (no inbound)


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: BlackHatCoiner on September 04, 2022, 03:04:22 PM
only 8 of them are reachable and work (haven't checked their block height or whether they supply DOGE blocks).
And I don't cross my fingers they're the best in terms of bandwidth and speed. And that's before we even mention there's no Tor network. (Last time I tried, again)

In fact, they've even plagiarized the tor.md from the Bitcoin repository (http://web.archive.org/web/20180831020234/https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md). And they're being called "developers"? If copying and pasting source codes, replacing a few lines, and writing some dumb texts like "such money, wow" made you a developer, we could all be one. They're just trash who're good at storytelling. Nothing more, nothing less.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: NotATether on September 04, 2022, 03:30:49 PM
In fact, they've even plagiarized the tor.md from the Bitcoin repository (http://web.archive.org/web/20180831020234/https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md). And they're being called "developers"? If copying and pasting source codes, replacing a few lines, and writing some dumb texts like "such money, wow" made you a developer, we could all be one. They're just trash who're good at storytelling. Nothing more, nothing less.

Are you sure they actually ripped off the file word-for-word and it wasn't included in the code fork?

The docs are technically under a free license, but I agree that it would look bad on them if they didn't at least fix the references to Bitcoin Core.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: epsi1on on September 04, 2022, 03:59:13 PM
Thanks for replies...

What's the benefit of reusing the same private key for multiple Bitcoin-based coins?
That's the point. Reusing the pvt key for long time hold.
The process of making a (cold - secure) private key is a little hard to me, use an fresh offline PC to generate random 32 byte pvt key, then write the 64 character HEX on the paper in order to do not use a printer :) then test it on testnet and finally there is a tested and functional pvt key. then generate the pub key and keep it on my online PC. Sounds like masochism right?

Also, me wasn't able to find good tools for generating wallets for LTC and DOGE, so rather to make a BTC paper wallet, then use its address to generate LTC and DOGE wallets. Note that i'm (probably) not like one of the guys here who use bitcoin core and are sync with the network. so will use light tools like coinb.in which supports BTC LTC DOGE.

you know that WIF isn't the same across Bitcoin, Litecoin and Dogecoin, right? A Bitcoin-based WIF doesn't have the same prefix as a Litecoin-based one.
Yes, the tools me using do support hex pvt key. so do not use WIF at all.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: BlackHatCoiner on September 04, 2022, 04:24:17 PM
That's the point. Reusing the pvt key for long time hold.
Nobody writes down private keys now more, it's a lot of fuss. That's why we have seed phrases.

Here's what you're going to do:

  • Go to iancoleman.io/bip39 (https://iancoleman.io/bip39/) and study/test it. Don't send money to any address, just test the software and understand how a HD (hierarchical deterministic) wallet works.
  • Once you understand, format one of your hard drives and install an open-source operating system (such as Ubuntu).
  • Go to the same page, and download the source code: https://github.com/iancoleman/bip39/releases/tag/0.5.4
  • Verify the signature (https://github.com/iancoleman/bip39/releases/download/0.5.4/signature.txt.asc) using his public key (https://iancoleman.io/pubkey.txt). (Import the public key with gpg --import pubkey.txt and verify the signature with gpg --verify signature.txt.asc)
  • Once done, check that the hashes match with: sha256sum bip39-standalone.html
  • Turn off the Internet connection.
  • Now generate a seed phrase just once, and you can access multiple currencies.

If you don't understand some steps, please let me know and I'll try to explain better.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: o_e_l_e_o on September 04, 2022, 07:15:00 PM
-snip-
These are good instructions, bar two points.

Firstly, as much as I use Ian Coleman's site, and have been through the code at length and am completely happy with what it is doing, I would not use Ian Coleman's site to generate my seed phrase, for reasons explained here: https://bitcointalk.org/index.php?topic=5324030.msg56590276#msg56590276. A better option would be to either use /dev/urandom or Bitcoin Core to generate entropy which you then paste in to your airgapped version of Ian Coleman to convert to your seed phrase.

Secondly, you shouldn't do this after simply turning off your internet connection and then turning it back on again after. It should be done on a permanently airgapped device.



Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: Fivestar4everMVP on September 04, 2022, 09:28:49 PM
is it a good idea to use same private key for keeping Bitcoin and Litecoin and Dodgecoin?
I do not mean seed phrase, but a raw 32 byte random private key.
Private key will give us a public key, that can be used to generate address for BTC, LTC and Dodgecoin. I dont think there be any problem with this, what you think?
For me, I don't think there is anything wrong in doing this as long as the private key is kept securely with no body having access to it except the owner.
Infact, using one private key to store three different coins is actually very convenient since it relieved you the stress of having to deal with how to keep three private keys securely without worrying about misplacing one or two out of the three.

But the down side (con) of this that loosing that one private key means you have lost three different coins if actually you hold those three coins controlled by that one private.

I personally have one private key across
Ethereum
Binance smart chain
Polygon
Fusion
Avalanche
Houbi chain
Etc.
This is actually very convenient for me since I don't have to deal with having to device a means of making sure all the private keys to this different chains are kept safe , since its just one controlling them all, but like I said before, loosing this one private key is a disaster as it will mean loosing all the assets stored on all this different chains, it is like loosing the master key that opens every door in the house.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: pooya87 on September 05, 2022, 03:36:12 AM
I personally have one private key across
Considering that most of these altcoins have copied bitcoin's cryptography (specifically digital signatures) the risks are smaller but I'm wondering why you did this considering that you could easily create a mnemonic and from that derive many keys for each of these shitcoins at a different derivation path keeping them separate while still having to back up one string (the mnemonic).


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: o_e_l_e_o on September 05, 2022, 09:36:04 AM
Considering that most of these altcoins have copied bitcoin's cryptography (specifically digital signatures)
Honestly, I'd be more concerned about the wallet software. Given just how many terrible, buggy, vulnerable, scammy, closed source, etc., wallets there are on bitcoin, which is the most well established and longest running coin, with the highest market cap, most value, most volume, most users, and specifically most technical users who write and review code, then I can only imagine that the general quality of wallet software for the vast majority of altcoins is absolutely atrocious. Importing a raw private key in to such a wallet poses a huge risk.

Seed phrases are easier to back up, harder to make a mistake with, and designed to support multiple coins without reusing the same private key. I don't see the benefit to using a single private key in this case.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: ABCbits on September 05, 2022, 12:04:15 PM
Also, me wasn't able to find good tools for generating wallets for LTC and DOGE, so rather to make a BTC paper wallet, then use its address to generate LTC and DOGE wallets. Note that i'm (probably) not like one of the guys here who use bitcoin core and are sync with the network. so will use light tools like coinb.in which supports BTC LTC DOGE.

How about Electrum for LTC[1]? It's actively developed and can be used as offline/cold wallet.

you know that WIF isn't the same across Bitcoin, Litecoin and Dogecoin, right? A Bitcoin-based WIF doesn't have the same prefix as a Litecoin-based one.
Yes, the tools me using do support hex pvt key. so do not use WIF at all.

Be careful if you really intend to only backup HEX private key. You''ll need to remember what kind of address you use and whether it use compressed/uncompressed key. Otherwise you'll be forced to try generate all possible combination.

[1] https://electrum-ltc.org/ (https://electrum-ltc.org/)


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: epsi1on on September 07, 2022, 04:41:56 PM
How about Electrum for LTC[1]? It's actively developed and can be used as offline/cold wallet.
Didn't test it yet. not sure if it support


Be careful if you really intend to only backup HEX private key. You''ll need to remember what kind of address you use and whether it use compressed/uncompressed key. Otherwise you'll be forced to try generate all possible combination.

yes,  I finally ended up writing assest and first few characters of each address on the same paper. also hex is not easy to read and write, with a single mistake all are gone wrong... this is some time saw the mnemonic, and HD wallet, but i thought it is only for bitcoin. which was not true and it can be used for many coins...
Writing down mnemonic phrase is much simpler than writing down hex numbers. But on the other side, anyone on earth can identify a paper with mnemonic phrase on that as crypto key, but a hex writing is less identify-able as private key :)

Anyways the mnemonic and BIP44 etc. is how some bitcoiners here do keep their asset, so i definitely rather to test it.


Title: Re: Use same private key for multiple bitcoin-based coins, good idea?
Post by: o_e_l_e_o on September 07, 2022, 07:02:13 PM
this is some time saw the mnemonic, and HD wallet, but i thought it is only for bitcoin. which was not true and it can be used for many coins...
A seed phrase simply gives you a starting point to deterministically generate random numbers. What you then do with those random numbers is up to you. You can use them as a private key for any coin which requires a numerical private key (which I assume is every coin, but no doubt there is some shitcoin out there which doesn't use private keys or something weird :P).

But on the other side, anyone on earth can identify a paper with mnemonic phrase on that as crypto key, but a hex writing is less identify-able as private key :)
I think that's an unnecessary concern. If an attacker is targeting you because they are specifically looking for bitcoin or other crypto, then it doesn't matter if they find a seed phrase or a private key - they will recognize both and steal your funds either way. Similarly, if you are subject to an opportunistic attack by someone who does not know what bitcoin is, then a seed phrase or a private key will both look meaningless to them. And the security of your coins shouldn't depend on hoping that an attacker does not recognize what they found, but rather ensuring that it is never found, or even if it is, it can't be used to steal your coins. The most straightforward way to do this is via a seed phrase with an additional passphrase backed up separately.