Bitcoin Forum
May 06, 2024, 03:28:55 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: wallet.dat import public key without private key? (view only)  (Read 2025 times)
Dabs (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 27, 2013, 07:12:02 AM
 #1

For the main reference client or Satoshi client:

Can we import a public key only? Without the private key? It gets included in the wallet.dat file, and we can see the balance including that of the imported public key. But you can't spend it. You can't sign a message. You can't do anything.

This is different from having an encrypted wallet, because encrypted wallets have the private key, but you may or may not have the password or passphrase that decrypts the private keys.

As an aside, this is for the developer of pywallet and other third party wallet.dat applications: Can you import a public key into wallet.dat and simply have a bogus encrypted private key, so this would have the same effect, except you can never spend the coins since it will never decrypt to a proper private key.

Maybe this should be a feature of the next version (v0.9, or v0.8.2).

1714966135
Hero Member
*
Offline Offline

Posts: 1714966135

View Profile Personal Message (Offline)

Ignore
1714966135
Reply with quote  #2

1714966135
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714966135
Hero Member
*
Offline Offline

Posts: 1714966135

View Profile Personal Message (Offline)

Ignore
1714966135
Reply with quote  #2

1714966135
Report to moderator
1714966135
Hero Member
*
Offline Offline

Posts: 1714966135

View Profile Personal Message (Offline)

Ignore
1714966135
Reply with quote  #2

1714966135
Report to moderator
1714966135
Hero Member
*
Offline Offline

Posts: 1714966135

View Profile Personal Message (Offline)

Ignore
1714966135
Reply with quote  #2

1714966135
Report to moderator
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
March 27, 2013, 07:34:01 AM
 #2

You can't put only a public key, wallet.dat stores the keys with 2 values, public key and private key
So yeah, your second solution could work
My concern is that I'm rather sure bitcoin checks that the two are corresponding, but it's worth trying

If you're up to modify pywallet for that, look into the importprivkey function
I don't think I'll have access to a computer until tomorrow evening to do it for you

Did you try Armory? I still didn't try it yet but I think you can import a wallet read-only. You'll still have to possess the private key though

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Dabs (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 27, 2013, 08:02:04 AM
 #3

Yeah, I tried Armory. It will work for its intended purposes, but there's a bunch of things I don't like about it. It has watching only wallets.

My computer is set up in such a way that upon reboot all newly installed programs disappear, so I don't have to manually uninstall stuff I'm trying.

Anyway, I can wait for the added feature in your pywallet. I like the Satoshi client as is just fine.

phathash
Member
**
Offline Offline

Activity: 75
Merit: 10


View Profile
March 27, 2013, 12:26:26 PM
 #4

Possibly another option is to have the wallet encrypted with a very strong password, burn the wallet to a CD and then move it to another cleanly installed machine/Ubuntu USB flash drive. From that second machine you would never sign a tx or message. View only. The decryption key would never be released into memory.

I prefer the reference client to other implementations. Offline tx would be nice.

You could spend your coins offline the hard way - disconnect that second instance from the Internet (never to be connected again), sign a tx, burn the wallet to CD and copy it to a third clean instance. Once the third instance has the full blockchain it will broadcast the tx.
Dabs (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 27, 2013, 12:58:29 PM
 #5

I understand that, using an obscenely strong password (like 200 characters long or something.) But I don't need or want that for all my keys, just maybe a few. Together with coin control, you can just look at it.

I prefer the reference client simply because it's what I started with and well, it's the reference client.

jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
March 27, 2013, 06:55:28 PM
 #6

Finally I had some time and I tried, but like I thought the bitcoin client tells me the wallet is corrupted

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Dabs (OP)
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 30, 2013, 02:54:15 PM
 #7

So... there's no way to import a public key without the private key (or using a bogus private key, that does not correspond with the public key). I'm guessing the reference client checks for the validity of the private key. But then, it's supposed to be encrypted and it can't know that, unless it uses some other form of checking.

jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
March 30, 2013, 03:08:50 PM
 #8

So... there's no way to import a public key without the private key (or using a bogus private key, that does not correspond with the public key). I'm guessing the reference client checks for the validity of the private key. But then, it's supposed to be encrypted and it can't know that, unless it uses some other form of checking.
Oh yeah I tried with an unencrypted wallet, I didn't try to put a bogus encrypted private key in an encrypted wallet
That might work actually!
I can't test until Monday I think though

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
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!