Author

Topic: Electrum Private Key (Read 259 times)

member
Activity: 81
Merit: 30
June 01, 2020, 11:52:52 AM
#15
I thank all of you for the indepth replies.  Much appreciated. Smiley





legendary
Activity: 2268
Merit: 18711
May 31, 2020, 04:23:53 PM
#14
Yes, your keys will still work.

Simply create a new Electrum wallet, select "Import bitcoin addresses or private keys", and paste in your private keys, prefaced with the address type and a colon as we discussed higher up in this thread. It makes no difference if the keys were originally created on Electrum, bitaddress, or some other wallet or service - they will still import to Electrum just fine.

If you want to use Electrum as an airgapped wallet, then the best set up is to create a wallet on your airgapped machine, back up the seed phrase on to paper, export the extended public key, and then import the extended public key in to a new Electrum wallet on an internet enabled device. This will create a "watch only" wallet on the internet enabled device, which you can use to watch your addresses and to create transactions which you then transfer to your airgapped device to be signed, before transferring the signed transaction back to your live device to be broadcast.
member
Activity: 81
Merit: 30
May 31, 2020, 04:11:37 PM
#13
Just realised that I didn't save the seed keys from the Electrum wallet created about 2 years ago because I did not want to hold my Bitcoin on a hot wallet which is what Electrum is.

I just saved the public key to a txt file with the private key/s thinking this was all I needed for signing transations air gapped.  I did not realise those seed keys may be usefull to create my private keys.

So will my private key/s created over 2 years ago still work in the new versions of Electrum?   Shocked

It's possible that the keys were created in bitaddress offline version and used in Electrum for air gapped signing, but so long ago it's difficult to rememer at my old age.
legendary
Activity: 3682
Merit: 1580
May 31, 2020, 12:13:45 PM
#12
electrum will keep deriving new private keys from your seed and it'll keep moving coins to addresses corresponding to those private keys. in order to spend those coins you will need those newly generated private keys. that is why a private key export is a dangerous thing because it gives you a false sense of security. you think you have a good and complete backup but you don't. what you should be backing up is the seed. all private keys past, present and future are derived from that so if you have it's sufficient.
legendary
Activity: 3472
Merit: 10611
May 31, 2020, 06:13:21 AM
#11
~which then saves your password in plain text in your Electrum config file.

that was changed in 2b52ee2 about a year ago and the console history is now being stored in the wallet file instead of the config file. consequently it is encrypted in the same way that the wallet file is encrypted.
i believe that means any version >= 3.3.7 according to the release dates.
legendary
Activity: 2268
Merit: 18711
May 31, 2020, 03:53:28 AM
#10
Or Or,  Cheesy  Just use getmasterprivate() and Electrum will prompt you to enter your password.
Huh. Didn't realize that prompted you for your password in a pop up box, rather than like the wallet.keystore.get_master_private_key('password') command, where you have to enter the password directly in the console, which then saves your password in plain text in your Electrum config file.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 31, 2020, 03:24:05 AM
#9
Or, if you already have Electrum installed and working on an airgapped computer as in OP's case, you can just pull the master private key directly from Electrum itself.
Or Or,  Cheesy  Just use getmasterprivate() and Electrum will prompt you to enter your password.
The Master private key will be displayed after entering the passphrase.
legendary
Activity: 2268
Merit: 18711
May 31, 2020, 03:00:57 AM
#8
Or, if you already have Electrum installed and working on an airgapped computer as in OP's case, you can just pull the master private key directly from Electrum itself.

Remove the wallet password as pooya87 has said
If you don't have the console enabled, click View > Show Console
In the console, enter wallet.keystore.xprv
Then again go to Wallet > Password to re-enable your password
legendary
Activity: 3472
Merit: 10611
May 31, 2020, 01:52:29 AM
#7
But you can derive the master private key itself from electrums seed (with several code snippets available on github), which then is compatible with most wallets.

there is a much better way of getting the master private/public key from the Electrum seed phrase that keeps you secure while avoiding possible bugs in those third party codes.
- remove the wallet password if you have any (Wallet > Password > enter previous pass and remove new one as empty)
- open the wallet location in explorer
- open wallet file in a text editor
- search for xprv (it is under "keystore") copy that!
- remember to re-encrypt the wallet file
legendary
Activity: 2366
Merit: 2054
May 30, 2020, 11:26:20 PM
#6
So would the seed keys or private keys for the segwit wallet created in Electrum work on other bitcoin apps? 
Like pooya87 said, electrum seed different like others.

If you Eager to trying electrum seed to another wallet, you have to read this

But you can derive the master private key itself from electrums seed (with several code snippets available on github), which then is compatible with most wallets.

And this

yes, not directly but a slightly modified BIP39 tool can derive from electrum seed mnemonic just fine
I just need to change 2 lines of code on iancoleman BIP39 tool to make it work for electrum seed mnemonic
legendary
Activity: 3472
Merit: 10611
May 30, 2020, 10:18:03 PM
#5
So would the seed keys or private keys for the segwit wallet created in Electrum work on other bitcoin apps? 

seed phrase (mnemonic) no, because Electrum uses a different way of creating those words that no other wallet supports (one or two may let you import the same seed but it won't be their default settings).
private keys yes, because private keys use a universal format (WIF, which is string after the colon) that is recognizable by all wallets but you may need to take additional steps to let the wallet know what type of address you were using (the part before the colon)
member
Activity: 81
Merit: 30
May 30, 2020, 08:05:35 PM
#4
Thanks.

No worries about security.  I sign using another computer, air gapped via Ubuntu.

So would the seed keys or private keys for the segwit wallet created in Electrum work on other bitcoin apps? 

I plan to keep using Electrum for air gapped signing as feel it's safer, but would still like this information should there be a future problem with Electrum.



legendary
Activity: 2268
Merit: 18711
May 30, 2020, 01:39:51 PM
#3
I note when exporting my private keys from BTC Electrum that the keys contain a colon character and several letters before it.  Is this part of the private key or should I only consider all characters after the colon as the private key?
The letters after the colon, beginning with a "K" or a "L", are your private key.

The letters before the colon tell Electrum what kind of address to generate from the private key.

"p2pkh" generates Legacy addresses beginning with "1"
"p2wpkh-p2sh" generates Nested SegWit addresses beginning with "3"
"p2wpkh" generates Native SegWit addresses beginning with "bc1"
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
May 30, 2020, 01:38:12 PM
#2
Characters before the key give the type of address, you should note all of it down or at least note the type at the top of where your putting it.

But is there a reason you're not using the mnemonic? It's not a good idea and is considered insecure to write down the key the way you're doing it.
member
Activity: 81
Merit: 30
May 30, 2020, 12:56:01 PM
#1
I note when exporting my private keys from BTC Electrum that the keys contain a colon character and several letters before it.  Is this part of the private key or should I only consider all characters after the colon as the private key?
Jump to: