Bitcoin Forum

Bitcoin => Electrum => Topic started by: 9thsky on November 14, 2020, 10:47:41 AM



Title: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 14, 2020, 10:47:41 AM
So many keys! How do I use them?

Searching for a tutorial I keep on seeing what they are and technical explanations. All I want to know is...how the hell do I use them?

Bare with me...

If I want to create a paper wallet on Electrum and I want to send to it bitcoins from coinbase. I would copy this (https://imgur.com/8kFEcg5) address and send to it the coins. It then shows up in my wallet...correct? If that's the case, then what is this (https://imgur.com/DMYat00) public key for?? How do I use it? What do I use it for?

And then there is "master public key". What is that for?

But there is more...

The seed phrase. I noticed I can access my wallet by entering the password I had to set to create the wallet. So what's the point of the mnemonic phrase then? I thought that served as the password to get in my wallet to access my coins. But it seems to me that that could be done with just my password. What an i missing.

Reeeeeaaaallly appreciate some for retards guidance here!


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: joniboini on November 14, 2020, 11:02:17 AM
Maybe you want to read https://github.com/bitcoinbook/bitcoinbook first. If you still don't understand them then you can ask here again.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 14, 2020, 11:28:45 AM
Maybe you want to read https://github.com/bitcoinbook/bitcoinbook first. If you still don't understand them then you can ask here again.

Thanks Joni but that's like overhauling the engine when all thats required is a change of spark plugs.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: NotATether on November 14, 2020, 11:47:44 AM
Lots of clarification required. First of all, the many addresses you see in your wallet are completely normal - it is Electrum generating a fixed amount addresses up to a pre-defined limit, 20 IIRC. They all belong to you and you can receive bitcoins from any of them. Just like how some exchange wallets give you many addresses too, Electrum does it in a similar way.

Second, you do not need to use the public key and derivation path of each address that you have in order to send and receive money. That is just technical information. For all purposes, you only need to use the addresses.

Third, some of the addresses are green and others are yellow. The green addresses are receiving addresses and these are the ones you’d give to someone to pay you. The yellow ones are change addresses and whenever you make a payment, the transaction outputs are deposited in one of those addresses. Since you have the private keys for the handle addresses, you technically could receive from them too but it’s best to not request payment from these addresses so that Electrum can automatically send outputs to the change addresses.

Now normally you would not be paying with individual addresses; you should be using the Send tab to send bitcoin to people, and Electrum will automatically choose one of your address to pay with.

Fourth, the master public key is used when creating watch-only wallets (wallet that can check address balances but cannot spend them). Since you are not creating a watch-only wallet you don’t need to use this either.

Last, you asked why you need the mnemonic phrase if you have a password. The answer is because the password only encrypts your wallet file. The password does not contain your private keys. Only the mnemonic phrase has the private keys, and it is carefully encrypted using the password so that hackers cannot spend your bitcoin or export the private keys without the password, even if they have physical access to the wallet.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 14, 2020, 06:38:58 PM
Thank you guys! Things are starting to get clearer now.

What about the "private key"? What's that used for?

Besides the mnemonic phrase and the password, what else do I need to keep secret?


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: The Sceptical Chymist on November 14, 2020, 07:52:32 PM
Yeah, it can be very confusing and/or overwhelming when you're first getting into bitcoin (which I assume you are).  I've been into bitcoin for a few years now and still don't have a good grasp of most of the technical aspects of it--I'm not even sure what the master public key does, for instance.

The seed phrase, however, is probably the most important thing you need to keep track of for an Electrum wallet, because it's your private keys and if your computer crashes and you have to restore your wallet by reinstalling Electrum on another device, that's how you recover your coins.

The password has nothing to do with your private keys.  It's just a way of keeping other people out of your wallet.

The private key is part of the cryptography aspect of cryptocurrency.  That's the part only you should have access to, and it can come in a number of forms (seed phrase, QR code, strings of characters).  Normally you don't even see it when you're just using your wallet to send and receive bitcoin; the wallet takes care of all of that, but if you want to backup your wallet that's what you need to have a copy of.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 14, 2020, 09:07:50 PM
Yeah, it can be very confusing and/or overwhelming when you're first getting into bitcoin (which I assume you are).  I've been into bitcoin for a few years now and still don't have a good grasp of most of the technical aspects of it--I'm not even sure what the master public key does, for instance.

The seed phrase, however, is probably the most important thing you need to keep track of for an Electrum wallet, because it's your private keys and if your computer crashes and you have to restore your wallet by reinstalling Electrum on another device, that's how you recover your coins.

The password has nothing to do with your private keys.  It's just a way of keeping other people out of your wallet.

The private key is part of the cryptography aspect of cryptocurrency.  That's the part only you should have access to, and it can come in a number of forms (seed phrase, QR code, strings of characters).  Normally you don't even see it when you're just using your wallet to send and receive bitcoin; the wallet takes care of all of that, but if you want to backup your wallet that's what you need to have a copy of.

Can someone gain access to my coins if they had the private key? If so, how is it different from the mnemonic phrase?


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: khaled0111 on November 14, 2020, 09:32:58 PM
Can someone gain access to my coins if they had the private key? If so, how is it different from the mnemonic phrase?
if someone have access to a private key he will have access to the funds on the address paired to that private key.
What you have to remember is to back up the seed. To receive payments on Electrum just hit receive then request. A receiving address will be generated.

This is all you need to know for the moment.
If you need any further assistance, don't hesitate to ask here.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 14, 2020, 10:34:03 PM
Can someone gain access to my coins if they had the private key? If so, how is it different from the mnemonic phrase?
if someone have access to a private key he will have access to the funds on the address paired to that private key.
What you have to remember is to back up the seed. To receive payments on Electrum just hit receive then request. A receiving address will be generated.

This is all you need to know for the moment.
If you need any further assistance, don't hesitate to ask here.

1) What do I need the private key for?

