Bitcoin Forum

Bitcoin => Electrum => Topic started by: Peanutswar on May 20, 2021, 12:01:54 AM



Title: Electrum Legacy address
Post by: Peanutswar on May 20, 2021, 12:01:54 AM
On the recent version of the electrum I know there's an option to the users for having a legacy and a segwit wallet now upon checking again because I want to create a two wallet which is I want to create a legacy there's no option at all at this time I would like to ask what and when happen they remove the legacy option on electrum?

The process now becomes Create new wallet > Standard wallet > Seed phrase > Password and automatically created an address which all segwit.


Title: Re: Electrum Legacy address
Post by: Charles-Tim on May 20, 2021, 12:07:25 AM
Segwit is the default since version 4.1.0 and up.

You can use segwit to reduce the fee in a transaction, segwit reduces 42% to about 52% of fee in a transaction if compared with legacy depending on the transaction inputs and outputs but most especially inputs. Because of this, for people not to waste unnecessary fee on legacy transactions, segwit is made default. I think this is a cool and best idea, nobody should use legacy wallet again in my opinion.

But please, is there any good reason you want to create legacy wallet?


Title: Re: Electrum Legacy address
Post by: FinneysTrueVision on May 20, 2021, 12:37:24 AM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address. If you want an address that is compatible with services that don't support bech32 withdrawals you can just use a wrapped Segwit address.


Title: Re: Electrum Legacy address
Post by: Husna QA on May 20, 2021, 12:38:59 AM
On the recent version of the electrum I know there's an option to the users for having a legacy and a segwit wallet now upon checking again because I want to create a two wallet which is I want to create a legacy there's no option at all at this time I would like to ask what and when happen they remove the legacy option on electrum?

The process now becomes Create new wallet > Standard wallet > Seed phrase > Password and automatically created an address which all segwit.
Elimination of the seed type selection option and by default the resulting wallet is Segwit wallet (Bech32 address) starting from Electrum 4.1.0. For details can be seen in the release note.

# Release 4.1.0 - Kangaroo (March 30, 2021)
-snip-
 * The wallet creation wizard no longer asks for a seed type, and
   creates segwit wallets with bech32 addresses. Older seed types can
   still be created with the command line.
-snip-

To create a Legacy address, open the Console Tab (View Menu -> Show Console). Type the following command line:

Quote
make_seed(128,"","standard")
https://github.com/spesmilo/electrum/blob/master/electrum/commands.py#L320-L325

For example:


Then create a new wallet using the seed generated through the Console. Here is an example of the results:



Title: Re: Electrum Legacy address
Post by: Charles-Tim on May 20, 2021, 01:28:54 AM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address.
Message signing is the complain some people do make, but it is not just a genuine excuse because I signed my first message using segwit (bc1q) address when I was a newbie.


Title: Re: Electrum Legacy address
Post by: Peanutswar on May 20, 2021, 02:13:54 AM
But please, is there any good reason you want to create legacy wallet?

When I was starting on the forum I used the segwit bc1 and I want to try the difference between the legacy address that's why I come up I want to have legacy too.
~~~

Thanks for the information It works is there any difference between the seed given by the electrum on create seed and the console as given on the image above?.


Title: Re: Electrum Legacy address
Post by: pooya87 on May 20, 2021, 02:30:37 AM
Thanks for the information It works is there any difference between the seed given by the electrum on create seed and the console as given on the image above?.
When you create a new wallet through the UI you are calling that function (make_seed) under the hood with values you select in the interface. Using the console you can manually call that function and set the parameters that you like and are not available through the UI such as selecting a different entropy size or a different address type.
It goes without saying that you shouldn't use console in general if you don't understand what you are doing.


Title: Re: Electrum Legacy address
Post by: HCP on May 20, 2021, 03:15:19 AM
Thanks for the information It works is there any difference between the seed given by the electrum on create seed and the console as given on the image above?.
Effectively no... they are, for all intents and purposes, exactly the same... as long as you use "128" and "standard" parameters when calling make_seed()

If you use different values, then it will generate seeds with different amounts of entropy or different features, ie. 2fa etc.


Title: Re: Electrum Legacy address
Post by: FinneysTrueVision on May 20, 2021, 03:20:32 AM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address.
Message signing is the complain some people do make, but it is not just a genuine excuse because I signed my first message using segwit (bc1q) address when I was a newbie.

