Bitcoin Forum
May 06, 2024, 10:41:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Finding a specific private key in Electrum 3.0  (Read 312 times)
sheratan (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 17, 2017, 12:21:48 AM
 #1

Hi all,

I have an offline computer running Electrum 3.0 that I use as cold storage. I exported the master public key and use that with a watching only wallet on an online system. I had a few coins which I transferred to a new address because I want to get the private key for claiming my BTG coins. I could sign the transaction just fine (see txid 3e2c7a02aa6f2d6e7a804ccdc27794b8b5bfc724669154da1508147ec778c8d1) but when I try to get the private key for address 16Zp4m9ZMLf4sXHxxacusaw3wUpMvRLYZB I get an "Address not found".

While looking at the issue I noticed that using "electrum listaddresses" gives me 45 addresses on the watching only wallet (which includes 16Zp4m9ZMLf4sXHxxacusaw3wUpMvRLYZB) but the cold storage gives me only 28 (and the address is missing from that list).

Any idea how I can retrieve the private key from the cold storage system?

BTW, both systems have Electrum 3.0 on Ubuntu 16.04 but the online version runs it in a virtualenv while the cold storage systen has it installed system wide.

TIA,
Rob
1715035303
Hero Member
*
Offline Offline

Posts: 1715035303

View Profile Personal Message (Offline)

Ignore
1715035303
Reply with quote  #2

1715035303
Report to moderator
1715035303
Hero Member
*
Offline Offline

Posts: 1715035303

View Profile Personal Message (Offline)

Ignore
1715035303
Reply with quote  #2

1715035303
Report to moderator
1715035303
Hero Member
*
Offline Offline

Posts: 1715035303

View Profile Personal Message (Offline)

Ignore
1715035303
Reply with quote  #2

1715035303
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715035303
Hero Member
*
Offline Offline

Posts: 1715035303

View Profile Personal Message (Offline)

Ignore
1715035303
Reply with quote  #2

1715035303
Report to moderator
1715035303
Hero Member
*
Offline Offline

Posts: 1715035303

View Profile Personal Message (Offline)

Ignore
1715035303
Reply with quote  #2

1715035303
Report to moderator
TryNinja
Legendary
*
Offline Offline

Activity: 2828
Merit: 6977



View Profile WWW
November 17, 2017, 01:00:19 AM
 #2

Go to the Console tab and run:
Code:
getprivatekeys('YOUR BITCOIN ADDRESS')

It should show the private key belonging to that adress.

or add "electrum" before the same command and run it in the same place where you ran the "listaddresses" command.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
November 17, 2017, 03:41:05 AM
 #3

On the offline wallet go to the console tab (view > show console if it's not visible) and type this:

Code:
for x in range(0, 30): wallet.create_new_address()

You should find the missing address on the addresses tab. ctrl+f lets you search them fyi. they maybe red coloured but that's not a problem.
sheratan (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 17, 2017, 04:55:11 AM
 #4

@TryNinja: Yes, I tried that and that's where I get the "Adress not found" error.

@Abdussamad: I did that and get a number of red addresses and the address is not visible amomg them. In the CLI I also did a listaddresses and piped it through "grep 16Zp4m9ZMLf4sXHxxacusaw3wUpMvRLYZB" and I get nothing. BTW, if I few the details of a transaction with this address, it is colored yellow, not green. Does that mean anything?

Thank you very much for helping.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
November 17, 2017, 05:02:04 AM
 #5

yes it does mean something. it means that's a change address. run this command instead:

Code:
for x in range(0, 30): wallet.create_new_address(True)
sheratan (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 17, 2017, 05:43:31 AM
 #6

The change address is sill not visible :-(
to make sure I even recreated a new wallet with the same seed and did the create_new_wallet(True) but the change address was not present on that either.
sheratan (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 17, 2017, 10:31:17 AM
 #7

I solved my problem by temporary making myself vulnerable. I created a new wallet with the same seed on the online system and with that I could get the private key for the change address. Does the system need to be online for the proper change address to be generated? If so, how could I possibly sign a transaction where the change address was an input address? So it's solved but I'm confused  Huh
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
November 17, 2017, 08:50:51 PM
 #8

I solved my problem by temporary making myself vulnerable. I created a new wallet with the same seed on the online system and with that I could get the private key for the change address. Does the system need to be online for the proper change address to be generated? If so, how could I possibly sign a transaction where the change address was an input address? So it's solved but I'm confused  Huh

It doesn't need to be online to transact. The unsigned transaction generated by a watch-only wallet contains instructions for the offline wallet to generate the necessary key pairs and corresponding addresses to sign the transaction. However this system wasn't designed for claiming altcoins Smiley


You could have run that command with a higher range in the console (replace 30 with a larger number). Your change address must be at a higher index that I thought.
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!