2) Does it function like the mnemonic phrase?

3) Is the "seed" the "mnemonic phrase"?


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: NotATether on November 14, 2020, 10:57:56 PM
Can someone gain access to my coins if they had the private key? If so, how is it different from the mnemonic phrase?
if someone have access to a private key he will have access to the funds on the address paired to that private key.
What you have to remember is to back up the seed. To receive payments on Electrum just hit receive then request. A receiving address will be generated.

This is all you need to know for the moment.
If you need any further assistance, don't hesitate to ask here.

1) What do I need the private key for?

2) Does it function like the mnemonic phrase?

3) Is the "seed" the "mnemonic phrase"?

1) The private key is used to sign transactions which are put on the blockchain. The private key has a public key associated with it, which is written on the blockchain along with the amount of bitcoin in it (simplified explanation - what's actually written is slightly more complicated but you just need to know this.)

2) No, it does not function like a mnemonic phrase. Rather, the private keys are derived from the random bits in the mnemonic phrase.

3) Yes they are exactly the same.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: 9thsky on November 15, 2020, 12:01:17 AM
Can someone gain access to my coins if they had the private key? If so, how is it different from the mnemonic phrase?
if someone have access to a private key he will have access to the funds on the address paired to that private key.
What you have to remember is to back up the seed. To receive payments on Electrum just hit receive then request. A receiving address will be generated.

This is all you need to know for the moment.
If you need any further assistance, don't hesitate to ask here.

1) What do I need the private key for?

2) Does it function like the mnemonic phrase?

3) Is the "seed" the "mnemonic phrase"?

1) The private key is used to sign transactions which are put on the blockchain. The private key has a public key associated with it, which is written on the blockchain along with the amount of bitcoin in it (simplified explanation - what's actually written is slightly more complicated but you just need to know this.)

2) No, it does not function like a mnemonic phrase. Rather, the private keys are derived from the random bits in the mnemonic phrase.

3) Yes they are exactly the same.

1) When do I need to use it?

2) What happens if I lose it?


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: blue Snow on November 15, 2020, 12:10:27 AM
1) When do I need to use it?

2) What happens if I lose it?
1. signing transaction and message.
2. you can't access your money.
Private key have one public key (address), mnemonic phrase generate a million Private key and one master private key.
Mnemonic seed  > master private key > private key.
please come to my thread for more https://bitcointalk.org/index.php?topic=5288888.0


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: NotATether on November 15, 2020, 12:26:22 AM
mnemonic phrase generate a million Private key