There isn't an official standard when it comes to signing messages with segwit addresses. If you did sign a message it might not be recognized as valid when you try to verify it with a different wallet or program.


Title: Re: Electrum Legacy address
Post by: pooya87 on May 20, 2021, 05:46:05 AM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address.
Message signing is the complain some people do make, but it is not just a genuine excuse because I signed my first message using segwit (bc1q) address when I was a newbie.

There isn't an official standard when it comes to signing messages with segwit addresses. If you did sign a message it might not be recognized as valid when you try to verify it with a different wallet or program.
Technically there is no "standard" in bitcoin world apart from the consensus rules. Even addresses aren't standards because they are not part of the consensus rules! But there are already 2 BIPs (which in some ways could be called "standard") for signing messages from an address: BIP-137 and 322.


Title: Re: Electrum Legacy address
Post by: Husna QA on May 20, 2021, 06:57:31 AM
Thanks for the information It works is there any difference between the seed given by the electrum on create seed and the console as given on the image above?.
There is no difference. Even as pooya87 explained above, you can set different parameters manually via the console which is not found when creating a wallet through the UI.

https://i.ibb.co/3BpCtZm/57049529.png

https://i.ibb.co/xLqQ5VQ/57049529.png

Reference:
https://github.com/spesmilo/electrum/blob/de716ab07cf81c96658713026b03a3d3f1940c19/electrum/mnemonic.py#L190
https://github.com/spesmilo/electrum/blob/de716ab07cf81c96658713026b03a3d3f1940c19/electrum/commands.py#L325
https://github.com/spesmilo/electrum/blob/6650e6bbae12a79e12667857ee039f1b1f30c7e3/electrum/mnemonic.py#L249
https://github.com/spesmilo/electrum/blob/6650e6bbae12a79e12667857ee039f1b1f30c7e3/electrum/version.py#L13-L21



Title: Re: Electrum Legacy address
Post by: hugeblack on May 20, 2021, 09:56:31 AM
# Release 4.1.0 - Kangaroo (March 30, 2021)
-snip-
 * The wallet creation wizard no longer asks for a seed type, and
   creates segwit wallets with bech32 addresses. Older seed types can
   still be created with the command line.
-snip-

To create a Legacy address, open the Console Tab (View Menu -> Show Console). Type the following command line:

It was a long time ago that I did not create legacy wallet but it looks like this a soft force to use segwit wallets > Opening and writing some console commands are complicated for newbies. :-\ :-\
It seems that it is also working with make_seed(120,"legancy")





Title: Re: Electrum Legacy address
Post by: ranochigo on May 20, 2021, 11:50:03 AM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address. If you want an address that is compatible with services that don't support bech32 withdrawals you can just use a wrapped Segwit address.
There really isn't any reason.

Unfortunately, Electrum never supported nested Segwit addresses. A workaround would be to generate a BIP39 seed and import it into Electrum. That introduces too many points of failure and I generally recommend against it. If you want compatibility and also Segwit benefits (to a smaller extent), then you should use another wallet instead of using the workaround.


Title: Re: Electrum Legacy address
Post by: The Sceptical Chymist on May 20, 2021, 07:04:08 PM
The only reason I can think of for somebody wanting to use a legacy address would be for message signing. There is no benefit to using this type of address.
Message signing is the complain some people do make, but it is not just a genuine excuse because I signed my first message using segwit (bc1q) address when I was a newbie.
Is it harder for some reason to sign a message using a segwit address than a legacy one?  I just signed a message yesterday from a native segwit address, and it didn't seem to be any more difficult--though it's been quite some time since I've had to sign something, and last time might have been from a segwit addy as well.

Oddly enough, the bitcoin faucets that still exist (or at least some of them) only let you withdraw to legacy addresses, Cointiply being one of them, and that was true of Coinpot before they quit the faucet business.  And if you buy something like a Ballet wallet or an OpenDime, the address they provide you with is a legacy one.  Not sure why that is, but I think it's high time everyone moved to segwit.

I still recall when segwit was first introduced and all the heated discussion about it.  It was wild.


