Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: kbdwarrior on May 19, 2021, 04:13:01 PM



Title: Any security/privacy implications using one seed for testnet and mainnet
Post by: kbdwarrior on May 19, 2021, 04:13:01 PM
I was wondering if there are any security or privacy implications I might not see when I want to use only one Bip-39 seed to derive a mainnet and a testnet wallet from, using the testnet wallet to practice and remember the seed by heart and the mainnet derivation for real funds.

Obviously one must be equally careful when entering the seed words, regardless of using the testnet or the mainnet wallet, against side channel attacks. But anything besides that I'm missing?


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: ranochigo on May 19, 2021, 04:19:00 PM
Side channel attacks shouldn't be your main concern, secp256k1 libraries has mitigations against most of that so you'll be mostly safe. Problem would be with malware or some $5 wrench attack.

Privacy concern would be that it would be obvious which testnet addresses and mainnet addresses belongs to each other, public keys would be the same. I wouldn't do so though, leads to unnecessary confusion as well and perhaps leads to unnecessary risks depending on what you're doing with your testnet. It's really not difficult to use two separate seeds and it's quite dangerous for people to be memorizing seeds.


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: kbdwarrior on May 19, 2021, 04:38:02 PM
Side channel attacks shouldn't be your main concern, secp256k1 libraries has mitigations against most of that so you'll be mostly safe.

Sorry, I was meaning trivial side channel attacks like someone looking over your shoulder and you not taking care because it's only testnet. But I see now it's a bad idea, better separate main and test.

Quote
Problem would be with [...] some $5 wrench attack.

That's unfortunately true, but what to do if you have a nomadic lifestyle in those difficult times? I would prefer a geographically distributed multisig setup, but that's not possible because I can't be sure if I can enter my country again in a few months with shit going more crazy every day.

Quote
it's quite dangerous for people to be memorizing seeds.

Why?


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: ranochigo on May 19, 2021, 04:41:01 PM
Why?
Generally forgetfulness, amnesia or just any other thing that can affect your memory, the list goes on.

I definitely wouldn't take the risk and blame myself later on for forgetting a seed phrase. Just having a physical copy of it and keeping it safe would be fine for most.


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: HCP on May 20, 2021, 03:02:27 AM
Privacy concern would be that it would be obvious which testnet addresses and mainnet addresses belongs to each other, public keys would be the same.
That depends on the wallet... and the way it is deriving addresses... theoretically (according to the registered coin types in SLIP0132 (https://github.com/satoshilabs/slips/blob/master/slip-0132.md)), Bitcoin mainnet should be using the "coin" value of "0":
m/44'/0'/0'
m/49'/0'/0'
m/84'/0'/0'

whereas... Bitcoin testnet should be using "coin" value of "1":
m/44'/1'/0'
m/49'/1'/0'
m/84'/1'/0'


So, the account extended xpubs etc, should be different for each network... even when they are generated from the same seed.


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: ranochigo on May 20, 2021, 03:03:31 AM
That depends on the wallet... and the way it is deriving addresses... theoretically (according to the registered coin types in SLIP0132 (https://github.com/satoshilabs/slips/blob/master/slip-0132.md)), Bitcoin mainnet should be using the "coin" value of "0":
m/44'/0'/0'
m/49'/0'/0'
m/84'/0'/0'

whereas... Bitcoin testnet should be using "coin" value of "1":
m/44'/1'/0'
m/49'/1'/0'
m/84'/1'/0'


So, the account extended xpubs etc, should be different for each network... even when they are generated from the same seed.
Thanks. I overlooked this.


Title: Re: Any security/privacy implications using one seed for testnet and mainnet
Post by: o_e_l_e_o on May 22, 2021, 11:06:47 AM
It's been discussed at length as to why memorizing a seed phrase without having a paper back up is a bad idea. Thousands of healthy people suffer head trauma, strokes, aneurysms, infections, seizures, etc. every day, all of which can result in memory impairment. It is incredibly risky and I wouldn't recommend it.

In terms of the seed phrase itself, I would be most concerned about how you handle it. Since you only want to use a single seed phrase, then it is going to hold all your coins. The majority of my coins are stored in airgapped wallets, whereas whenever I've used a testnet wallet I've used a simple online software wallet, and I would also imagine that very few people go to the effort of airgapping a testnet wallet. However you use your testnet wallet will impact the security of all your coins. If you use a hot wallet on testnet, then the security of your main wallet is reduced to the same level.