This is not correct, Electrum mnemonic phrases can theoretically generate up to 2^31 receiving and 2^31 change addresses, because the key derivation paths it uses is m/0/<n> for receiving and m/1/<n> for change. (see this Bitcoin Stack Exchange answer (https://bitcoin.stackexchange.com/a/36956) for the full explanation.) <n> is allowed to be between 0 and 2^31 - 1. Make a derivation path different from those, and Electrum will not recognize them.

Technically there's nothing stopping you from deriving an unlimited number of addresses from a BIP39 seed  (using non-standard derivation paths) except for hardware constraints.



From my tests, it seems that Electrum generates 18 receiving addresses and 10 change addresses when you create the wallet. And each time a receiving address is used, an additional receiving address is created. Still not sure how frequently changes addresses are created though.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: blue Snow on November 15, 2020, 03:40:59 AM
From my tests, it seems that Electrum generates 18 receiving addresses and 10 change addresses when you create the wallet. And each time a receiving address is used, an additional receiving address is created. Still not sure how frequently changes addresses are created though.

If you make a test using https://iancoleman.io/bip39/ to generated more address using electrum MPK.

Electrum Seed
Code:
east alpha glare jealous federal rail bless staff banner unfold crystal excite

Master Private Key
Code:
zprvAZrVEE8P7AUEdxJZFPgVz9cuDbYackc5Gnk6F8ekEMFdCDa7icALWk9edVxT3hm2gqF8sqEEWR8vzaxnWAGqi6wUbh8Hpi5Ng7R8xXRpme8

You will surprise they will create more address (Million) if you clicking more rows, but you need more time to generate a million address, I did testing 2000 need 5 minutes generated.

https://i.ibb.co/p2zfpv8/electrum-MPK.jpg


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: pooya87 on November 15, 2020, 03:44:38 AM
Make a derivation path different from those, and Electrum will not recognize them.
to be clear, derivation paths (m/?/?/..) could be set at the beginning of the wallet creation if you use your own BIP39 seed phrase. each index in the path (each ?) is a 32-bit unsigned integer so it can be from 0 to 0xffffffff and anything you set can be derived in Electrum or any other wallet as long as you specify the values.

Quote
Still not sure how frequently changes addresses are created though.
you said it yourself, whenever an address is used. when you use a [main] address, a new one is created and when you use a change address a new change address is created. you can opt out of using change addresses entirely which means no new one would be created or you can keep using the same change or just use another [main] address as change.

i say "main" because i can't think of any other word, there is no different between the addresses (main or change) in reality, they are just in different categories at a different derivation path.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: NotATether on November 15, 2020, 08:11:10 AM
Make a derivation path different from those, and Electrum will not recognize them.
to be clear, derivation paths (m/?/?/..) could be set at the beginning of the wallet creation if you use your own BIP39 seed phrase. each index in the path (each ?) is a 32-bit unsigned integer so it can be from 0 to 0xffffffff and anything you set can be derived in Electrum or any other wallet as long as you specify the values.

Wouldn’t each index except for the last one need to be between 0 and 0x7fffffff, because you’d have to derive normal child keys in order to use as the last index a value between 0x8000000 and 0xffffffff representing hardened keys, which have to come last since they cannot derive more keys, and the last index could also be between 0 and 0x7fffffff if you just want a normal key?

It means the last index can be 32 bits but you can only use the lower 31 bits of previous indices.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: pooya87 on November 15, 2020, 08:26:59 AM
Wouldn’t each index except for the last one need to be between 0 and 0x7fffffff, because you’d have to derive normal child keys in order to use as the last index a value between 0x8000000 and 0xffffffff representing hardened keys, which have to come last since they cannot derive more keys, and the last index could also be between 0 and 0x7fffffff if you just want a normal key?

It means the last index can be 32 bits but you can only use the lower 31 bits of previous indices.
no all indices covers the entire range and can be between 0 and the max value (0xffffffff).
the only thing that changes is the way we derive the child keys. if the highest bit of the index is set, it is a hardened key and the respective method for hardened keys is used and if it is not set we use the other method for non-hardened keys. it doesn't matter what depth the index is at.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: Maus0728 on November 15, 2020, 10:03:35 AM
Since some of the community members provided you the information regarding bitcoin private keys, public keys and such..I will again share a bitcoin/ blockchain simulator that I have found over a months ago. This will help you further understand the terminologies used in creating wallet and how these keys correlate with each other.

[1] https://www.bitcoinsimulator.tk/blockchain?chain=public

Just a heads up though, don't be confused when you encounter the tab where it says public keys = bitcoin address. That is totally different since bitcoin address are derived from the public keys. Overall, it's a good website since it provides graphical representation which can help you fasten your learning curve.

https://i.imgur.com/tPBocAJl.png


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: ABCbits on November 15, 2020, 12:16:18 PM
3) Is the "seed" the "mnemonic phrase"?
3) Yes they are exactly the same.

For reference, those two are different. But almost all the time when people say "seed", they actually meant "mnemonic phrase". Here's an example (from https://iancoleman.io/bip39/ (https://iancoleman.io/bip39/)),

  • Seed

Code:
f3300a6a9ba02d0cb278cb507674ba46c1a83acbe14a73d6b0ee9c223e0f40654d9df346ff354ed4b260ccae93e5644f210f8223337c8094859237e7692bee54

  • Mnemonic