Title: Re: Electrum Legacy address
Post by: BlackHatCoiner on May 20, 2021, 07:30:42 PM
By and large you still can do it via GUI. Launch client ==> check "Standard wallet" ==> Click Next ==> check "I have already a seed" == > Click Next == > Click Options == >  check "Bip39  seed" = > Click OK == > Enter your BIP 39 SEED ==>Click Next  ==> check "legacy (p2pkh)" (you may also change the last index in derivation path if u know what you are doing) ==> Click Next
He doesn't have to do that. Electrum allows you to create a legacy wallet without having to import any BIP39 seeds.

The only reason I can think of for somebody wanting to use a legacy address would be for message signing.
Why that? What difference would it make to sign from a segwit address? I have this query along with the Pharmacist.

Oddly enough, the bitcoin faucets that still exist (or at least some of them) only let you withdraw to legacy addresses, Cointiply being one of them, and that was true of Coinpot before they quit the faucet business.
Especially faucets are the ones that should use SegWit to reduce the fee of those large transactions. When I used to visit faucets, I remember they had a minimum amount for withdrawal. It was around 1000 sats IIRC. With SegWit, you could theoretically earn slightly more.


Title: Re: Electrum Legacy address
Post by: DireWolfM14 on May 20, 2021, 07:33:30 PM
Is it harder for some reason to sign a message using a segwit address than a legacy one?  I just signed a message yesterday from a native segwit address, and it didn't seem to be any more difficult--though it's been quite some time since I've had to sign something, and last time might have been from a segwit addy as well.

It's not any more difficult to sign a message with a segwit address, but it can be difficult to verify the signature.  There is no standard for segwit signatures, so software clients that allow you sign a message with a segwit address have implemented their own.  It's been my experience that a message signed in Electrum with a segwit address can only be verified by Electrum.

Bitcoin core allows messages to be signed only with a legacy address, or at least that's how V0.21.0 worked.  I haven't tried to sign a message with a segwit address using V0.21.1, but there's nothing in the change log that suggest this has been changed.  


Title: Re: Electrum Legacy address
Post by: HCP on May 20, 2021, 10:36:12 PM
Correct... Bitcoin Core has only ever supported signing messages from Legacy addresses.

Verifying signed messages that have used SegWit address (nested or native) can be problematic. I've seen issues where messages signed using a Nested SegWit address by the Trezor wallet software could only be verified in Trezor wallet. While messages signed in Mycelium or Electrum could generally be verified in both.

