Bitcoin Forum
December 12, 2024, 12:29:26 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum Private Key  (Read 260 times)
Sidney986 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 31


View Profile
May 30, 2020, 05: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?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
May 30, 2020, 06: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.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
May 30, 2020, 06: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"
Sidney986 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 31


View Profile
May 31, 2020, 01:05:35 AM
Merited by OmegaStarScream (2), o_e_l_e_o (1)
 #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.



pooya87
Legendary
*
Offline Offline

Activity: 3654
Merit: 11103


Crypto Swap Exchange


View Profile
May 31, 2020, 03:18:03 AM
 #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)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Chikito
Legendary
*
Offline Offline

Activity: 2590
Merit: 2090


Top-tier crypto casino and sportsbook


View Profile WWW
May 31, 2020, 04:26:20 AM
 #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

 
 BETFURY .....
██████▄██▄███████████▄█▄
█████▄█████▄████▄▄▄█
███████████████████
████▐███████████████████
███████████▀▀▄▄▄▄███████
██▄███████▄▀███▀█▀▀█▄▄▄█
▀██████████▄█████▄▄█████▀██
██████████▄████▀██▄▀▀▀█████▄
█████████████▐█▄▀▄███▀██▄
███████▄▄▄███▌▌█▄▀▀███████▄
▀▀▀███████████▌██▀▀▀▀▀█▄▄▄████▀
███████▀▀██████▄▄██▄▄▄▄███▀▀
████████████▀▀▀██████████
 
..... Leading iGaming Platform .....
 
UP TO 60%
A P R   B T C
S T A K I N G
 
 8,000+ 
GAMES
 
 HIGH ODDS 
SPORTSBOOK
█▀▀











█▄▄
USE CODE: BTWIN
 
.GET 50 FREE SPINS!.
▀▀█











▄▄█
[/
pooya87
Legendary
*
Offline Offline

Activity: 3654
Merit: 11103


Crypto Swap Exchange


View Profile
May 31, 2020, 06:52:29 AM
Merited by o_e_l_e_o (1)
 #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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
May 31, 2020, 08: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
nc50lc
Legendary
*
Offline Offline

Activity: 2618
Merit: 6508


Self-proclaimed Genius


View Profile
May 31, 2020, 08:24:05 AM
Merited by pooya87 (1), o_e_l_e_o (1)
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
May 31, 2020, 08: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.
pooya87
Legendary
*
Offline Offline

Activity: 3654
Merit: 11103


Crypto Swap Exchange


View Profile
May 31, 2020, 11: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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Abdussamad
Legendary
*
Offline Offline

Activity: 3710
Merit: 1586



View Profile
May 31, 2020, 05: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.
Sidney986 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 31


View Profile
May 31, 2020, 09: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.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
May 31, 2020, 09:23:53 PM
Merited by Sidney986 (1)
 #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.
Sidney986 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 31


View Profile
June 01, 2020, 04:52:52 PM
 #15

I thank all of you for the indepth replies.  Much appreciated. Smiley





Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!