Code:
sing hurdle success lawsuit reopen patch text media raise tone rose congress


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: bob123 on November 15, 2020, 01:27:49 PM
2) No, it does not function like a mnemonic phrase. Rather, the private keys are derived from the random bits in the mnemonic phrase.

Actually, the private keys are derived from the master private key (which is derived from the seed, which is derived from the mnemonic code).

Mnemonic Code (= encoded representation of =) Seed -> (derives) -> Master private key -> Private Key.



3) Yes they are exactly the same.

They are absolutely not the same.
The seed is not the mnemonic code. This is a common mistake resulting in confusion most of the time.



@OP:
If you lose your private key (and any information needed to derive that private key), you won't be able to access your BTC anymore. You basically lost them.
You need your private keys to sign transactions (to send BTC).


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: o_e_l_e_o on November 15, 2020, 01:36:24 PM
I think a lot of your confusion is coming from the language being used.

When someone says "You need to keep your private keys safe because you use them to sign transactions", they don't mean you physically. You don't need to write down your private keys, don't need to back them up individually, don't even need to look at them. You don't need to know what they look like, or how they sign transactions. Your wallet deals with all that.

When some one says "You use public keys to generate addresses", again, they don't mean you. Your wallet generates the public keys from private keys, generates the addresses from public keys, stores them and uses them. You never even need to look at them.

What you need is the following:

The Electrum file and the password which will let you open it in Electrum.

Your 12 word seed phrase backed up on paper, which will let you recover your wallet should you lose either the file or the password we just mentioned.

At least one address from that wallet which you can send bitcoin to.

If you have all those things, and keep them safe, then you are inherently backing up and keeping safe your private keys and public keys without having to think about them. I can't remember the last time I actually looked at or manually used one of my private keys - that's what the wallet software is for.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: swordsrkewl on December 01, 2020, 08:28:23 AM
Under the receive tab, the first box is description, what is this for, to just label the transaction?

The main way you get the address is to click the "New Address box", which has three tabs, Address(hfeh38yra8wyrav84hntaehe), Request(bitcoin:hfeh38yra8wyrav84hntaehe) and QR Code.... This is where we want the btc to go right? the description box can be left blank, or what?

How long shoulda transaction be valid, long enough for it to complete I would assume? What are the fees and times liek right now? Like the very minimum fees time for transactions?


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: NotATether on December 01, 2020, 09:28:31 AM
Under the receive tab, the first box is description, what is this for, to just label the transaction?

The main way you get the address is to click the "New Address box", which has three tabs, Address(hfeh38yra8wyrav84hntaehe), Request(bitcoin:hfeh38yra8wyrav84hntaehe) and QR Code.... This is where we want the btc to go right? the description box can be left blank, or what?

How long shoulda transaction be valid, long enough for it to complete I would assume? What are the fees and times liek right now? Like the very minimum fees time for transactions?

The description box is optional, it is only to label the payment request and can be left blank.

When you open the "Receive" tab, it selects one of your bitcoin addresses for you to copy. Then you type an amount, and press the Request button after that. At this point the three tabs you mentioned (Address, Request, and QR code) will be filled in, and you click on the blue clipboard button to copy one of them, and transmit it to the person you want to pay you.

Electrum will usually guess the optimal fee for confirming your transaction in a reasonable amount of time while also keeping the fee low, but you can move the slider towards the left to use even lower fees if you are OK with waiting for it to be confirmed after several more blocks.


Title: Re: Seed phrase, password, address, public key, private key, master public key..Wth!
Post by: o_e_l_e_o on December 01, 2020, 10:44:55 AM
When you open the "Receive" tab, it selects one of your bitcoin addresses for you to copy.
Just to clarify: It selects the next unused address in your wallet.

How long shoulda transaction be valid, long enough for it to complete I would assume?
The "Expires after" selection is irrelevant to the person sending you coins, and can be ignored if you want. It is an internal function of Electrum only, designed to alert you if a transaction does not complete in the time you have set. This might be useful if you want paid a set amount of fiat, and so if they don't pay with an hour (for example) you would want to to update to a new bitcoin price to reflect any price changes in that time. Even if your transaction request has expired, though, the QR code will still scan just fine and any transactions sent will still process normally.

What are the fees and times liek right now? Like the very minimum fees time for transactions?
The very minimum fee is always 1 sat/vbyte, but will vary widely in how long that takes to confirm. Right now, a reasonable fee is sitting around 50 sats/vbyte. Use this site for an easy estimation: https://mempool.space/