Even the modified BrainwalletX verification tool that supposedly supports P2SH-P2WPKH (Nested SegWit) addresses (https://jhoenicke.github.io/brainwallet.github.io/#verify) struggles with signed messages from some sources :-\

One of the advantages of Bitcoin Core I guess... it will generate legacy, nested or native segwit... all from the same seed/wallet... and you can do so "at will", by simply specifying the type you want when using getnewaddress


Title: Re: Electrum Legacy address
Post by: pooya87 on May 21, 2021, 04:32:58 AM
It's not any more difficult to sign a message with a segwit address, but it can be difficult to verify the signature.  There is no standard for segwit signatures, so software clients that allow you sign a message with a segwit address have implemented their own.  It's been my experience that a message signed in Electrum with a segwit address can only be verified by Electrum.

Bitcoin core allows messages to be signed only with a legacy address, or at least that's how V0.21.0 worked.  I haven't tried to sign a message with a segwit address using V0.21.1, but there's nothing in the change log that suggest this has been changed. 
Just because bitcoin core doesn't have a certain feature it does NOT mean there is no standard for that feature. For example core doesn't support any form of mnemonic including BIP39 but that does NOT mean there is no standard for mnemonics!
It is the same with signing messages, I've already posted 2 "standards" for it above but since bitcoin core doesn't implement those people think there is no "standard". Believe it or not majority of developers are copy pasters who would only implement stuff if core did, since core doesn't have it they didn't have a code to "copy".


Title: Re: Electrum Legacy address
Post by: ranochigo on May 21, 2021, 12:27:34 PM
It's not any more difficult to sign a message with a segwit address, but it can be difficult to verify the signature.  There is no standard for segwit signatures, so software clients that allow you sign a message with a segwit address have implemented their own.  It's been my experience that a message signed in Electrum with a segwit address can only be verified by Electrum.

Bitcoin core allows messages to be signed only with a legacy address, or at least that's how V0.21.0 worked.  I haven't tried to sign a message with a segwit address using V0.21.1, but there's nothing in the change log that suggest this has been changed.  
Actually, you can sign a message using the private key.

Use signmessagewithprivkey and Bitcoin Core will directly sign a message with the private key provided and thus would be a workaround for the problem. The signature validates with Electrum as well as the way it uses the signed message is the same. Note that this is only a workaround and it doesn't mean that Bitcoin Core will validate any signatures from segwit addresses, nested or bc1.


Title: Re: Electrum Legacy address
Post by: DireWolfM14 on May 21, 2021, 07:03:42 PM
Just because bitcoin core doesn't have a certain feature it does NOT mean there is no standard for that feature. For example core doesn't support any form of mnemonic including BIP39 but that does NOT mean there is no standard for mnemonics!

Great point and excellent example.

I've already posted 2 "standards" for it above but since bitcoin core doesn't implement those people think there is no "standard".

I wasn't aware there were already BIPs covering segwit message signatures.  I suppose it would have been more accurate to say "there isn't a specific, established standard."  The fact that two BIPs exist might be the reason for delayed implementation.  I suspect you're right about most developers wanting to just copy and paste code from Core, that would make sense.  I can also understand the hesitancy to implement one, only to have Bitcoin Core implement the other at some later time, effectively making that the "standard."



Title: Re: Electrum Legacy address
Post by: xenon131 on May 22, 2021, 05:43:30 AM

He doesn't have to do that. Electrum allows you to create a legacy wallet without having to import any BIP39 seeds.



the private keys only matter.


Title: Re: Electrum Legacy address
Post by: pooya87 on May 22, 2021, 05:53:12 AM
~
Why? Bag and baggage,  the private keys only matter. Is there any essential difference in private keys generated from BIP39 SEED and native Electrum SEED?
There is no difference in private keys derived using any method as long as the method is cryptographically secure. As for the seed phrase itself apart from the BIP-32 seed derivation process, a very small difference in entropy size and the checksum there is no differences and these aren't really big differences either.

The procedure to create  the legacy  wallet   via Electrum GUI is much easier than  via its console and eliminates human errors.
I believe Electrum no longer lets you create a legacy wallet through the GUI.


Title: Re: Electrum Legacy address
Post by: ranochigo on May 22, 2021, 04:26:48 PM
Why? Bag and baggage,  the private keys only matter. Is there any essential difference in private keys generated from BIP39 SEED and native Electrum SEED? The procedure to create  the legacy  wallet   via Electrum GUI is much easier than  via its console and eliminates human errors.
Honestly, if you need a legacy wallet, there is simply no reason to choose BIP39 over Electrum seeds. Electrum seeds have obvious advantages over the former and generating it from some other sources raises some security concerns as well.

The story changes with nested Segwit wallet (which I think OP should use over legacy). There's no nested Segwit for Electrum seeds and for which BIP39 would be your only option.



Title: Re: Electrum Legacy address
Post by: BlackHatCoiner on May 22, 2021, 04:50:05 PM
Electrum seeds have obvious advantages over the former and generating it from some other sources raises some security concerns as well.
There's a downside of using electrum seeds, at least if we're talking in the long term. Electrum seeds, as said by their name, can only be generated from electrum. But, BIP39 is a proposal and many wallets adopted it. Electrum doesn't propose anything, the developers simply believe that their way is the proper one.

How sure can I be that electrum will exist in 10 years from now? A lot, but I can feel more sure with BIP39.

There's no nested Segwit for Electrum seeds and for which BIP39 would be your only option.
I still don't get why they haven't implemented it for nested Segwit...

I believe Electrum no longer lets you create a legacy wallet through the GUI.
It allows you:



Title: Re: Electrum Legacy address
Post by: ranochigo on May 22, 2021, 04:54:45 PM
There's a downside of using electrum seeds, at least if we're talking in the long term. Electrum seeds, as said by their name, can only be generated from electrum. But, BIP39 is a proposal and many wallets adopted it. Electrum doesn't propose anything, the developers simply believe that their way is the proper one.

How sure can I be that electrum will exist in 10 years from now? A lot, but I can feel more sure with BIP39.
Electrum's method is fully transparent and it is only a difference with generating the seed for use with BIP32. You can always derive your private keys with Electrum seeds and there really isn't any obvious disadvantages.

Conversely, would you rather continue using a standard that is "Unanimously Discourage for implementation"? BIP39 is only used because it is proposed in a BIP. Just because there is a proposal for it, doesn't mean everyone should use it. It's almost like having a BIP for increased block size... It got rejected at the end.



It allows you:
What version of Electrum are you using?


Title: Re: Electrum Legacy address
Post by: BlackHatCoiner on May 22, 2021, 05:15:50 PM
Conversely, would you rather continue using a standard that is "Unanimously Discourage for implementation"?
No, I don't. Don't get me wrong. I believe that using an electrum seed is better than a BIP39 one. But, for the non-code experts, or the people who simply don't look into the code, generating a seed that can only be used by one software may not attract them that much. They will consider this a downside.

What version of Electrum are you using?
4.0.4. Have they changed it since then?


Title: Re: Electrum Legacy address
Post by: ranochigo on May 22, 2021, 05:26:22 PM
No, I don't. Don't get me wrong. I believe that using an electrum seed is better than a BIP39 one. But, for the non-code experts, or the people who simply don't look into the code, generating a seed that can only be used by one software may not attract them that much. They will consider this a downside.
Hmm, not really sure if that really matters actually. I don't recommend people to start mixing seeds or start to use seeds interchangably. Perhaps there could be some utility to help people recover Electrum seeds? Definitely not a deal breaker but the point is, if you're going to use Electrum, just might as well generate a seed that uses Electrum's standards. Even if it were to be abandoned in the future, I'm confident to say that there will either be a utility to convert it to a BIP32 seed or users can just transfer it out somehow.

I would definitely be sure that BIP39 will eventually be abandoned (probably still have some support) at some point in time, or at least wallets will start adopting a different standards for mnemonic.

4.0.4. Have they changed it since then?
Yes they have. I think it has been like this since 4.1.0.


Title: Re: Electrum Legacy address
Post by: pooya87 on May 23, 2021, 04:21:40 AM
How sure can I be that electrum will exist in 10 years from now?
You have to think of "Electrum" as this open source software that exists on the internet and everything it does can be seen by everyone. So it will exist until the end of time as long as the internet exists!

Quote
I still don't get why they haven't implemented it for nested Segwit...
Probably because nested SegWit is less efficient than native SegWit and legacy types since it takes up a a lot more space (even though it has less weight compared to legacy but more compared to native SegWit).

Plus at this point which is nearly 5 years after introduction of SegWit into consensus rules, there is no reason to use a service that doesn't support native SegWit addresses because there shouldn't be any such service anymore.


Title: Re: Electrum Legacy address
Post by: BlackHatCoiner on May 23, 2021, 07:44:32 AM
Why? Is this just a matter of your believe or you have the strong evidence for it? As it have been said in my above post the only thing that matters is the private key. Can you prove that private keys generated from BIP39 SEED lack something compared with those priv keys obtained from native Electrum SEED?

As said above, there is no difference to the derived private keys as long as the cryptography's method is strong. Why we do analyze this is because of the checksum and probably because of the fact that generating entropy from electrum is much more random than a github page (https://iancoleman.io/bip39/). The checksum, if you're unfamiliar with, is bits representing the sum of the correct bits. The last word of every seed phrase is affected by the checksum. On a BIP39 twelve-words seed, that requires 4 bits checksum, there are on average 2048/(24) = 128 different combinations of valid seeds. On an electrum seed, that requires 8 bits checksum, there are 2048/(28) = 8 different combinations of valid seeds.

This means that if you ever need to brute force your seed, you'll finish you search 16 times faster.


Title: Re: Electrum Legacy address
Post by: ranochigo on May 23, 2021, 08:13:35 AM
Why? Is this just a matter of your believe or you have the strong evidence for it? As it have been said in my above post the only thing that matters is the private key. Can you prove that private keys generated from BIP39 SEED lack something compared with those priv keys obtained from native Electrum SEED?
We're talking about seeds here, so talking about the derived private keys would be totally offtopic.

Private keys are the same, BIP39 and Electrum, and also pretty much any other wallets will generate private keys of the same format, ECDSA private and public key pairs are the same for Bitcoin's curve. WIF is adopted by most if not all wallets as well.

The key difference lies with the limitations of BIP39 seeds, reliance on wordlist for checksum is not ideal, lacking versioning and contributing to any user's confusion, and as BlackHatCoiner mentioned, better checksum by lowering risks of false positive. I don't think there is any argument to be made here, you can refer to Electrum's docs on their seed system and you'll realised that it doesn't lack anything that BIP39 has but improves on many of the shortcomings